Ravenports generated: 18 Apr 2020 01:44
[ravenports.git] / bucket_53 / python-flask-swagger
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-flask-swagger
4 VERSION=                0.2.14
5 KEYWORDS=               python devel
6 VARIANTS=               py38 py37
7 SDESC[py37]=            Extract swagger specs from your flask proj (PY 37)
8 SDESC[py38]=            Extract swagger specs from your flask proj (PY 38)
9 HOMEPAGE=               https://github.com/gangverk/flask-swagger
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPI/f/flask-swagger
14 DISTFILE[1]=            flask-swagger-0.2.14.tar.gz:main
15 DF_INDEX=               1
16 SPKGS[py37]=            single
17 SPKGS[py38]=            single
18
19 OPTIONS_AVAILABLE=      PY38 PY37
20 OPTIONS_STANDARD=       none
21 VOPTS[py37]=            PY38=OFF PY37=ON
22 VOPTS[py38]=            PY38=ON PY37=OFF
23
24 DISTNAME=               flask-swagger-0.2.14
25
26 GENERATED=              yes
27
28 [PY37].BUILDRUN_DEPENDS_ON=             python-Flask:single:py37
29                                         python-PyYAML:single:py37
30 [PY37].USES_ON=                         python:py37
31
32 [PY38].BUILDRUN_DEPENDS_ON=             python-Flask:single:py38
33                                         python-PyYAML:single:py38
34 [PY38].USES_ON=                         python:py38
35
36 [FILE:3685:descriptions/desc.single]
37 flask-swagger
38 =============
39
40 A Swagger 2.0 spec extractor for Flask
41
42 Install:
43
44 ::
45
46     pip install flask-swagger
47
48 Flask-swagger provides a method (swagger) that inspects the Flask app
49 for endpoints that contain YAML docstrings with Swagger 2.0
50 `Operation
51 <https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#op
52 eration-object>`__
53 objects.
54
55 ::
56
57     class UserAPI(MethodView):
58
59         def post(self):
60             """
61             Create a new user
62             ---
63             tags:
64               - users
65             definitions:
66               - schema:
67                   id: Group
68                   properties:
69                     name:
70                      type: string
71                      description: the group's name
72             parameters:
73               - in: body
74                 name: body
75                 schema:
76                   id: User
77                   required:
78                     - email
79                     - name
80                   properties:
81                     email:
82                       type: string
83                       description: email for user
84                     name:
85                       type: string
86                       description: name for user
87                     address:
88                       description: address for user
89                       schema:
90                         id: Address
91                         properties:
92                           street:
93                             type: string
94                           state:
95                             type: string
96                           country:
97                             type: string
98                           postalcode:
99                             type: string
100                     groups:
101                       type: array
102                       description: list of groups
103                       items:
104                         $ref: "#/definitions/Group"
105             responses:
106               201:
107                 description: User created
108             """
109             return {}
110
111 Flask-swagger supports docstrings in methods of MethodView classes and
112 regular Flask view functions.
113
114 Following YAML conventions, flask-swagger searches for ``---``,
115 everything preceding is provided as ``summary`` (first line) and
116 ``description`` (following lines) for the endpoint while everything
117 after is parsed as a swagger
118 `Operation
119 <https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#op
120 eration-object>`__
121 object.
122
123 In order to support inline definition of
124 `Schema
125 <https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#sc
126 hemaObject>`__
127 objects in
128 `Parameter
129 <https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#pa
130 rameterObject>`__
131 and
132 `Response
133 <https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#re
134 sponsesObject>`__
135 objects, flask-swagger veers a little off from the standard. We require
136 an ``id`` field for the inline Schema which is then used to correctly
137 place the
138 `Schema
139 <https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#sc
140 hemaObject>`__
141 object in the
142 `Definitions
143 <https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#de
144 finitionsObject>`__
145 object.
146
147 `Schema
148 <https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#sc
149 hemaObject>`__
150 objects can be defined in a definitions section within the docstrings (see
151 group object above) or within responses or parameters (see user object
152 above). We alo support schema objects nested within the properties of other
153 `Schema
154 <https://github.com/swagger-api/swagger-spec/blob/master/versions/2.0.md#sc
155 hemaObject>`__
156 objects. An example is shown above with the address property of User.
157
158
159 [FILE:106:distinfo]
160 b4085f5bc36df4c20b6548cd1413adc9cf35719b0f0695367cd542065145294d         8645 flask-swagger-0.2.14.tar.gz
161