I am trying to fold all the OpenApi annotations in java code such as:
@post
@operation(summary = "Create contacts",
description = "Creates one or more contacts. Accepts a batch of new contact requests in the request body. Each contact will be validated and processed.")
@RequestBody(description = "Batch of new contacts to create", required = true,
content = @content(mediaType = MediaType.APPLICATION_JSON,
schema = @Schema(implementation = NewContactBatchRequest.class)))
@APIResponses({
@apiresponse(responseCode = "204",
description = "Contacts created successfully. No content returned."),
@apiresponse(responseCode = "400", description = "Invalid input",
content = @content(mediaType = MediaType.APPLICATION_JSON,
schema = @Schema(implementation = ErrorResponse.class)))})
public void createContacts(@Valid NewContactBatchRequest batchRequest) {
....
}
It is unclear how to formulate the regex. For the APIResponses stanza, I have this: ^\s*@APIResponses\(\s*\{[\s\S]?^\s\}\)
I think it should match from '@APIResponses(' to the final ')'. Thus, folding all 6 lines. However, this is not matching. I am not sure if the extension can do this across lines??
I am trying to fold all the OpenApi annotations in java code such as:
@post
@operation(summary = "Create contacts",
description = "Creates one or more contacts. Accepts a batch of new contact requests in the request body. Each contact will be validated and processed.")
@RequestBody(description = "Batch of new contacts to create", required = true,
content = @content(mediaType = MediaType.APPLICATION_JSON,
schema = @Schema(implementation = NewContactBatchRequest.class)))
@APIResponses({
@apiresponse(responseCode = "204",
description = "Contacts created successfully. No content returned."),
@apiresponse(responseCode = "400", description = "Invalid input",
content = @content(mediaType = MediaType.APPLICATION_JSON,
schema = @Schema(implementation = ErrorResponse.class)))})
public void createContacts(@Valid NewContactBatchRequest batchRequest) {
....
}
It is unclear how to formulate the regex. For the APIResponses stanza, I have this: ^\s*@APIResponses\(\s*\{[\s\S]?^\s\}\)
I think it should match from '@APIResponses(' to the final ')'. Thus, folding all 6 lines. However, this is not matching. I am not sure if the extension can do this across lines??