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
If either the request body class or the resource class is not an extended class, then all REST commands are generated in swagger.json, as shown by the examples using class SimpleData, and class SimpleResource.
Please refer to the attached sample maven project and result swagger.json.
swagger.json
sample-webapp.zip
Description
Class ExtendedResource extends AbstractResource (which implements ResourceInterface).
Class ExtendedResource defines 3 REST commands, on the same endpoint "sample/extended": GET, PUT, POST
The PUT and POST endpoints have request body of type ExtendedData. Class ExtendedData extends AbstractData.
In the resulting swagger.json, only GET is generated for resource "/sample/extended" :
"/sample/extended" : { "get" : { "tags" : [ "extended data resource" ], "description" : "Retrieve extended data.", "operationId" : "get", "responses" : { "200" : { "description" : "Normal response", "content" : { "application/json" : { "schema" : { "$ref" : "#/components/schemas/extendedData" } }, "application/xml" : { "schema" : { "$ref" : "#/components/schemas/extendedData" } } } } } } }
Notes
If either the request body class or the resource class is not an extended class, then all REST commands are generated in swagger.json, as shown by the examples using class SimpleData, and class SimpleResource.
See also the fixed bug: #3694
Swagger Version
Other dependencies versions : refer to pom.xml in the attached project.
To Reproduce
The text was updated successfully, but these errors were encountered: