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

Enum with null entry triggers "too much recursion" error #507

Closed
wking opened this issue Jun 25, 2015 · 2 comments
Closed

Enum with null entry triggers "too much recursion" error #507

wking opened this issue Jun 25, 2015 · 2 comments
Milestone

Comments

@wking
Copy link
Contributor

wking commented Jun 25, 2015

If I point swagger-ui v2.1.0 at the following spec:

{
  "swagger": "2.0",
  "definitions": {
    "pet": {
      "type": "object",
      "properties": {
        "species": {
          "type": "string",
          "enum": [
            null,
            "cat",
            "dog"
          ]
        }
      }
    }
  }
}

I get a too much recursion error pointing at resolveAllOf. The JSON Schema spec says for enums:

Elements in the array MAY be of any type, including null.

@webron
Copy link
Contributor

webron commented Jun 25, 2015

null is not a valid value in Swagger. We don't support full JSON Schema. Please follow OAI/OpenAPI-Specification#229.

@wking
Copy link
Contributor Author

wking commented Jun 25, 2015

On Thu, Jun 25, 2015 at 09:56:07AM -0700, Ron wrote:

null is not a valid value in Swagger. We don't support full JSON
Schema. Please follow
OAI/OpenAPI-Specification#229.

I'm clear on this for Swagger 2.0 now, and I just submitted #508 here
to make it easier for other folks to find this information. Between
OAI/OpenAPI-Specification#229 and #508, I think this is closable.

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

2 participants