Skip to content

No top level Event struct due to polymorphism #11

@grokify

Description

@grokify

The RingCentral API uses a polymorphic Event definition where the body property can be one of several different properties depending on the event type.

The Swagger / OpenAPI 2.0 spec doesn't support this so right now we have the individual body structs but need to hand-create a top level Event struct.

The next step here would be to experiment with OpenAPI 3.0 spec to see if Swagger Codegen can auto-create a polymorphic struct using oneOf.

This is to explore:

  • Hand creating an Event struct
  • Moving to OpenAPI 3.0 spec for events and auto-generating the Event struct using oneOf

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions