You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2021/09/20 14:39:00 UTC

[jira] [Updated] (CAMEL-16986) camel-openapi-java - Add support for description and example in @Schema annotation

     [ https://issues.apache.org/jira/browse/CAMEL-16986?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen updated CAMEL-16986:
--------------------------------
    Summary: camel-openapi-java - Add support for description and example in @Schema annotation  (was: Add support for description and example in @Schema annotation)

> camel-openapi-java - Add support for description and example in @Schema annotation
> ----------------------------------------------------------------------------------
>
>                 Key: CAMEL-16986
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16986
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-openapi-java
>    Affects Versions: 3.11.2
>         Environment: Maven dependencies:
>  * camel-openapi-java-starter:3.11.2
>  * camel-openapi-java:3.11.2
>  * swagger-core: 2.1.10
>            Reporter: Thorsten Roemer
>            Priority: Minor
>             Fix For: 3.12.0
>
>
> When using the @Schema annotation for OpenAPI documentation, the "description" and "example" parameters are apparently ignored because the generated JSON file does not contain any of these elements.
> E.g.:
> {code:java}
> @io.swagger.v3.oas.annotations.media.Schema(description = "The transaction id", example = "id-123")
> String id;
> {code}
> Current generated JSON:
> {noformat}
> [...]
> "components" : {
>   "schemas" : {
>     "Example" : {
>       "type" : "object",
>       "properties" : {
>         "id" : {
>           "type" : "string"
>         },
> [...]
> {noformat}
> Expected generated JSON:
> {noformat}
> [...]
> "components" : {
>   "schemas" : {
>     "Example" : {
>       "type" : "object",
>       "properties" : {
>         "id" : {
>             "description" : "The transaction id",
>             "type" : "string",
>             "example" : "id-123"
>           },
> [...]
> {noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)