Skip to content

Commit

Permalink
hide swagger.json if when init Api with doc=False
Browse files Browse the repository at this point in the history
  • Loading branch information
FwP-IDN committed Nov 27, 2022
1 parent 4c748d0 commit 68ddb20
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flask_restx/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ def init_app(self, app, **kwargs):
self.license = kwargs.get("license", self.license)
self.license_url = kwargs.get("license_url", self.license_url)
self.url_scheme = kwargs.get("url_scheme", self.url_scheme)
self._add_specs = kwargs.get("add_specs", True)
self._add_specs = kwargs.get("add_specs", True if self._doc else False)

# If app is a blueprint, defer the initialization
try:
Expand Down

0 comments on commit 68ddb20

Please sign in to comment.