geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Junckes Filho <ivanjunc...@gmail.com>
Subject Re: "In" parameter not being populated OpenAPI
Date Mon, 11 Feb 2019 16:36:47 GMT
This is how it is showing up in components, schemas. But with a lot of not
needed properties as  this class has only telefone, mensagem and usuario.

 "br_com_gbrsistemas_crvirtual_sms_Sms": {
        "deprecated": false,
        "exclusiveMaximum": false,
        "exclusiveMinimum": false,
        "maxLength": 2147483647,
        "minLength": 0,
        "nullable": false,
        "properties": {
          "telefone": {
            "type": "string"
          },
          "mensagem": {
            "type": "string"
          },
          "usuario": {
            "type": "string"
          }
        },
        "readOnly": false,
        "type": "object",
        "uniqueItems": false,
        "writeOnly": false
      },

Also the SNAPSHOT service path references the previous schema also with a
lot of not needed properties like deprecated, etc.

/sms/enviar": {
      "post": {
        "deprecated": false,
        "description": "Enviar SMS.",
        "operationId": "enviarSms",
        "parameters": [

        ],
        "requestBody": {
          "content": {
            "*/*": {
              "schema": {
                "$ref":
"#/components/schemas/br_com_gbrsistemas_crvirtual_sms_Sms",
                "deprecated": false,
                "exclusiveMaximum": false,
                "exclusiveMinimum": false,
                "maxLength": 2147483647,
                "minLength": 0,
                "nullable": false,
                "readOnly": false,
                "type": "object",
                "uniqueItems": false,
                "writeOnly": false
              }
            }
          },
          "required": false
        },
        "responses": {
          "200": {
            "content": {
              "text/plain": {
                "schema": {
                  "deprecated": false,
                  "exclusiveMaximum": false,
                  "exclusiveMinimum": false,
                  "maxLength": 2147483647,
                  "minLength": 0,
                  "nullable": false,
                  "readOnly": false,
                  "type": "string",
                  "uniqueItems": false,
                  "writeOnly": false
                }
              }
            },
            "description": "Success"
          },
          "400": {
            "content": {
              "200": {

              }
            },
            "description": "Bad Request"
          }
        },
        "security": [
          {
            "bearer": [

            ]
          }
        ]
      }
    },

The current m2 version of TomEE doesn't even show ref or any schema classes.

On Mon, Feb 11, 2019 at 12:12 PM Romain Manni-Bucau <rmannibucau@gmail.com>
wrote:

> Hi Ivan, no the mapping can need some polishing to become mainstream
> (cause it is not openapi role to reimplement all mappers logic) but the
> annotation mapping is done.
> This one can depend the companions this annotation has, some will imply it
> gets ignored but AFAIK TCK test that and we pass them.
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://rmannibucau.metawerx.net/> | Old Blog
> <http://rmannibucau.wordpress.com> | Github
> <https://github.com/rmannibucau> | LinkedIn
> <https://www.linkedin.com/in/rmannibucau> | Book
> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
>
>
> Le lun. 11 févr. 2019 à 14:56, Ivan Junckes Filho <ivanjunckes@gmail.com>
> a écrit :
>
>> One thing I saw happening too, is when I add the annotation below it
>> doesn't get added to openapi.
>>
>> @RequestBody(content = @Content(schema = @Schema(implementation = Sms.class)))
>>
>>
>> Is that because it is under development?
>>
>>
>> On Mon, Feb 11, 2019 at 11:38 AM Romain Manni-Bucau <
>> rmannibucau@gmail.com> wrote:
>>
>>> Yes Ivan, array mapping is in progress. In the meantime you can define
>>> your schema to ensure you control it and the implicit representation does
>>> not depends on the way the impl parses it - which can not match your
>>> underlying mapper.
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>> <https://rmannibucau.metawerx.net/> | Old Blog
>>> <http://rmannibucau.wordpress.com> | Github
>>> <https://github.com/rmannibucau> | LinkedIn
>>> <https://www.linkedin.com/in/rmannibucau> | Book
>>> <https://www.packtpub.com/application-development/java-ee-8-high-performance>
>>>
>>>
>>> Le lun. 11 févr. 2019 à 14:23, Ivan Junckes Filho <ivanjunckes@gmail.com>
>>> a écrit :
>>>
>>>> Looks like it is fixed in the master, but when I get the lib and add to
>>>> tomee it shows some bad behavior with the schemas.
>>>>
>>>> [image: image.png]
>>>>
>>>> On Mon, Feb 11, 2019 at 11:09 AM Ivan Junckes Filho <
>>>> ivanjunckes@gmail.com> wrote:
>>>>
>>>>> No I didn't, I will have a look. thanks
>>>>>
>>>>> On Mon, Feb 11, 2019 at 11:08 AM Romain Manni-Bucau <
>>>>> rmannibucau@gmail.com> wrote:
>>>>>
>>>>>> Hi Ivan,
>>>>>>
>>>>>> Did you test on the snapshot? we got some enhancements about it.
>>>>>>
>>>>>> Romain Manni-Bucau
>>>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>>>>> <https://rmannibucau.metawerx.net/> | Old Blog
>>>>>> <http://rmannibucau.wordpress.com> | Github <
>>>>>> https://github.com/rmannibucau> |
>>>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book
>>>>>> <
>>>>>> https://www.packtpub.com/application-development/java-ee-8-high-performance
>>>>>> >
>>>>>>
>>>>>>
>>>>>> Le lun. 11 févr. 2019 à 14:03, Ivan Junckes Filho <
>>>>>> ivanjunckes@gmail.com> a
>>>>>> écrit :
>>>>>>
>>>>>> > Hey guys, I think there is an issue with parameters as the "in"
>>>>>> property
>>>>>> > is required by the spec and is not showing up. This affects
>>>>>> swagger-ui as
>>>>>> > it doesn't replace uf by the actual value. Anyone aware of this
>>>>>> issue?
>>>>>> >
>>>>>> > {
>>>>>> >   "openapi": "3.0.1",
>>>>>> >   "paths": {
>>>>>> >     "/test/{uf}": {
>>>>>> >       "get": {
>>>>>> >         "deprecated": false,
>>>>>> >         "description": "Test by UF.",
>>>>>> >         "operationId": "test",
>>>>>> >         "parameters": [
>>>>>> >           {
>>>>>> >             "name": "uf",
>>>>>> >             "required": true,
>>>>>> >             "schema": {
>>>>>> >               "type": "string"
>>>>>> >             },
>>>>>> >             "style": "simple"
>>>>>> >           }
>>>>>> >         ],
>>>>>> >         "responses": {
>>>>>> >           "200": {
>>>>>> >             "content": {
>>>>>> >               "application/json": {
>>>>>> >                 "schema": {
>>>>>> >                   "deprecated": false,
>>>>>> >                   "exclusiveMaximum": false,
>>>>>> >                   "exclusiveMinimum": false,
>>>>>> >                   "items": {
>>>>>> >
>>>>>> >                   },
>>>>>> >                   "maxLength": 2147483647,
>>>>>> >                   "minLength": 0,
>>>>>> >                   "nullable": false,
>>>>>> >                   "properties": {
>>>>>> >
>>>>>> >                   },
>>>>>> >                   "readOnly": false,
>>>>>> >                   "uniqueItems": false,
>>>>>> >                   "writeOnly": false
>>>>>> >                 }
>>>>>> >               }
>>>>>> >             },
>>>>>> >             "description": "Success"
>>>>>> >           },
>>>>>> >           "400": {
>>>>>> >             "content": {
>>>>>> >               "200": {
>>>>>> >
>>>>>> >               }
>>>>>> >             },
>>>>>> >             "description": "Bad Request"
>>>>>> >           }
>>>>>> >         },
>>>>>> >
>>>>>> >       }
>>>>>> >     },
>>>>>> >
>>>>>> >   }
>>>>>> >   ]
>>>>>> > }
>>>>>> >
>>>>>>
>>>>>

Mime
View raw message