Adapt API to the existing spec #4
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes significant updates to the API endpoints, the OpenAPI specification, and the application routing. The changes focus on improving the API structure and adding new endpoints for better functionality.
The API is now in line with our reverse proxy setup.
API Endpoint Updates:
Dockerfile
: Updated the health check endpoint path to/health
from/v0/health
. ([DockerfileL11-R11](https://github.com/netz39/Netz39SpaceAPI-Service/pull/4/files#diff-dd2c0eb6ea5cfc6c4bd4eac30934e2d5746747af48fef6da689e85b752f39557L11-R11)
)src/app.py
: Modified the application routing to remove versioning from the endpoint paths and added new routes for/json
and/text
. ([src/app.pyL100-R114](https://github.com/netz39/Netz39SpaceAPI-Service/pull/4/files#diff-04791d82dd15fdd480f084d7ef65a10789fa5012cb7935f76080763444d48a00L100-R114)
)OpenAPI Specification:
src/OAS3.yml
: Introduced a new OpenAPI specification file defining the API structure, including endpoints for health check, OpenAPI specification retrieval, space API entry in JSON format, space state in plain text, and space state as an image. ([src/OAS3.ymlR1-R73](https://github.com/netz39/Netz39SpaceAPI-Service/pull/4/files#diff-87d62f2296d00782b34f84560e8b9d257e3cc6cb19a8211d89a3b90bfe581451R1-R73)
)New Handlers:
src/app.py
: Added a new handlerSpaceStateTextHandler
to serve the space state in plain text format. ([src/app.pyR87-R96](https://github.com/netz39/Netz39SpaceAPI-Service/pull/4/files#diff-04791d82dd15fdd480f084d7ef65a10789fa5012cb7935f76080763444d48a00R87-R96)
)