Skip to content

Missing response headers x-correlator and Content-Type in testing Artifacts - #727

Open
PedroDiez wants to merge 1 commit into
camaraproject:mainfrom
PedroDiez:missing_response_headers_testing_artifacts
Open

PedroDiez wants to merge 1 commit into
camaraproject:mainfrom
PedroDiez:missing_response_headers_testing_artifacts

Conversation

@PedroDiez

@PedroDiez PedroDiez commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

What type of PR is this?

  • correction
  • tests

What this PR does / why we need it:

This PR aims to cover missing response headers x-correlator and Content-Type in Commonalities Testing Artifacts.
Additionally, also aligns the order of appearance of this checkings in tests design as per below:

And the response header "Content-Type" is "application/json"
And the response header "x-correlator" has same value as the request header "x-correlator"

Artifacts updated:

  • C01-device-errors.feature
    • Added in all tests
  • C02-phoneNumber-errors.feature
    • Added in all tests
  • event-subscription-template.feature (additional wording alignment done as well). Added in below tests:
    • @{xxx}_subscriptions_03_subscription_creation_event_validation
    • @{xxx}_subscriptions_10_subscription_delete_event_validation
    • @{xxx}_subscriptions_11_subscription_creation_initial_event
    • @{xxx}_subscriptions_2x series
    • @{xxx}_subscriptions_3x series
    • @{xxx}_subscriptions_4x series
    • @{xxx}_subscriptions_5x series
    • @{xxx}_subscriptions_6x series
    • @{xxx}_subscriptions_74
    • @{xxx}_subscriptions_75
  • sample-implicit-events-template.feature
    • Added in sunny 2xx tests (minor typos managed as well)
    • Reordering of involved steps in Error Scenarios
  • sample-service-template.feature
    • Added in tests: 400.06_invalid_x-correlator, 429.01_Too_Many_Requests
    • Reordering of involved steps in 400.0x, 401.0x, 403.0x, 404.01 and 409.0x scenarios

Which issue(s) this PR fixes:

Fixes #726

Does this PR introduce a breaking change?

  • Yes
  • No

Special notes for reviewers:

Changelog input

 Missing response headers `x-correlator` and `Content-Type` in testing Artifacts

Additional documentation

This section can be blank.

docs

@bigludo7 bigludo7 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

When the request "{operationId}" is sent
Then the response status code is 400
And the response header "Content-Type" is "application/json"
And the response header "x-correlator" has same value as the request header "x-correlator"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check this comment @camaraproject/commonalities_codeowners, cc @hdamker

Point to be discussed is about behaviour of x-correlator in response.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key is the following: in this test the value input for x-correlator is wrong, so as this could face issues in some API servers that can not allow that (that is, return the same invalid value).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From TEF implementation, our API Server manages it and echoing the value is not an issue. Nonetheless, from our view this may be different, depending on how an implementation is performed this cannot be achieved (e.g. implementing logic in backend -resource-server-).

So we think the step of checking any specific consideration with regards to x-correlator can be omitted/removed

And the response header "x-correlator" has same value as the request header "x-correlator"

and let implementations to manage in the way it fits better in their architecture

@tlohmar tlohmar Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Honestly, this "And the response header "x-correlator" has same value as the request header "x-correlator"" does not make sense. The 400 status code is because of the wrongly formatted x-correlation and the wrongly formatted x-correlator value does not need to be echoed back (i.e. can be left to implementation). Thus, I suggest to remove that line here.

Suggested change
And the response header "x-correlator" has same value as the request header "x-correlator"

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the comment! Makes sense Thorsten. Will wait a few days in case other views, and then I will apply the suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

correction correction in documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Align missing response headers x-correlator and Content-Type in testing Artifacts

3 participants