camaraproject / DeviceLocation

Repository to describe, develop, document and test the DeviceLocation API family
Apache License 2.0
20 stars 33 forks source link

Update location-verification with x-correlator #171

Closed bigludo7 closed 3 months ago

bigludo7 commented 4 months ago

What type of PR is this?

Add one of the following kinds:

What this PR does / why we need it:

Update location-verification with x-correlator This PR partially solve Issue https://github.com/camaraproject/DeviceLocation/issues/160 (2 other PR will come for the 2 other APIs)

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

Alignement with CAMARA Guidelines

Changelog input

 release-note
- add x-correlator as parameter for location-verification

Additional documentation

This section can be blank.

docs
alpaycetin74 commented 4 months ago

hello @jlurien @bigludo7 , is this header considered optional ? It may be useful to make it mandatory in responses, so that the API always returns it to the client for end-to-end troubleshooting.

We have a similar header in our proprietary VF APIs: It is optional in the request, but the API implementation always creates one, prints it in all the logs, and returns it in the API response. If the API client provides the header in the request, our APIs just use it in logging and mirror it in the response.

bigludo7 commented 4 months ago

Hello @alpaycetin74 We're following here what is specified in the commonalities guidelines here: https://github.com/camaraproject/Commonalities/blob/main/documentation/API-design-guidelines.md#9-architecture-headers and probably it will be good for you:

When the API Consumer includes the "X-Correlator" header in the request, the API provider must include it in the response with the same UUID as was used in the request. Otherwise, it is optional to include the "X-Correlator" header in the response with any valid (preferably randomly chosen) UUID.