Skip to content

Are empty schemas represented by the boolean value true supported? #74

@SmarakNayak

Description

@SmarakNayak

The 3.1.1 specs state:

The Schema Object allows the definition of input and output data types. These types can be objects, but also primitives and arrays. This object is a superset of the JSON Schema Specification Draft 2020-12. The empty schema (which allows any instance to validate) MAY be represented by the boolean value true and a schema which allows no instance to validate MAY be represented by the boolean value false.

I was wondering if you had plans to support this functionality? It doesn't seem to work with this simple test case

{  
  "openapi": "3.1.0",
  "info": {
    "title": "Any Value Schema Example",
    "version": "1.0.0"
  },
  "paths": {
    "/example": {
      "get": {
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "application/json": {
                "schema": true
              }
            }
          }
        }
      }
    }
  }
}

TypeError: schema is not an Object. (evaluating '"type" in schema')

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