Skip to content
Snippets Groups Projects
Commit 7cd1ac5c authored by Tore.Brede's avatar Tore.Brede
Browse files

Filtering out ui-routes from API specification

parent d014f24e
No related branches found
No related tags found
1 merge request!69Filtering out ui-routes from API specification
Pipeline #94287 failed
def custom_preprocessing_hook(endpoints):
# Do not include the routes used in the frontend in the API-specification
filtered_endpoints = filter(lambda endpoint: "/ui/" not in endpoint[0], endpoints)
return filtered_endpoints
......@@ -92,6 +92,7 @@ SPECTACULAR_SETTINGS = {
"TITLE": "Greg",
"DESCRIPTION": "Guest REGistration",
# 'VERSION': '1.0.0',
"PREPROCESSING_HOOKS": ["greg.api.api_doc_preprocessing.custom_preprocessing_hook"]
}
ROOT_URLCONF = "gregsite.urls"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment