lottie / lottie-spec

Lottie Animation format documentation and tools
https://lottie.github.io/lottie-spec/
35 stars 9 forks source link

Proposal: URI feature syntax #49

Open b-wils opened 1 month ago

b-wils commented 1 month ago

Discussed in https://github.com/lottie/lottie-spec/discussions/3

Originally posted by **mbasaglia** November 28, 2023 We need a way of referencing objects, properties, etc within the specs. This is useful in several places, for example profile definitions (#1) and [can-i-lottie](https://github.com/lottie-animation-community/caniuse/). Assuming the schema in #2 is merged, I propose using URI-references similar to what `$ref` would use in the schema to refer to a specific definition. Examples: ``` #/$defs/shapes/rectangle #/$defs/shapes/rectangle/position ``` These are technically relative to the schema but I don't think they need to be fully qualified. For profile definitions I propose using the notation described above to include parts of the schema, and the `!` prefix to exclude specific definitions.
jbeta51 commented 3 weeks ago

As discussed in the weekly spec meeting, we're moving this discussion to a post-1.0 timeline. We'll keep this open and revisit this when we start discussing profiles.