Skip to content

Support top level $ref in combination with other declarations #79

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
wol-soft opened this issue Aug 19, 2024 · 0 comments · Fixed by #80
Closed

Support top level $ref in combination with other declarations #79

wol-soft opened this issue Aug 19, 2024 · 0 comments · Fixed by #80
Assignees
Labels
bug Something isn't working

Comments

@wol-soft
Copy link
Owner

Describe the bug

The provided schema creates an object containing only the properties from the $ref

Expected behavior
An object with all four properties (name, age, street and zip) should be generated.

Schema

{
  "definitions": {
    "location": {
      "type": "object",
      "properties": {
        "street": {
          "type": "string",
          "minLength": 2
        },
        "zip": {
          "type": "integer"
        }
      },
      "required": [
        "street"
      ]
    }
  },
  "$id": "Person",
  "type": "object",
  "properties": {
    "name": {
      "type": "string",
      "description": "The name of the person",
      "example": "Lawrence"
    },
    "age": {
      "type": "integer",
      "description": "The age of the person",
      "example": 42
    }
  },
  "$ref": "#/definitions/location",
  "required": [
    "name"
  ]
}
@wol-soft wol-soft self-assigned this Aug 19, 2024
@wol-soft wol-soft added the bug Something isn't working label Aug 19, 2024
@wol-soft wol-soft linked a pull request Aug 19, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant