Ravenports generated: 21 Sep 2021 23:49
[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
6 VARIANTS=               py38 py39
7 SDESC[py38]=            Extract swagger specs from flask project (PY38)
8 SDESC[py39]=            Extract swagger specs from flask project (PY39)
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[py38]=            single
17 SPKGS[py39]=            single
18
19 OPTIONS_AVAILABLE=      PY38 PY39
20 OPTIONS_STANDARD=       none
21 VOPTS[py38]=            PY38=ON PY39=OFF
22 VOPTS[py39]=            PY38=OFF PY39=ON
23
24 DISTNAME=               flask-swagger-0.2.14
25
26 GENERATED=              yes
27
28 [PY38].BUILDRUN_DEPENDS_ON=             python-Flask:single:py38
29                                         python-PyYAML:single:py38
30 [PY38].USES_ON=                         python:py38,sutools
31
32 [PY39].BUILDRUN_DEPENDS_ON=             python-Flask:single:py39
33                                         python-PyYAML:single:py39
34 [PY39].USES_ON=                         python:py39,sutools
35
36 [FILE:2765: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 objects.
52
53 ::
54
55     class UserAPI(MethodView):
56
57         def post(self):
58             """
59             Create a new user
60             ---
61             tags:
62               - users
63             definitions:
64               - schema:
65                   id: Group
66                   properties:
67                     name:
68                      type: string
69                      description: the group's name
70             parameters:
71               - in: body
72                 name: body
73                 schema:
74                   id: User
75                   required:
76                     - email
77                     - name
78                   properties:
79                     email:
80                       type: string
81                       description: email for user
82                     name:
83                       type: string
84                       description: name for user
85                     address:
86                       description: address for user
87                       schema:
88                         id: Address
89                         properties:
90                           street:
91                             type: string
92                           state:
93                             type: string
94                           country:
95                             type: string
96                           postalcode:
97                             type: string
98                     groups:
99                       type: array
100                       description: list of groups
101                       items:
102                         $ref: "#/definitions/Group"
103             responses:
104               201:
105                 description: User created
106             """
107             return {}
108
109 Flask-swagger supports docstrings in methods of MethodView classes and
110 regular Flask view functions.
111
112 Following YAML conventions, flask-swagger searches for ``---``,
113 everything preceding is provided as summary (first line) and
114 description (following lines) for the endpoint while everything
115 after is parsed as a swagger
116 [Operation]
117 object.
118
119 In order to support inline definition of
120 [Schema]
121 objects in
122 [Parameter]
123 and
124 [Response]
125 objects, flask-swagger veers a little off from the standard. We require
126 an id field for the inline Schema which is then used to correctly
127 place the
128 [Schema]
129 object in the
130 [Definitions]
131 object.
132
133 [Schema]
134 objects can be defined in a definitions section within the docstrings (see
135 group object above) or within responses or parameters (see user object
136 above). We alo support schema objects nested within the properties of other
137
138
139 [FILE:106:distinfo]
140 b4085f5bc36df4c20b6548cd1413adc9cf35719b0f0695367cd542065145294d         8645 flask-swagger-0.2.14.tar.gz
141