[
https://issues.apache.org/jira/browse/GERONIMO-6794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Alonso Gonzalez updated GERONIMO-6794:
--
Description:
GERONIMO-6786 added @BeanParam support. But @Parameter annotations 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:java}
"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}
was:
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}
> 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
>Priority: Major
>
> GERONIMO-6786 added @BeanParam support. But @Parameter annotations 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:java}
> "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)