canonical / ubuntu-com-security-api

The API for CVEs and USNs data.
17 stars 9 forks source link

Update documentation #97

Closed albertkol closed 2 years ago

albertkol commented 2 years ago

Done

Update documentation version.

The flask-apispec package we use to convert marshmallow schema to swagger documentation is using a fixed old swagger version, also it had a fixed path for the static files. So in order to override the static files path, we override some of the methods of the package. This happens in webapp/api_spec.py. And we copy-pasted the static files form the package in the root folder. For now, we will use the remote scripts of the swagger-ui, so the static files are no longer needed. So I deleted them.

Ideally we would have the swagger-ui as a dependency in package.json. Copy the necessary .js files form node_modules in a static folder then update package.json and Dockerfile to do this for us on deploy. But considering this is the only front-end dependency we have for the API, I thought it's not worth it.

Issue / Card

Fixes #https://github.com/canonical-web-and-design/ubuntu-com-security-api/issues/57

anthonydillon commented 2 years ago

Looks reasonable for now. Agree a dep would be nicer but works for now.