Skip to content

Validate mandatory info.description content via a canonical Commonalities file #535

Description

@hdamker

Problem description

CAMARA APIs include several mandatory text blocks in info.description originating from the API Design Guide (§3.2.3 additional error responses; §3.2.4 request body strictness, new in Commonalities#634; Appendix A identifier-from-access-token) and the ICM profile (authorization and authentication). Each API specification today copy-pastes these texts into its own info.description. Every change to a mandatory section produces a parallel copy-paste update across 60+ API specifications.

Commonalities#634 adds the §3.2.4 block and surfaces this cost again. A scalable mechanism is needed before more mandatory text is added.

Possible evolution

A canonical content file in Commonalities, distributed to each API repository through the existing code/common/ cache-common synchronisation, paired with a delimited-block convention in info.description and a small set of Spectral rules in the validation framework. Authoritative prose in the API Design Guide and the ICM profile is unchanged; the canonical file mirrors the same text in a machine-readable form.

Detailed design lands in camaraproject/tooling under validation/docs/CAMARA-Validation-Framework-Info-Description-Design.md (PR linked below). Activation target: Commonalities r4.3 ruleset.

Alternative solution

Bundling-time placeholder expansion (a $ref-like marker in info.description that the bundling step expands into the canonical text) was considered and rejected — it hides the mandatory content from contributors and reviewers at the source-spec level.

Additional context

Planned steps:

  • Tooling: design document under validation/docs/
  • Commonalities: canonical file at artifacts/common/info-description-templates.yaml + artifacts/api-templates/sample-*.yaml wrapping + disclaimer; depends on Commonalities#634 merging
  • Tooling: Spectral rule implementation + activation in .spectral-r4.3.yaml
  • Tooling: codeowner-facing how-to under documentation/validation/
  • ReleaseTest: pilot PR ahead of the r4.3 cut, on a tooling working branch
  • ReleaseTest: regression-fixtures branch with deliberate variants (missing template, content drift, duplicate template name, folded YAML scalar)

This issue serves as the umbrella for the planned PRs.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestvalidation frameworkRelated to implementation and introduction of new validation workflow

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions