Skip to content

Use references to the common definitions of Commonalities r4.4 where possible #30

Open

Description

@hdamker

Problem description

device-authenticity.yaml defines all components locally, although code/common/CAMARA_common.yaml from Commonalities r4.4 has been in the repository since #25. Some local definitions now differ from the common ones: the length limits added in #27 are stricter than in CAMARA_common.yaml.

Local definition Common definition Local Common
lastChecked, reportedDate schemas/DateTime maxLength: 29 maxLength: 64
ErrorInfo.code schemas/ErrorInfo maxLength: 80 maxLength: 96
ErrorInfo.message schemas/ErrorInfo maxLength: 256 maxLength: 512

The following local definitions match the common ones but are copies instead of references:

  • components/schemas/XCorrelator
  • components/headers/x-correlator and components/parameters/x-correlator
  • ErrorInfo.status (int32, 100–599)
  • components/securitySchemes/openId

Possible evolution

Replace the local definitions with references to the common ones, e.g. $ref: "../common/CAMARA_common.yaml#/components/schemas/DateTime" for lastChecked and reportedDate, and the same for ErrorInfo, XCorrelator, the x-correlator header and parameter, and the openId security scheme. Remove the local copies that are no longer referenced. Keep local definitions only where no common one exists (imei, RequestBody, ImeiStatus, CommonResponseBody).

The references are resolved into a self-contained API definition when the release snapshot is created.

Error responses and error examples are covered in #29.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions