You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geronimo.apache.org by "Alonso Gonzalez (Jira)" <ji...@apache.org> on 2020/12/09 08:58:00 UTC

[jira] [Created] (GERONIMO-6794) Copy OpenAPI Annotations from @BeanParam fields to generated api file

Alonso Gonzalez created GERONIMO-6794:
-----------------------------------------

             Summary: Copy OpenAPI Annotations from @BeanParam fields to generated api file
                 Key: GERONIMO-6794
                 URL: https://issues.apache.org/jira/browse/GERONIMO-6794
             Project: Geronimo
          Issue Type: Improvement
      Security Level: public (Regular issues)
    Affects Versions: OpenAPI_1.0.14
            Reporter: Alonso Gonzalez


GERONIMO-6786 added @BeanParam support. But @Parameter annonations are not copied into the generated openapi.json

 
{code:java}
 @GET
    @Path("/beanparam")
    public Response beanParam(@BeanParam final Bound param) {
        return Response.ok().build();
    }

    public static class Bound {
        @HeaderParam("first")
        private String premiere;

        @CookieParam("second")
        private String two;

        @Parameter(name = "third", in = ParameterIn.QUERY, description = "This is a parameter description")
        @QueryParam("third")
        private String third;
    }
{code}

Should generate:
{code}
 "parameters":[
          {
            "in":"header",
            "name":"first",
            "schema":{
              "type":"string"
            },
            "style":"simple"
          },
          {
            "in":"cookie",
            "name":"second",
            "schema":{
              "type":"string"
            },
            "style":"form"
          },
          {
            "allowEmptyValue":false,
            "allowReserved":false,
            "description":"This is a parameter description",
            "in":"query",
            "name":"third",
            "required":false,
            "schema":{
              "type":"string"
            }
          }
        ],
{code}



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