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

Get all properties under a section #364

Open
rajsenthil opened this issue Apr 30, 2023 · 0 comments
Open

Get all properties under a section #364

rajsenthil opened this issue Apr 30, 2023 · 0 comments

Comments

@rajsenthil
Copy link

I have json schema as given below

{
  "$schema": "http://json-schema.org/draft-07/schema",
  "$id": "https://example.com/product.schema.json",
  "title": "Demo",
  "description": "Demo properties and its definition",
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "nested-prop": {
      "type": "object",
      "properties": {
        "id": {
          "type": "string",
          "description": "A unique id and cane be used in UI forms for an 'id' attribute "
        },
        "name": {
          "type": "string",
          "description": "handler name. This name can be used in UI form for 'name' attribute"
        },
        "label": {
          "type": "string",
          "description": "Label is used for displaying purpose. It is visible for example in UI forms"
        },
        "target": {
          "type": "string",
          "description": "'target' is a target service that validates and take actions"
        }
      },
      "required": ["id", "name", "label", "target"]
    }
  },
  "required": ["nested-prop"]
}

Is there a way, to get all the properties under nested-prop in some way ["id", "name", "label", "target"]?

Please let me know

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