Closed rujiel closed 2 years ago
I found the issue: the POST methods with a schema only get documented if both @Consumes and @Produces are specified for the method or the class. In the past I only needed to specify @Consumes for POSTs.
I also didn't need to use APIResponse, should have been using @RequestBodySchema with my class on the method in question
For a simple POST example that I have, the schema object that it consumes is not being picked up in openapi, and no properties are shown as options for the POST in the output yaml.
The POST's accept and content type headers also aren't being detected, and / is shown for both. I'm moving to open API from swagger, and in the past with Swagger the accept and content types were auto-detected from the @Consumes and @Produces annotations. I tried the equivalent with @APIResponse (see below) but the information doesn't populate.
For this POST, it seems like boilerplate yaml is being generated. However, the ReviewerDO and its properties do show up in the schemsa list, and for an equivalent GET request the fields are populated. so I'm not sure what's wrong with my POST.
Sample resource
The POST
Generated yaml
The @RequestBody approach detailed below also doesn't seem to work, the yaml for the post is still all defaults
https://download.eclipse.org/microprofile/microprofile-open-api-1.0/microprofile-openapi-spec.html#_requestbody