Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

common.yaml unnecessarily list ErrorInfo properties as required. #162

Closed
gmuratk opened this issue Mar 8, 2024 · 2 comments · Fixed by #213
Closed

common.yaml unnecessarily list ErrorInfo properties as required. #162

gmuratk opened this issue Mar 8, 2024 · 2 comments · Fixed by #213
Labels
correction correction in documentation

Comments

@gmuratk
Copy link
Collaborator

gmuratk commented Mar 8, 2024

Problem description

Assuming the language in API Design Guidelines is normative, CAMARA_common.yaml ErrorInfo format is incorrectly/unnencessarily requiring all the properties of ErrorInfo schema.

ErrorInfo:
   type: object
   required:
    - message
    - status
    - code
   properties:
    message:
     type: string
     description: A human readable description of what the event represent
    status:
     type: integer
     description: HTTP response status code
    code:
     type: string
     description: Friendly Code to describe the error

Expected behavior

Per DG, no field should be listed as required.

Alternative solution

Explicitly state which fields, if any, are required in Design Guideline and update, as necessary, the CAMARA_common.yaml to match definition.

Additional context

@gmuratk gmuratk added the correction correction in documentation label Mar 8, 2024
@rartych rartych changed the title common.yaml unnecessily list ErrorInfo properties as required. common.yaml unnencessarily list ErrorInfo properties as required. Mar 11, 2024
@hdamker hdamker changed the title common.yaml unnencessarily list ErrorInfo properties as required. common.yaml unnecessarily list ErrorInfo properties as required. Mar 11, 2024
@PedroDiez
Copy link
Collaborator

Hi all,

@gmuratk I think (at least per my understanding) that "status quo" regarding ErrorInfo is that the 3 properties are required. That is the agreement/consensus and what it has been applied in every WG.

Let's see any case from other Operators.

In this context, what it would be needed to avoid any ambiguity is just to reflect this in the DG, https://github.com/camaraproject/Commonalities/blob/main/documentation/API-design-guidelines.md#6-error-responses

to indicate the 3 are required/mandatory

@gmuratk
Copy link
Collaborator Author

gmuratk commented Mar 25, 2024

@PedroDiez as discussed in the meeting, it makes sense to have the DG to be normative reference and have the required designations for these fields. While I'm still not sure why the 'message' field should be required, it may be good for DG to provide insights to the reasons or how it is intended to be used.

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 a pull request may close this issue.

2 participants