cancel
Showing results for 
Search instead for 
Did you mean: 

When the @Schema description request parameter type is Query, the description attribute content of t

SOLVED
Highlighted
Occasional Contributor

When the @Schema description request parameter type is Query, the description attribute content of t

When the @Schema description request parameter type is Query, the description attribute content of the @Schema annotation is not displayed

星小梦_0-1602566291849.png

星小梦_1-1602566306354.png

Among them, the ApiModelProperty annotation can be used normally, and the content of the description attribute of the @Schema annotation of the OpenAPI3 specification is not displayed at all

 

Below is the content displayed by swagger-ui, which is returned through the swagger interface, and there is no description with the description attribute.

 

星小梦_0-1602566662290.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Staff

Re: When the @Schema description request parameter type is Query, the description attribute content

Full context (project in use, version, full resource method, etc) is not clear from attached screenshots, but one problem for sure is that it seems you're mixing swagger 1.5 annotations with swagger 2.x ones. Assuming you are using swagger-core, depending if you're targeting Swagger/OpenAPI 2.0 or OpenAPI 3.0, you would need to use exclusively one or the other (so e.g. either `ApiModelProperty` or `Schema`)

View solution in original post

1 REPLY 1
Highlighted
Staff

Re: When the @Schema description request parameter type is Query, the description attribute content

Full context (project in use, version, full resource method, etc) is not clear from attached screenshots, but one problem for sure is that it seems you're mixing swagger 1.5 annotations with swagger 2.x ones. Assuming you are using swagger-core, depending if you're targeting Swagger/OpenAPI 2.0 or OpenAPI 3.0, you would need to use exclusively one or the other (so e.g. either `ApiModelProperty` or `Schema`)

View solution in original post

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors