Skip to content

Generated untyped JSON is not handled by OpenAPI spec parser聽#295

Open

Description

@sbreatnach

馃憢 When attempting to deserialise the OpenApi type from a simple JSON spec generated by aide, it fails with the error data did not match any variant of untagged enum ReferenceOr. FWIW the same spec is parsed without issue by redocly.

This is the spec that's failing:

{
  "openapi": "3.1.0",
  "info": {
    "title": "Test Integration",
    "description": "Good stuff.",
    "version": ""
  },
  "paths": {
    "/v1": {
      "get": {
        "responses": {
          "200": {
            "description": "",
            "content": { "application/json": { "schema": true } }
          },
          "500": { "description": "Internal server error" }
        }
      }
    }
  },
  "components": {}
}

I've created a simple repo to show how I'm generating this spec with aide and a test to reproduce the issue.
Apologies if this has been reported elsewhere, I couldn't find any existing issues on this.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions