You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
openapi: 3.0.1info:
title: Generated APIversion: "1.0"paths:
/fruits:
get:
responses:
200:
description: OKcontent:
application/json: {}post:
responses: #request body not generated for post200:
description: OKcontent:
application/json: {}delete:
requestBody: #request body generated for deletecontent:
application/json:
schema:
$ref: '#/components/schemas/Fruit'responses:
200:
description: OKcontent:
application/json: {}components:
schemas:
Fruit:
properties:
description:
type: stringname:
type: string
I see it, it come from
OpenApiAnnotationScanner.processJaxRsMethod in the following block:
// If the request body is null, figure it out from the parameters. Only if the
// method declares that it @Consumes data
if (operation.getRequestBody() == null && currentConsumes != null) {
Type requestBodyType = JandexUtil.getRequestBodyParameterClassType(method);
if (requestBodyType != null) {
Schema schema = typeToSchema(requestBodyType);
if (schema != null) {
RequestBody requestBody = new RequestBodyImpl();
ModelUtil.setRequestBodySchema(requestBody, schema, currentConsumes);
operation.setRequestBody(requestBody);
}
}
}
because JandexUtil.getRequestBodyParameterClassType return only parameter without annotation, but don't check if this is a not an @Parameter
The text was updated successfully, but these errors were encountered:
To be more precise, it's supposed to exclude the parameters marked with a JAX-RS annotation but as soon as there is an annotation, it's considered excluded.
Only the parameters with proper JAX-RS annotations should be excluded.
When a JSR303 annotation is used on the RequestBody of REST operation, the paths.{operation}.requestBody is not generated in the swagger documentation
This code was tested with OpenJDK Runtime Environment (build 1.8.0_161-b14) and Quarkus 0.14.0.
This is the generated OpenAPI spec
I see it, it come from
OpenApiAnnotationScanner.processJaxRsMethod in the following block:
because JandexUtil.getRequestBodyParameterClassType return only parameter without annotation, but don't check if this is a not an
@Parameter
The text was updated successfully, but these errors were encountered: