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

Nested definitions is not supported #15

Open
sankoshine opened this issue Apr 29, 2020 · 0 comments
Open

Nested definitions is not supported #15

sankoshine opened this issue Apr 29, 2020 · 0 comments

Comments

@sankoshine
Copy link

sankoshine commented Apr 29, 2020

Take a look at following schema:

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Example Schema",
    "description": "This schema is awesome.",
    "type": "object",
    "properties": {
        "lower": {
            "description": "Lower clothing.",
            "oneOf": [
                { "$ref": "#/definitions/pants/ccc" },
                { "$ref": "#/definitions/shorts/ddd" }
            ]
        }
    },
    "definitions": {
        "pants": {
            "ccc": { "description": "Long on the legs.", "type": "string" }
        },
        "shorts": {
            "ddd": { "description": "Short on the legs.", "type": "string" }
        }
    }
}

And the output:

# Example Schema

This schema is awesome.

The schema defines the following properties:

## `lower`

Lower clothing.

The object must be one of the following types:

* `undefined`
* `undefined`

---

# Sub Schemas

The schema defines the following additional types:

## `pants` (undefined)

## `shorts` (undefined)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant