fix: restructure artifacts directory for $ref consumption#606
Draft
hdamker wants to merge 1 commit intocamaraproject:mainfrom
Draft
fix: restructure artifacts directory for $ref consumption#606hdamker wants to merge 1 commit intocamaraproject:mainfrom
hdamker wants to merge 1 commit intocamaraproject:mainfrom
Conversation
…ect#603) Phase 1 of artifacts restructuring: - Move CAMARA_common.yaml to artifacts/common/ directory - Add api-templates/sample-service.yaml demonstrating $ref consumption - Update documentation references to new path The sample-service template demonstrates two patterns for error responses: - Option A: pure $ref for responses using only generic error codes - Option B: local response definition extending generic errors with API-specific codes (ResourceNotFound404 example) Next steps (after camaraproject#604 merges): - Add CAMARA_event_common.yaml with CloudEvent/Source/DateTime schemas - Add notification-templates/sample-notification.yaml - Add event-related API templates (implicit events, subscriptions) - Migrate camara-cloudevents/ content to new structure
Collaborator
Author
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What this PR does / why we need it:
Phase 1 of artifacts directory restructuring (#603).
Establishes the
common/andapi-templates/directory structure so that$refpaths in templates are identical to those in API repositories:CAMARA_common.yamltoartifacts/common/CAMARA_common.yamlartifacts/api-templates/sample-service.yaml— a request-response CRUD template demonstrating$refconsumption of common schemas, error responses, parameters, headers, and security schemesThe sample-service template demonstrates two patterns for error responses:
$ref): For responses using only generic error codes — e.g.,$ref: "../common/CAMARA_common.yaml#/components/responses/Generic404"ResourceNotFound404withIDENTIFIER_NOT_FOUNDalongside genericNOT_FOUNDWhich issue(s) this PR fixes:
Fixes #603 (phase 1)
Does this PR introduce a breaking change?
Special notes for reviewers:
Phase 2 (after #604 merges):
common/CAMARA_event_common.yamlwith CloudEvent/Source/DateTime schemasnotification-as-cloud-event.yamlcamara-cloudevents/content to new structureValidation results (0 errors):
Redocly bundle resolves all
$refsuccessfully:Spectral lint (1 pre-existing warning from CAMARA_common.yaml openId):
Changelog input
Additional documentation