You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These definitions are structurally equal, and only differ in the title and description. (Except for one accidental difference - and that's one argument for avoiding this sort of duplication...). We should consider combining these to something like a metadataEntity, to only have the schema definition once. I think this could avoid confusion and it could be nicely in line with the textual description. Such a metadataEntity could be created by just moving the common class/properties blocks from the schemas into a common metadataEntity.schema.json.
If we decide to do that, then we have to sort out whether the respective objects (i.e. the tileset, tile.3DTILES_metadata, and group) should then be a metadataEntity, or whether they should contain a metadataEntity.
We could let the tileset then be a metadataEntity. This could happen by letting tileset be "allOf": [ { "$ref": "metadataEntity.schema.json" } ]. In this case, the instance JSON would not change.
Alternatively, the tileset could contain a metadataEntity, as in
The drawback of this, at the first glance, could be a deeper nesting (and having to update existing sample data and inlined snippets). But letting these objects contain a metadataEntity could make it simpler to add specific properties to the tileset, tile.3DTILES_metadata, and group later, and dedicatedly keep these additional properties separate from the metadataEntity.
(An aside: I also thought about whether it could be possible to let the tilesetbe a metadataEntity, and going so far to remove the tileset.schema.json altogether, and always directly refer to the metadataEntity.schema.json instead. But I haven't yet thought through all possible implications of that, so this is not a suggestion, but only mentioned here as something that we might consider).
The text was updated successfully, but these errors were encountered:
I have created a DRAFT for such a metadataEntity in #608 .
Until now, the tileset, tile.3DTILES_metadata, and groupare a metadataEntity. If this is the preferred solution, then it raises another question about the structure: Until now, these types are all declared to be
and that makes sense. The new metadataEntity should, in some way, not be a tilesetProperty. There is no reason for that, and these structures could be independent. (And if they could be independent, then they should be independent, because fewer dependencies are usually better).
The problem is that then, the existing structures would have to be
but this implies "multiple inheritance". (Yes, I know, it's JSON Schema, and thus, not really "inheritance", but let's keep the real world and some code generators in mind here). That's another question where I haven't thought through all possible paths, options, and implications, but maybe we can find a sensible solution here.
I'm good with the approach in #608. Each metadata entity still gets its own schema which allows additional properties to be added in the future. I prefer not having the nested metadataEntity object.
The specification currently says
Such entities can appear on different levels. Right now, the JSON schema definition for the structure of an entity exists in
tileset.schema.json
,tile.3DTILES_metadata.schema.json
andgroup.schema.json
.These definitions are structurally equal, and only differ in the title and description. (Except for one accidental difference - and that's one argument for avoiding this sort of duplication...). We should consider combining these to something like a
metadataEntity
, to only have the schema definition once. I think this could avoid confusion and it could be nicely in line with the textual description. Such ametadataEntity
could be created by just moving the commonclass
/properties
blocks from the schemas into a commonmetadataEntity.schema.json
.If we decide to do that, then we have to sort out whether the respective objects (i.e. the
tileset
,tile.3DTILES_metadata
, andgroup
) should then be ametadataEntity
, or whether they should contain ametadataEntity
.For example, the
tileset.schema.json
currently isAnd an instance of that could be
We could let the
tileset
then be ametadataEntity
. This could happen by lettingtileset
be"allOf": [ { "$ref": "metadataEntity.schema.json" } ]
. In this case, the instance JSON would not change.Alternatively, the
tileset
could contain ametadataEntity
, as inThis would mean that the instance would become
The drawback of this, at the first glance, could be a deeper nesting (and having to update existing sample data and inlined snippets). But letting these objects contain a
metadataEntity
could make it simpler to add specific properties to thetileset
,tile.3DTILES_metadata
, andgroup
later, and dedicatedly keep these additional properties separate from themetadataEntity
.(An aside: I also thought about whether it could be possible to let the
tileset
be ametadataEntity
, and going so far to remove thetileset.schema.json
altogether, and always directly refer to themetadataEntity.schema.json
instead. But I haven't yet thought through all possible implications of that, so this is not a suggestion, but only mentioned here as something that we might consider).The text was updated successfully, but these errors were encountered: