Skip to content
This repository has been archived by the owner on Nov 11, 2024. It is now read-only.

Validate Accept header in all REST endpoints and update OpenAPI docs #602

Merged
merged 17 commits into from
Jul 26, 2024

Conversation

eamansour
Copy link
Member

Why?

See galasa-dev/projectmanagement#1925

Changes

  • Lifted up "Accept" header processing from OpenAPI endpoint to the base route class for use by all routes
  • Added validation of the "Accept" header to all routes that should have been processing it
    • If an unsupported MIME type is provided in the header, then endpoints will return a 406 Not Acceptable error with an appropriate error message rather than continue to serve a response
  • Updated the OpenAPI docs to include the new 406 error response and created common responses that are referenced by REST endpoints to reduce duplication of responses

KirbyKatcher and others added 14 commits July 23, 2024 12:56
…plication/json to be specified and added RAS tests

Signed-off-by: Savvas Kyriacou <[email protected]>
Co-authored-by: Eamonn Mansour <[email protected]>
Signed-off-by: Savvas Kyriacou <[email protected]>
Signed-off-by: Eamonn Mansour <[email protected]>
@galasa-team
Copy link

Build successful

@eamansour eamansour force-pushed the issue-1927-resources-defect branch from 1ed1a5b to 8540281 Compare July 26, 2024 09:21
@galasa-team
Copy link

Build successful

1 similar comment
@galasa-team
Copy link

Build successful

@galasa-team
Copy link

Build successful

@galasa-team
Copy link

Build successful

@KirbyKatcher KirbyKatcher merged commit fb2a05a into main Jul 26, 2024
7 checks passed
@KirbyKatcher KirbyKatcher deleted the issue-1927-resources-defect branch July 26, 2024 12:24
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants