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

Format for defining arrays in schema #210

Open
dbrowngp opened this issue Oct 9, 2023 · 0 comments
Open

Format for defining arrays in schema #210

dbrowngp opened this issue Oct 9, 2023 · 0 comments

Comments

@dbrowngp
Copy link

dbrowngp commented Oct 9, 2023

I am trying to define a schema for JSON that includes an array, could you give me some guidance on the needed format?

Also is there a way to allow data of certain elements to pass though unchecked?

eg

   "context": {
        "name": "com.example.xapi.context",
        "type": "STRUCT",
        "isOptional": false,
        "fieldSchemas": {
            "contextActivities": {
                "name": "com.example.xapi.context.activities",
                "type": "ARRAY",
                "isOptional": false,
                "fieldSchemas": [
                    {
                        "category": {
                            "name": "com.example.xapi.context.activities.category",
                            "type": "STRUCT",
                            "isOptional": false,
                            "fieldSchemas": {
                                "id": {
                                    "type": "STRING",
                                    "isOptional": false
                                }
                            }
                        }
                    }
                ]
            },
            "registration": {
                "type": "STRING",
                "isOptional": true
            }
        }
    }
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