split EC format into its own json schema file#637
Open
hl662 wants to merge 2 commits into
Open
Conversation
ColinKerr
reviewed
Dec 22, 2025
| "type": "object", | ||
| "required": ["precision", "type"], | ||
| "allOf": [ | ||
| { "$ref": "https://dev.bentley.com/json_schemas/ec/32/schemaitem#/definitions/schemaItemProperties" }, |
Contributor
There was a problem hiding this comment.
Do all the properties of a schema item type really belong in this base format definition that will be shared with FormatSets?
Contributor
Author
There was a problem hiding this comment.
good point... I removed inheriting all of schema item's properties, reducing them to just the name (which references EC name), description and displayLabel. This way the format sets won't require schemaItemType
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors how the EC3.2 Format schema is defined and referenced in the JSON schema files. The main change is to move the
Formatdefinition out ofecschema-item.schema.jsonand into its own dedicated file,ecschema-format.schema.json, and update all references accordingly. This modularizes the schema, making it easier to maintain and reuse.Schema modularization and reference updates:
Formatdefinition fromecschema-item.schema.json, eliminating redundancy and simplifying the main schema file.ecschema-format.schema.json, containing the full definition of theFormatschema item, including all properties and constraints.ecschema-item.schema.jsonto point to the new externalFormatschema athttps://dev.bentley.com/json_schemas/ec/32/format#instead of the previous internal definition.A question that might be asked: The Format has references to the base SchemaItem properties, while SchemaItem has an 'allOf' property that includes the Format. Would this case of bidirectional (or circular) references cause an issue? No, this is a common scenario with json schemas that are supported.
From json-schema rfc, the scenario above will not cause a recursion problem, only when two bidrectional schemas use $allOf would this be a problem.