Flask RequestParser
Location用法
#: Maps Flask-RESTX RequestParser locations to Swagger ones
LOCATIONS = {
"args": "query",
"form": "formData",
"headers": "header",
"json": "body",
"values": "query",
"files": "formData",
}
_friendly_location = {
"json": "the JSON body",
"form": "the post body",
"args": "the query string",
"values": "the post body or the query string",
"headers": "the HTTP headers",
"cookies": "the request's cookies",
"files": "an uploaded file",
}
Type用法
#: Maps Python primitives types to Swagger ones
PY_TYPES = {
int: "integer",
str: "string",
bool: "boolean",
float: "number",
None: "void",
}