Skip to content

Conversation

@PedroDiez
Copy link
Contributor

What type of PR is this?

  • documentation

What this PR does / why we need it:

This PR deals with some clarification required in order to state clearly how to define an specific API exception under the {{API_NAME}}.{{SPECIFIC_CODE}} scheme

Which issue(s) this PR fixes:

Fixes #538

Does this PR introduce a breaking change?

  • Yes
  • No

Special notes for reviewers:

N/A

Changelog input

  Clarification meaning of {{API_NAME}}.{{SPECIFIC_CODE}}

Additional documentation

N/A

@PedroDiez PedroDiez self-assigned this Oct 10, 2025
@PedroDiez PedroDiez added the documentation Improvements or additions to documentation label Oct 10, 2025
@PedroDiez PedroDiez added the Spring26 Scope of Spring26 (H1-2026) meta-release label Oct 10, 2025
patrice-conil
patrice-conil previously approved these changes Oct 10, 2025
Copy link
Contributor

@patrice-conil patrice-conil left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@tlohmar tlohmar left a comment

Choose a reason for hiding this comment

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

Looks good.

@rartych
Copy link
Contributor

rartych commented Oct 13, 2025

In CAMARA_common.yaml we have

                    enum:
                      - INVALID_ARGUMENT
                      - OUT_OF_RANGE
                      - "{{SPECIFIC_CODE}}"

But in examples code and message are not written in quotes:

            GENERIC_400_{{SPECIFIC_CODE}}:
              description: Specific Syntax Exception regarding a field that is relevant in the context of the API
              value:
                status: 400
                code: { { SPECIFIC_CODE } }
                message: { { SPECIFIC_CODE_MESSAGE } }

This raises linting errors - I did the exercise to check if CAMARA_common.yaml is not propagating linting problems in API definitions. Here it is not the case because the pleaceholders should be replaced in API definitions, but to avoid this error even when linting CAMARA_common.yaml I propose to change code and message attribute:

            GENERIC_400_{{SPECIFIC_CODE}}:
              description: Specific Syntax Exception regarding a field that is relevant in the context of the API
              value:
                status: 400
                code: "{{SPECIFIC_CODE}}"
                message: Message for specific code

The same for:
GENERIC_403_{{SPECIFIC_CODE}},
GENERIC_404_{{SPECIFIC_CODE}},
GENERIC_409_{{SPECIFIC_CODE}},
GENERIC_422_{{SPECIFIC_CODE}}

@tlohmar
Copy link
Contributor

tlohmar commented Oct 14, 2025

Yes, LGTM

Co-authored-by: Rafal Artych <121048129+rartych@users.noreply.github.com>
@PedroDiez
Copy link
Contributor Author

Have proposed in commit b9f4c2e

            code: "{{SPECIFIC_CODE}}"
            message: "{{SPECIFIC_CODE_MESSAGE}}"

Also fine if you think is better to set message: Message for specific code (@rartych, @patrice-conil, @tlohmar).
Will adapt in such a case, based on your view

@PedroDiez
Copy link
Contributor Author

Ready for review

rartych
rartych previously approved these changes Nov 24, 2025
Copy link
Contributor

@rartych rartych left a comment

Choose a reason for hiding this comment

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

LGTM

jlurien
jlurien previously approved these changes Nov 24, 2025
Copy link
Contributor

@jlurien jlurien left a comment

Choose a reason for hiding this comment

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

LGTM

@PedroDiez PedroDiez dismissed stale reviews from jlurien and rartych via c507c58 November 24, 2025 17:15
@PedroDiez PedroDiez requested review from jlurien and rartych November 24, 2025 17:16
Copy link
Contributor

@patrice-conil patrice-conil left a comment

Choose a reason for hiding this comment

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

LGTM

@rartych rartych merged commit 2029927 into camaraproject:main Dec 3, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation Spring26 Scope of Spring26 (H1-2026) meta-release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Meaning of {{API_NAME}}.{{SPECIFIC_CODE}}

5 participants