springdoc / springdoc-openapi-maven-plugin

Library for OpenAPI 3 with spring-boot
https://springdoc.org
Apache License 2.0
141 stars 37 forks source link

Plugin does not generate responses correctly #53

Closed fsahler closed 1 year ago

fsahler commented 1 year ago

Hi, Here is a sample code:

_@ApiResponse(responseCode = "400", description = RC_400,

content = @Content(mediaType = MediaType.APPLICATION_JSON_VALUE,

schema = @Schema (type = "string", maxLength = 200, minLength = 10, pattern = "[a-zA-Z]",

implementation = Error.class))),_

from this the generator generates:

_"400":

description: Bad Request content:

application/json:

schema:

type: string_

But he would have to generate that instead:

_"400":

description: Bad Request content:

application/json:

schema:

maxLength: 200 minLength: 10 pattern: "[a-zA-Z]" type: string_

Is there any way to fix this problem?

bnasslahsen commented 1 year ago

No to conform to contributions to this repository. You should follow its contributing guidelines.