astarte-platform / astarte

Core Astarte Repository
https://docs.astarte-platform.org/
Apache License 2.0
238 stars 46 forks source link

Astarte: update /version endpoint #893

Closed osmanhadzic closed 5 months ago

osmanhadzic commented 7 months ago

Provide third-party applications with information about the version of Astarte microservices they are interacting with, enabling them to adapt their behavior based on the underlying service version.

Standardization of routers for the Astarte API endpoints to have a uniform Phoenix pipeline structure.

Add a /version endpoint to each microservice API, allowing third-party applications to query and retrieve the microservice version using the GET verb. Authentication is not required for accessing this endpoint.

Standardize code for Astarte APIs by refactoring the router for endpoints. Remove plugs from controllers and incorporate them into the router pipeline.

By improving code readability in the app, astarte will expose information about the microservice version to third-party applications without authorization.

(#890)

codecov[bot] commented 7 months ago

Codecov Report

Attention: Patch coverage is 78.94737% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 68.56%. Comparing base (965ed38) to head (ee23ce3).

Files Patch % Lines
...engine_api/lib/astarte_appengine_api_web/router.ex 78.57% 6 Missing :warning:
...ing_api/lib/astarte_housekeeping_api_web/router.ex 0.00% 1 Missing :warning:
..._pairing_api/lib/astarte_pairing_api_web/router.ex 88.88% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #893 +/- ## ========================================== + Coverage 68.08% 68.56% +0.48% ========================================== Files 274 226 -48 Lines 7093 6553 -540 ========================================== - Hits 4829 4493 -336 + Misses 2264 2060 -204 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.