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

2020-12-09 Thread Alonso Gonzalez (Jira)
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)


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

2020-12-09 Thread Alonso Gonzalez (Jira)


 [ 
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)


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

2020-12-09 Thread Romain Manni-Bucau (Jira)


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

Romain Manni-Bucau updated GERONIMO-6794:
-
Fix Version/s: OpenAPI_1.0.15

> 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
> Fix For: OpenAPI_1.0.15
>
>
> 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)


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

2020-12-09 Thread Romain Manni-Bucau (Jira)


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

Romain Manni-Bucau resolved GERONIMO-6794.
--
  Assignee: Romain Manni-Bucau
Resolution: Fixed

Fixed on master and the upcoming 1.0.15

> 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
>Assignee: Romain Manni-Bucau
>Priority: Major
> Fix For: OpenAPI_1.0.15
>
>
> 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)


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

2020-12-09 Thread Alonso Gonzalez (Jira)


[ 
https://issues.apache.org/jira/browse/GERONIMO-6794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246433#comment-17246433
 ] 

Alonso Gonzalez commented on GERONIMO-6794:
---

Thanks for the immediate fix!

> 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
>Assignee: Romain Manni-Bucau
>Priority: Major
> Fix For: OpenAPI_1.0.15
>
>
> 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)


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

2020-12-09 Thread Alonso Gonzalez (Jira)


[ 
https://issues.apache.org/jira/browse/GERONIMO-6794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17246433#comment-17246433
 ] 

Alonso Gonzalez edited comment on GERONIMO-6794 at 12/9/20, 10:51 AM:
--

Thanks a lot for the immediate fix!


was (Author: a.gonzalez):
Thanks for the immediate fix!

> 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
>Assignee: Romain Manni-Bucau
>Priority: Major
> Fix For: OpenAPI_1.0.15
>
>
> 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)