Skip to content

Unable to dereference an schema 'alias' #79

@josh-burton

Description

@josh-burton

This is a valid OpenApi schema setup, where a schema is essentially just an alias to a primitive type:

    "schemas": {
      "MyAlias": {
        "type": "string"
      },
      "MyObject": {
        "type": "object",
        "properties": {
          "myField": {
            "$ref": "#/components/schemas/MyAlias"
          }
        }
      }
    }

Currently the schema.deference method is unable to dereference MyAlias to the underlying schema type (string). Instead it returns the original object schema.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions