add open-api for documenting cerebrum api
Motivation:
Good documentation enable others to be able to use API with no or little hassle. Since Cerebrum API will be use by quite of a few developers and admins hence documenting the API concurrently with the api design will save us time and making code maintenance easier and quicker.
For this project documentation will be using open-api, which is becoming an industry standard for documenting restful apis. The open-api ensure that the API documentation is up to date and can be easily be visualise and tested.
Modification:
- add the spring doc open-api to the pom as a dependency
- configure the open-api and enable the login using Helmholtz AAI implicit flow
- add all necessary annotations with their respectful descriptions to controllers and entities.
- ensure that the application version is display in the open-api ui by injecting the version number from the pom to the application properties files. Hence, resources plugin needs to be added to the build.
Result:
Foundation for the documentation of Cerebrum RESTful API is now laid and the few implemented api are now documented. OpenAPI description of Cerebrum RESTful API can be reach from:
- / for the OpenAPI UI,
- /api/v0/cerebrum-docs for the json format, and
- /api/v0/cerebrum-docs.yaml for yaml file
Target: master Acked-by: Pull-request: