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

Types of properties in 'extensions' in the property reference #2158

Open
javagl opened this issue May 14, 2022 · 3 comments · May be fixed by CesiumGS/wetzel#88
Open

Types of properties in 'extensions' in the property reference #2158

javagl opened this issue May 14, 2022 · 3 comments · May be fixed by CesiumGS/wetzel#88
Assignees
Milestone

Comments

@javagl
Copy link
Contributor

javagl commented May 14, 2022

The mesh.primitive.attributes schema declares

            "additionalProperties": {
                "$ref": "glTFid.schema.json"
            }

and the mesh.primitive.attributes property reference shows this as

Type of each property: integer

In contrast to that, the extension schema declares

    "additionalProperties": {
        "type": "object"
    }

and the property reference for this - which is inlined into all property references, for example, the mesh.primitive.extensions property reference - shows this as

Type of each property: Extension

Shouldn't this "type of each property" be object instead?

(This came up via CesiumGS/wetzel#68 (comment) )

@lexaknyazev lexaknyazev added this to the 2.0.x milestone May 14, 2022
@lexaknyazev
Copy link
Member

Shouldn't this "type of each property" be object instead?

Good catch. Yes, members of the extensions object should be of object type (as Extension is not a JSON-Schema type at all).

@javagl
Copy link
Contributor Author

javagl commented May 14, 2022

One could argue about the term "JSON-Schema type" here, and rather say that in the first case, the text should say

Type of each property: glTFid

but with the caveat that glTFid does not appear in the property reference, but only in the schema reference. (It is listed as one of the "ignored types" when creating the property reference).

Or to put it that way: Iff there was a structure with

"additionalProperties": {
    "$ref": "buffer.schema.json"
}

then it should not say object, but a link to buffer at this point. At least, I think that the current output is indeed the result of an attempt to exactly do this sort of cross-linking between types. (IIRC, there is no case where this is relevant for glTF - here, it will always be object in these cases - but I'm trying to get a better understanding for wetzel right now...)

@javagl
Copy link
Contributor Author

javagl commented Oct 10, 2023

@lexaknyazev You had assigned that to yourself - not sure whether that was intentional - but it should be addressed (together with #2165 ) in CesiumGS/wetzel#88 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants