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

draft 07 JSON schema support #3

Open
ghost opened this issue Aug 6, 2019 · 0 comments
Open

draft 07 JSON schema support #3

ghost opened this issue Aug 6, 2019 · 0 comments

Comments

@ghost
Copy link

ghost commented Aug 6, 2019

I noticed that the form for nested items is not generated properly (if properties attribute is not used for the nested elements), e.g. nested fields are not rendered for the following schema which is taken from https://json-schema.org/learn/miscellaneous-examples.html.

{
  "$id": "https://example.com/arrays.schema.json",
  "$schema": "http://json-schema.org/draft-07/schema#",
  "description": "A representation of a person, company, organization, or place",
  "type": "object",
  "properties": {
    "fruits": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "vegetables": {
      "type": "array",
      "items": { "$ref": "#/definitions/veggie" }
    }
  },
  "definitions": {
    "veggie": {
      "type": "object",
      "required": [ "veggieName", "veggieLike" ],
      "properties": {
        "veggieName": {
          "type": "string",
          "description": "The name of the vegetable."
        },
        "veggieLike": {
          "type": "boolean",
          "description": "Do I like this vegetable?"
        }
      }
    }
  }
}

See screenshot:

Screen Shot 2019-08-06 at 4 13 19 PM

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

0 participants