Skip to content

Order of plugins affects output #136

@CausticYarn

Description

@CausticYarn

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions