-
-
Notifications
You must be signed in to change notification settings - Fork 182
Description
Related to #69.
Flask allows configuring the APPLICATION_ROOT
, which provides the base path for the routes. #70 fixed this issue so that the flask extension reports the fully qualified path.
When the specs are dumped as swagger specs using to_dict()
, the full path is shown on every route, even though the swagger specification supports the basePath
field on the root object.
I think it is important to keep the meaningful portion of the route URL separate from the base path to maintain readable documentation. #70 was the right fix for the flask extension since the apispec
core assumes paths are absolute, but the fact that both flask
and swagger
support a configurable base path indicates that the apispec
core should probably internalize the concept of base paths and expose them to extensions.
Examples of base path in similar libraries:
Edit: Updated to refect that generating swagger specs is a core functionality of
apispec
, not an extension.