This repository has been archived by the owner on Dec 5, 2023. It is now read-only.
generated from EOEPCA/um-service-template
-
Notifications
You must be signed in to change notification settings - Fork 0
Policy Decision Point API
Alvaro Villanueva edited this page Nov 14, 2022
·
8 revisions
- ⏬ Getting Started
- ⏬ Deploy and Configure the Policy Decision Point
- ⏬ Chart Configuration
- ⏬ Integration Guide
- ⏬ Policy Management
- ⏬ Policy Language
- ⏬ Terms and Conditions API
- ⏬ Policy Checks
▶️ Policy Decision Endpoint API (this page)
The Policy Decision Point also exposes a Swagger UI solution to display the aforementioned policy endpoints.
This endpoint is available on: http://<host>:<PDP NodePort>/swagger-ui/
For this purpose, an existing python library in PyPI was used, flask-swagger-ui.
This library allows us to use a JSON file to build a Flask blueprint, which is then registered with the PDP Flask instance and exposed as an endpoint. JSON Template for blueprint is available here.
The blueprint can be built with his code source:
swaggerui_blueprint = get_swaggerui_blueprint(
SWAGGER_URL, # Desired endpoint
API_URL, # Empty since this is specified in current spec file
config={ # Swagger UI config overrides
'app_name': SWAGGER_APP_NAME, # Desired page name for endpoint
'spec': SWAGGER_SPEC # Loaded JSON specification
},
)