Adding swagger groups to segregate the public API docs from the authenticated one. Exposing only dmp and description endpoints.

This commit is contained in:
Thomas Georgios Giannos 2024-05-22 15:25:04 +03:00
parent 6bccc2e980
commit 757eab2069
1 changed files with 13 additions and 2 deletions

View File

@ -1,6 +1,17 @@
springdoc:
packagesToScan: org.opencdmp.controllers.publicapi
pathsToScan: "/api/public/(dmps|datasets)/?.*"
apiDocs:
groups:
enabled: true
groupConfigs:
- group: public-api
displayName: Public API
packagesToScan: org.opencdmp.controllers.publicapi
pathsToMatch: "/api/public/dmps/**, /api/public/datasets/**"
- group: internal-api
displayName: Internal API
packagesToScan: org.opencdmp.controllers
packagesToExclude: org.opencdmp.controllers.publicapi
pathsToMatch: "/api/dmp/**, /api/description/**"
swagger-ui:
enabled: true
useRootPath: true