Skip to content

Local DateTime schema collides with bundled CAMARA common — produces DateTime-2 warnings #124

@hdamker

Description

@hdamker

Problem description

code/API_definitions/network-slice-booking.yaml defines a local DateTime schema (around line 507) and at the same time references CloudEvent from ../common/CAMARA_event_common.yaml. The CloudEvent definition in the common file uses its own DateTime (and Source) schema.

During release-snapshot creation the bundler resolves the external reference and inlines CloudEvent together with its dependencies into the snapshot copy of network-slice-booking.yaml. Because a DateTime schema already exists locally, the bundler renames the inlined common one to DateTime-2 to avoid a name collision. The renamed schema violates the PascalCase rule (dash not allowed), producing two warnings in the snapshot validation that did not appear on main.

Observed on snapshot release-snapshot/r2.2-a4d3418:

  • Local DateTime at line ~484 (unchanged from main)
  • Inlined Source at line ~625 (from CAMARA_event_common.yaml)
  • Inlined DateTime-2 at line ~641 (renamed by the bundler)
  • Inlined CloudEvent now references #/components/schemas/DateTime-2 and #/components/schemas/Source

Additional observation: the local DateTime description still carries WARN: This optional field in CloudEvents specification is required in CAMARA APIs implementation., which has been removed in the current Commonalities DateTime definition.

See PR #121 review comment: #121 (comment)

Expected behavior

Remove the local DateTime schema from code/API_definitions/network-slice-booking.yaml and rely on the DateTime schema provided by CAMARA_common.yaml / CAMARA_event_common.yaml.

Concretely:

  • Delete the local DateTime: definition.
  • Replace each internal reference $ref: "#/components/schemas/DateTime" with the external reference $ref: "../common/CAMARA_common.yaml#/components/schemas/DateTime".

After this change, the bundler has no collision to disambiguate, no DateTime-2 is synthesized, and the two PascalCase warnings disappear.

Check network-slice-assignment.yaml for the same pattern.

Alternative solution

If a local variant of DateTime is genuinely needed (different constraints, different description, etc.), rename it locally to a non-colliding PascalCase name (for example BookingDateTime) and update all internal references accordingly. Schema names can be renamed without breaking the API contract; they are not part of the wire format.

Additional context

This applies to any schema name in the API definitions that overlaps with a definition in CAMARA_common.yaml or CAMARA_event_common.yaml while external references to those common files are also used. Other candidates worth checking in this repository: Area, SinkCredential, ErrorInfo, and similar.

Target this fix for the release after r2.2 (per the agreement in PR #121).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    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