Example using marshmallow APISpec as base template for Flasgger specs
Example using marshmallow APISpec as base template for Flasgger specs and using the Swagger UI new style layout version 3
A test to ensure that MethodView inheritance works as expected
An example that uses HTTP Basic Auth to protect the /apidocs and /apispec_1.json endpoints. In this example the login credentials to view the Swagger docs are as follows: Username: guest Password: secret Failing to provide the right credentials results in a 401 Unauthorized response from all the Flasgger endpoints.
The simple example using OpenAPI 3.0 callbacks
0.9.0 News and Changes - Updated Swagger UI 3.x - uiversion now defaults to 3 - 'hide_top_bar' config option to remove the green top bar - 'fotter_text' added to customize the footer text (allows html and <script>) - templates/flasgger/footer.html added and can be replaced to customization this footer.html is the right place for custom <script> - 'top_text' added to customize the header text (allows html) - templates/flasgger/top.html added and can be replaced to customization - 'head_text' added to customize the <head> (allows html) - templates/flasgger/head.html added and can be replaced to customization - added 'doc_expansion' config to control the collapse - added 'ui_params' to allow override of any swagger.ui values
The simple example using declared definitions.
The simple example using declared definitions, and external static js/css.
Example using a dictionary as specification instead of YAML
Example loading all specs from JSON template
Example loading all specs from YAML template
Using UIVERSION = Swagger UI 2.
Example using Marshmallow Schema and fields as definitions
Test compatibility with pre 0.5.14 version - produces was accepted as string - definitions references had method prefix
None
This tests the use of `decorator` package with Flasgger
A slight variation of the basic auth example to demonstrate using the "decorators" parameter in init_app, instead of during Swagger object creation itself. This is useful in cases when the application factory pattern is used in your flask app. The example is very similar to the basic_auth example, except that the decorators parameter is passed in init_app. Doc for the original basic auth example follows. An example that uses HTTP Basic Auth to protect the /apidocs and /apispec_1.json endpoints. In this example the login credentials to view the Swagger docs are as follows: Username: guest Password: secret Failing to provide the right credentials results in a 401 Unauthorized response from all the Flasgger endpoints.
A test using simple class based definitions
In this example Swagger UI is disabled.
A general example
A test to ensure routes from Blueprints are swagged as expected.
None
Test the use of LazyString to populate a template at runtime.
Another example using Marshmallow schemas in SwaggerView (MethodView)
In this example a spec name is provided in order to trigger SwaggeUI's dropdown list of specs.
In this example nothing is swagged this is useful for testing if Swagger is ignoring no swagabble views.
Example using Marshmallow Schema and fields as definitions
This tests the use of a view coming from installed package.
In this example `openapi` version is used instead of `swagger` version. This example will test validation when post
In this example `openapi` version is used instead of `swagger` version. This example will test validation when post
Example of swagger document auto loading by endpoint name(view function/method name), parsed by flask_restful.reqparse.RequestParser and validated by jsonschema
In this example `openapi` version is used instead of `swagger` version.
Example of Flask RESTFul integration. requires: `pip install flask-restful`
In this example a custom specs_route is set.
None
None
None
In this example `openapi` version is used instead of `swagger` version.
In this example `openapi` version is used instead of `swagger` version.
In this example `openapi` version is used instead of `swagger` version.
In this example `openapi` version is used instead of `swagger` version.
Example to test cascading $refs and basePath
Ensure that top-level vendor extension config is preserved
In this example `openapi` version is used instead of `swagger` version.
Example of JSON body validation in POST with various kinds of specs and views.
None