Skip to content

Complex Discriminator Patterns #79

@clundie-CL

Description

@clundie-CL

Problem description
Related to review comments included with PR #73

The API currently uses complex discriminator-based patterns in its schemas, such as:

NetworkDeviceIntersectionCreate:
  discriminator:
    propertyName: intersectionType
    mapping:
      - NetworkDeviceRoleConfiguration: "..."
      - NetworkDeviceReplacement: "..."

Expected behavior
Schemas should be simplified to use direct property-based operations instead of discriminator-based inheritance. This will make the API easier to consume and maintain, and will improve compatibility with code generation tools.>

Alternative solution
If multiple types must be supported, consider using a simple type property with clear documentation, or separate endpoints for each operation type, rather than relying on OpenAPI discriminators.

Additional context
This issue was identified during the CAMARA design review. Simplifying schema definitions will enhance developer experience and align the API with CAMARA best practices.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions