flask_restx_marshmallow.api
¤
patched api of flask_restx_marshmallow.
Api
¤
Bases: Api
Patched API.
__schema__
¤
__schema__() -> OpenAPI
The Swagger specifications/schema for this API.
Raises:
Type | Description |
---|---|
ValueError
|
Unable to render schema |
Returns:
Name | Type | Description |
---|---|---|
OpenAPI |
OpenAPI
|
swagger |
Source code in flask_restx_marshmallow/api.py
47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 |
|
auth_render_swagger
¤
auth_render_swagger(
func: Callable[
[Callable[[Api], str | bytes]], Callable[[Api], T]
],
) -> None
Add decorator to render swagger ui.
Source code in flask_restx_marshmallow/api.py
136 137 138 139 140 141 |
|
render_doc
¤
render_doc() -> str
Render doc.
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
rendered doc |
Source code in flask_restx_marshmallow/api.py
66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
|
render_json
¤
render_json() -> str | bytes
Render swagger json doc.
Returns:
Name | Type | Description |
---|---|---|
str |
str | bytes
|
rendered json |
Source code in flask_restx_marshmallow/api.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 |
|
swagger_static
¤
swagger_static(filename: str) -> str
Swagger static file.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
str
|
filename |
required |
Returns:
Name | Type | Description |
---|---|---|
str |
str
|
url path |
Source code in flask_restx_marshmallow/api.py
152 153 154 155 156 157 158 159 160 161 162 |
|