-
Notifications
You must be signed in to change notification settings - Fork 0
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
Fix json schema #11
base: dev
Are you sure you want to change the base?
Fix json schema #11
Conversation
lottie-web/build/extension/bodymovin/jsx/utils/keyframeHelper.jsx Lines 192 to 210 in 7ce8f61
valueKeyframe's i property can be array or object at the same time |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
我 local 試跑會發生
FileNotFoundError: [Errno 2] No such file or directory: '../docs/json/effects/checkbox.json'
正常嗎~?
已修正.. |
結果我還有 FileNotFoundError: [Errno 2] No such file or directory: '../docs/json/properties/Value.json' |
有的地方是用 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
應該還沒有要全部支援?
不知道是 bug 還是 feature 的:
- transform (ks) 跟 transform 的第一層 property 沒有 description
已經可以正常生出 schema 了,但目前看過去還有缺一些:
- shape layer 的 shapes/bounds
- comp layer 的 w/h
- transform 的 r 好像資料裡跟定義的不太一樣,資料裡好幾個 property 都是在 array 裡
很多要修的.. 不知道為什麼會錯那麼多 |
|
結論
|
d3da621
to
a38fd01
Compare
fix bugs in lottie-web jsonschema and add schema annoiation
usage
python annoate.py [filepath]
will generate a lottie animate schema file for the input filepath
e.g.
python annotate.py ..\demo\adrock\data.json
bugs
nm
type should bestring
ty
type should beconst
NOTE: jsonschema python package not work
the
properties
key will conflict with jsonschema keywords and #/properties/***Using $id with $ref
$id also provides a way to refer to subschema without using JSON Pointer. This means you can refer to them by a unique name, rather than by where they appear in the JSON tree.
Reusing the address example above, we can add an $id property to the address schema, and refer to it by that instead.
Note
This functionality isn’t currently supported by the Python jsonschema library.