The example shows:
# Create an APISpec
spec = APISpec(
title='Swagger Petstore',
version='1.0.0',
plugins=[
'apispec.ext.flask',
'apispec.ext.marshmallow',
],
)
And the output is:
# "responses": {
# "200": {
# "schema": {
# "$ref": "#/definitions/Pet"
# },
# "description": "A pet to be returned"
# }
However, if the order of the plugins to spec is (marshmallow, flask), then the output is:
# "responses": {
# "200": {
# "schema": "PetSchema"
# "description": "A pet to be returned"
# }
Which doesn't resolve correctly in the Swagger doc. If the order is relevant by design, it should be documented.
The example shows:
And the output is:
However, if the order of the plugins to spec is (marshmallow, flask), then the output is:
Which doesn't resolve correctly in the Swagger doc. If the order is relevant by design, it should be documented.