OpenAPI¶
add_response(operation, status_code, schema, description, example=None, examples=None, links=None, content_type='application/json')
¶
Add response to operation.
Version changed: 1.3.0
- Add parameter
content_type
.
Version changed: 0.10.0
- Add
links
parameter.
Source code in /opt/buildhome/python3.8/lib/python3.8/site-packages/apiflask/openapi.py
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 |
|
add_response_with_schema(spec, operation, status_code, schema, schema_name, description)
¶
Add response with given schema to operation.
Source code in /opt/buildhome/python3.8/lib/python3.8/site-packages/apiflask/openapi.py
203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 |
|
get_argument(argument_type, argument_name)
¶
Make argument from given type and name.
Source code in /opt/buildhome/python3.8/lib/python3.8/site-packages/apiflask/openapi.py
224 225 226 227 228 229 230 231 232 233 234 235 236 |
|
get_auth_name(auth, auth_names)
¶
Get auth name from auth object.
Source code in /opt/buildhome/python3.8/lib/python3.8/site-packages/apiflask/openapi.py
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
|
get_operation_tags(blueprint, blueprint_name)
¶
Get operation tag from blueprint object.
Source code in /opt/buildhome/python3.8/lib/python3.8/site-packages/apiflask/openapi.py
56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
|
get_path_description(func)
¶
Get path description from the docstring of the view function.
Source code in /opt/buildhome/python3.8/lib/python3.8/site-packages/apiflask/openapi.py
152 153 154 155 156 157 158 |
|
get_path_summary(func, fallback=None)
¶
Get path summary from the name or docstring of the view function.
Source code in /opt/buildhome/python3.8/lib/python3.8/site-packages/apiflask/openapi.py
139 140 141 142 143 144 145 146 147 148 149 |
|
get_security_and_security_schemes(auth_names, auth_schemes)
¶
Make security and security schemes from given auth names and schemes.
Source code in /opt/buildhome/python3.8/lib/python3.8/site-packages/apiflask/openapi.py
124 125 126 127 128 129 130 131 132 133 134 135 136 |
|
get_security_scheme(auth)
¶
Get security scheme from auth object.
Source code in /opt/buildhome/python3.8/lib/python3.8/site-packages/apiflask/openapi.py
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
|
get_tag(blueprint, blueprint_name)
¶
Get tag from blueprint object.
Source code in /opt/buildhome/python3.8/lib/python3.8/site-packages/apiflask/openapi.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 |
|