Skip to content

Remove redundant DevicePhoneNumber alias of common PhoneNumber (S-211) #246

Description

@hdamker

Problem description

CAMARA Validation on the r4.1 release PR (#244) reports one warning:

S-211	code/API_definitions/number-verification.yaml	213	warn	Potentially unused component has been detected.	Remove the component if it is obsolete, or reference it from the API definition.

The API gives one common schema two names. DevicePhoneNumber is a bare alias of the common PhoneNumber:

    NumberVerificationShareResponse:
      properties:
        devicePhoneNumber:
          $ref: '#/components/schemas/DevicePhoneNumber'
    DevicePhoneNumber:
      $ref: "../common/CAMARA_common.yaml#/components/schemas/PhoneNumber"

Once the $refs are resolved only PhoneNumber is referenced, leaving DevicePhoneNumber unused. The alias adds nothing — it has no keywords beside the $ref, and the same file already references the common schema directly for NumberVerificationRequestBody.phoneNumber.

Expected behavior

Reference the common schema directly and remove the alias:

    NumberVerificationShareResponse:
      type: object
      description: Number verification share result
      required:
        - devicePhoneNumber
      properties:
        devicePhoneNumber:
          $ref: "../common/CAMARA_common.yaml#/components/schemas/PhoneNumber"

Not breaking for API consumers: devicePhoneNumber already resolves to the common PhoneNumber, so the resolved API surface is unchanged.

Additional context

The alias is residue from the Commonalities 0.8.0 alignment. In 2.1.0 DevicePhoneNumber was a standalone schema with its own type, pattern, example, and description; the alignment replaced its body with a reference to the common PhoneNumber but kept the name.

Raised during the release review of r4.1 (rc, Sync26) — release issue #236, release PR #244, where this warning is currently outstanding. The fix is a content change on main and cannot be applied on the release-snapshot branch. Per the API Readiness Checklist, warnings remaining in an rc pre-release must have a deferral reason documented and approved by Release Management. Codeowners: please either fix this on main for r4.1, or record the deferral reason here.

Reference: S-211 — unused component

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