Skip to content

115 refactor per commonalities 577#117

Merged
caubut-charter merged 4 commits intocamaraproject:mainfrom
cablelabs:115-refactor-per-commonalities-577
Mar 30, 2026
Merged

115 refactor per commonalities 577#117
caubut-charter merged 4 commits intocamaraproject:mainfrom
cablelabs:115-refactor-per-commonalities-577

Conversation

@clundie-CL
Copy link
Copy Markdown
Contributor

Which issue(s) this PR fixes:

Fixes #115

Does this PR introduce a breaking change?

  • Yes
  • No

Special notes for reviewers:

This is a structural refactor only -- no schema content was changed and no API behavior is affected. The bundled output (network-access-management.yaml) is byte-for-byte identical before and after.

What changed:

  • Domain/ directory renamed to modules/
  • Domain/CAMARA_common.yaml moved to common/CAMARA_common.yaml (separated from NAM-specific schemas)
  • Templates/ directory eliminated; network-access-management-template.yaml moved to the root of API_definitions/
  • All $ref paths updated across 4 files to reflect new locations
  • README.md updated to document the new layout

Files with $ref path changes (no content changes):

File Changes
network-access-management-template.yaml ~74 refs: ../Domain/... to modules/... or common/...
modules/NetworkAccessDevices/NetworkAccessDevices.yaml 1 ref: ../CAMARA_common.yaml to ../../common/CAMARA_common.yaml
modules/Services/ServiceSites.yaml 1 ref: ../CAMARA_common.yaml to ../../common/CAMARA_common.yaml

Verification:

  • redocly bundle produces identical output to pre-refactor
  • redocly lint passes with zero errors
  • No stale Domain/ or Templates/ references remain in any YAML file

Changelog input

 release-note
Restructure API_definitions directory layout: Domain/ renamed to modules/, CAMARA_common.yaml separated into common/, Templates/ eliminated. No API or schema content changes.

Additional documentation

This section can be blank.

docs
README.md updated to reflect the new directory structure, bundling commands, and component file paths.

@clundie-CL
Copy link
Copy Markdown
Contributor Author

Based on comment from @hdamker from the source issue #115, I elected to do the following:

  • Remove the bundled network-access-management.yaml from repo
  • Rename network-access-management.yaml-template.yaml to network-access-management.yaml which now is the authoritative source (Includes relative $ref)
  • Update the code/API_definitions/README.md to highlight the local bundling strategy :
  1. Create the bundle and lint
cd code/API_definitions
redocly bundle network-access-management.yaml --output network-access-management-bundled.yaml
redocly lint network-access-management.yaml
  1. The repo .gitignore is already setup to ignore *-bundled.yaml

Copy link
Copy Markdown
Contributor

@caubut-charter caubut-charter left a comment

Choose a reason for hiding this comment

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

LGTM

@caubut-charter caubut-charter merged commit 0cf369c into camaraproject:main Mar 30, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Refactor API_definitions per Commonalities Issue 577

2 participants