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 10:40:00 UTC
[jira] [Commented] (GERONIMO-6794) Copy OpenAPI Annotations from
@BeanParam fields to generated api file
[ 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)