Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No top level Event struct due to polymorphism #11

Open
grokify opened this issue Feb 11, 2018 · 1 comment
Open

No top level Event struct due to polymorphism #11

grokify opened this issue Feb 11, 2018 · 1 comment
Labels

Comments

@grokify
Copy link
Owner

grokify commented Feb 11, 2018

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
@grokify grokify changed the title No top level Event struct No top level Event struct due to polymorphism Feb 11, 2018
@grokify
Copy link
Owner Author

grokify commented Jul 16, 2018

OpenAPI Generator has a discussion here:

OpenAPITools/openapi-generator#15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant