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

📗 WP-Builder: Schema Collections #25

Open
bangank36 opened this issue Jul 8, 2023 · 1 comment
Open

📗 WP-Builder: Schema Collections #25

bangank36 opened this issue Jul 8, 2023 · 1 comment
Labels
documentation Improvements or additions to documentation

Comments

@bangank36
Copy link
Owner

bangank36 commented Jul 8, 2023

Summary

  • Use this issue as dedicated place for the example sets of schema to be referenced in other issues

Reference

@bangank36 bangank36 added the documentation Improvements or additions to documentation label Jul 8, 2023
@bangank36
Copy link
Owner Author

bangank36 commented Jul 8, 2023

Description

  • Nested schema for NavigatorLayout implementation

Schema

{
  type: "object",
  properties: {
    address: {
      type: 'object',
      properties: {
        street_address: { type: 'string' },
        city: { type: 'string' },
        state: { type: 'string' },
        country: {
          type: 'object',
          properties: {
            name: { type: 'string' },
          }
        }
      }
    },
    business: {
      type: 'object',
      properties: {
        job: { type: 'string' }
      }
    }
  },
};

UISchema

{
  type: "NavigatorLayout",
  elements: [
    {
      type: 'VerticalLayout',
      elements: [
        {
          type: 'Control',
          scope: '#/properties/address',
        },
        {
          type: 'Control',
          scope: '#/properties/business',
        }
      ],
    }
  ],
}

Data

{
    "address": {
        "street_address": "4/3 Malibu",
        "city": "Vice City",
        "country": {
            "name": "US"
        },
        "state": "Florida"
    },
    "business": {
        "job": "Engineer"
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
Status: Backlog
Development

No branches or pull requests

1 participant