apicrud.initialize

initialize.py

created 9-jan-2021 by richb@instantlinux.net

Functions

app(application)

Initialize the Flask app defined by openapi.yaml

render_problem(error)

Render function to provide message in dict as required for react-admin to display text of message for exception connexion.ProblemException

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

apicrud.initialize.app(application)

Initialize the Flask app defined by openapi.yaml

Parameters
  • application (obj) – a connexion object

  • 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