Skip to content

oneOf not working as expected #443

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

Closed
jknapka opened this issue May 13, 2015 · 3 comments
Closed

oneOf not working as expected #443

jknapka opened this issue May 13, 2015 · 3 comments

Comments

@jknapka
Copy link

jknapka commented May 13, 2015

The spec below was cut and pasted from this issue: OAI/OpenAPI-Specification#298, but the Swagger editor doesn't like the "oneOf". I have a complex API composed using the Swagger editor back in February 2015, which worked fine at that time. In the current editor it is completely broken because it uses oneOf extensively. Was support for oneOf removed for some reason? If so, how can I adjust my spec to achieve the same effect?

swagger: '2.0'
info:
  version: 1.0.0
  title: Overloading example
paths:
  /:
    get:
      responses:
        200:
          description: Bug?
          oneOf:
            - description: Returns a string
              schema:
                type: string
            - description: Returns a number
              schema:
                type: integer
@webron
Copy link
Contributor

webron commented May 13, 2015

@jknapka - Swagger spec doesn't support oneOf...

@webron
Copy link
Contributor

webron commented May 13, 2015

What you linked to is a proposal for the next version of the Swagger specification. It's not part of it.

@jknapka
Copy link
Author

jknapka commented May 13, 2015

OK... Then I apologize for raising this issue. However, I'm very confused, because when I started using Swagger, back in late February, I needed oneOf and used it, and it worked fine.

@jknapka jknapka closed this as completed May 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants