Skip to content

Disable swagger.json #464

@thejamesmarq

Description

@thejamesmarq

In production I'd like to be able to hide the documentation and specs for an API.

I am currently able to prevent documentation from rendering by creating my API with

Api(app, doc=False)

but this still allows someone to navigate to /swagger.json and retrieve the file.

It might be worthwhile being able to disable exposing the swagger spec from the app with an option like

Api(app, doc=False, specs=False)

which would make /swagger.json come back with 404 as expected.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions