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

The meta-model does not require that schema artifacts should require all the necessary fields in the @contexts of instances #146

Open
martinjoconnor opened this issue Mar 12, 2024 · 0 comments
Assignees

Comments

@martinjoconnor
Copy link
Member

martinjoconnor commented Mar 12, 2024

Schema artifacts have have a JSON Schema specification for the contents of the @context in their corresponding instances.

However, the meta model does not require that the schema artifacts require that the specified fields are actually present in the intance contexts.

For example, the meta-schema specification for template a /properties/@context specification looks like the following:

{
    "description": "Meta-schema that describes the schema of a '@context' field in a 'properties' field in a template",
    "type": "object",
    "properties": {
        "type": { "type": "string", "enum": [ "object" ] },
        "properties": { "$ref": "file:templateContextPropertiesFieldContent.json" },
        "required": { "$ref": "file:stringArray.json" },
        "additionalProperties": {
          "oneOf": [
            { "$ref": "file:falseOnlyAdditionalProperties.json" },
            { "$ref": "file:uriOnlyAdditionalProperties.json" }
          ]
        }
    },
    "required": [ "type", "properties", "additionalProperties" ],
    "additionalProperties": false
}

The specification for required is:

 "required": { "$ref": "file:stringArray.json" },

It should list the required properties so that template forces them to be in insance @context specifications.

Similar problem for elements and fields.

@martinjoconnor martinjoconnor self-assigned this Mar 12, 2024
@martinjoconnor martinjoconnor changed the title Schema artifacts do not require all necessary fields in the @contexts of instances The meta-model does not require that schema artifacts should require all the necessary fields in the @contexts of instances Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant