apicrud.initialize¶
initialize.py
created 9-jan-2021 by richb@instantlinux.net
Functions
|
Initialize the Flask app defined by openapi.yaml |
|
Render function to provide message in dict as required for react-admin to display text of message for exception connexion.ProblemException |
|
Render function to provide message in dict as required for react-admin to display text of message for 4xx error codes |
-
apicrud.initialize.
app
(application, controllers, models, path)¶ Initialize the Flask app defined by openapi.yaml
- Parameters
application (obj) – a connexion object
controllers (obj) – all controllers
models (obj) – all models
path (str) – location of configuration .yaml / i18n files
init_func (function) – any other function to call
- Returns
Flask app
- Return type
obj
-
apicrud.initialize.
render_problem
(error)¶ Render function to provide message in dict as required for react-admin to display text of message for exception connexion.ProblemException
- Parameters
error (obj) – the error object with name and description
-
apicrud.initialize.
render_status_4xx
(error)¶ Render function to provide message in dict as required for react-admin to display text of message for 4xx error codes
- Parameters
error (obj) – the error object with name and description