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

Feature request: support for x-discriminator #70

Closed
RomanHotsiy opened this issue May 22, 2018 · 4 comments
Closed

Feature request: support for x-discriminator #70

RomanHotsiy opened this issue May 22, 2018 · 4 comments

Comments

@RomanHotsiy
Copy link

swagger2openapi converts x-required, x-nullable and a few others vendor extensions to corresponding OpenAPI 3 features.

Would be great to also support x-discriminator:

x-discriminator:
  propertyName: type
  mapping:
    visa: "#/definitions/paymentMethodVisa"
    mastercard: "#/definitions/paymentMethodMastercard"
    amex: "#/definitions/paymentMethodAmex"

One of the things to not forget is to map JSON pointers from mapping field to new locations.

@MikeRalphson
Copy link
Contributor

@RomanGotsiy will be included in the next release.

@leonardehrenfried
Copy link

leonardehrenfried commented Jun 26, 2018

Hello @MikeRalphson, thanks for this great library!

I'm eagerly awaiting the next release. When have you planned on doing this?

(Sorry to be a pest!)

@MikeRalphson
Copy link
Contributor

HI @leonardehrenfried - thanks, and you're not being a pest! I'm kind of waiting on lerna 3 to come out of beta, to try and ensure there are no problems publishing from a new mono-repo layout. If it drags on too long, I'll bite the bullet and attempt to publish the new version.

@MikeRalphson
Copy link
Contributor

Included in swagger2openapi v3.0.x.

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

No branches or pull requests

3 participants