# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= python-flask-swagger VERSION= 0.2.14 KEYWORDS= python devel VARIANTS= py27 py36 py37 SDESC[py36]= Extract swagger specs from your flask proj (PY 36) SDESC[py37]= Extract swagger specs from your flask proj (PY 37) SDESC[py27]= Extract swagger specs from your flask proj (PY 27) HOMEPAGE= https://github.com/gangverk/flask-swagger CONTACT= Python_Automaton[python@ironwolf.systems] DOWNLOAD_GROUPS= main SITES[main]= PYPI/f/flask-swagger DISTFILE[1]= flask-swagger-0.2.14.tar.gz:main DF_INDEX= 1 SPKGS[py36]= single SPKGS[py37]= single SPKGS[py27]= single OPTIONS_AVAILABLE= PY27 PY36 PY37 OPTIONS_STANDARD= none VOPTS[py36]= PY27=OFF PY36=ON PY37=OFF VOPTS[py37]= PY27=OFF PY36=OFF PY37=ON VOPTS[py27]= PY27=ON PY36=OFF PY37=OFF DISTNAME= flask-swagger-0.2.14 GENERATED= yes [PY36].BUILDRUN_DEPENDS_ON= python-Flask:single:py36 python-PyYAML:single:py36 [PY36].USES_ON= python:py36 [PY37].BUILDRUN_DEPENDS_ON= python-Flask:single:py37 python-PyYAML:single:py37 [PY37].USES_ON= python:py37 [PY27].BUILDRUN_DEPENDS_ON= python-Flask:single:py27 python-PyYAML:single:py27 [PY27].USES_ON= python:py27 [FILE:3685:descriptions/desc.single] flask-swagger ============= A Swagger 2.0 spec extractor for Flask Install: :: pip install flask-swagger Flask-swagger provides a method (swagger) that inspects the Flask app for endpoints that contain YAML docstrings with Swagger 2.0 `Operation `__ objects. :: class UserAPI(MethodView): def post(self): """ Create a new user --- tags: - users definitions: - schema: id: Group properties: name: type: string description: the group's name parameters: - in: body name: body schema: id: User required: - email - name properties: email: type: string description: email for user name: type: string description: name for user address: description: address for user schema: id: Address properties: street: type: string state: type: string country: type: string postalcode: type: string groups: type: array description: list of groups items: $ref: "#/definitions/Group" responses: 201: description: User created """ return {} Flask-swagger supports docstrings in methods of MethodView classes and regular Flask view functions. Following YAML conventions, flask-swagger searches for ``---``, everything preceding is provided as ``summary`` (first line) and ``description`` (following lines) for the endpoint while everything after is parsed as a swagger `Operation `__ object. In order to support inline definition of `Schema `__ objects in `Parameter `__ and `Response `__ objects, flask-swagger veers a little off from the standard. We require an ``id`` field for the inline Schema which is then used to correctly place the `Schema `__ object in the `Definitions `__ object. `Schema `__ objects can be defined in a definitions section within the docstrings (see group object above) or within responses or parameters (see user object above). We alo support schema objects nested within the properties of other `Schema `__ objects. An example is shown above with the address property of User. [FILE:106:distinfo] b4085f5bc36df4c20b6548cd1413adc9cf35719b0f0695367cd542065145294d 8645 flask-swagger-0.2.14.tar.gz