problem with properties that declare an element beginning with an underscore (or a property named 'enum')
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with lib/jsonschema/store.lua, especially the condition near line 231 and the resolve failure at line 77. Reproduce the issue with the minimal schema shown, then trace how properties beginning with an underscore and a property named "enum" are handled; done means validator generation succeeds without regressing reference resolution.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi,
I was testing a jsonschema that can be simplified to:
{
"type": "object",
"properties": {
"_actions": { "$ref": "#/components/schemas/Actions" }
},
"components": {
"schemas": {
"Actions": {
"type": "object"
}
}
}
}
Trying to generate validator for this schema results in:
lua: ./jsonschema/store.lua:77: attempt to index field 'base' (a nil value)
stack traceback:
./jsonschema/store.lua:77: in function 'resolve'
./jsonschema.lua:167: in function 'validator'
./jsonschema.lua:662: in function 'generate_validator'
./jsonschema.lua:173: in function 'validator'
./jsonschema.lua:1191: in function 'generate_main_validator_ctx'
./jsonschema.lua:1208: in function 'generate_validator'
validate.lua:23: in main chunk
[C]: in ?
which is because of this if condition here: https://github.com/api7/jsonschema/blob/a55072d6f4ae65a1caafea41cffd5464e971234c/lib/jsonschema/store.lua#L231
I cannot understand what is the purpose of this condition? I can try to fix it but i'm afraid to break something else that was supposed to be fixed by it...
- Ngôn ngữ chính
- Lua
- Star
- 136
- Fork
- 29
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của api7/jsonschema
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
api7/jsonschema#95 ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 52/100
api7/jsonschema#105 ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
api7/jsonschema#93 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 42/100
api7/jsonschema#91 ·
-
Support pcre2Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
api7/jsonschema#89 ·
Tất cả issue của api7/jsonschema
Issue tương tự
-
Lid close does not lock the session on Apple Silicon (lid-close bind skips omarchy-system-lid-close)Đang mở
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 90/100
omacom/omarchy-mac#701 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Error fetching 'feeds/si.json'Đang mởimport-issue
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 64/100
public-transport/transitous#2553 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Bug Forever Module - Map / Minimap Needs testing/reproduction
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
Maintainer thường phản hồi trong vòng 1 ngày
-
agent-butler-finding chore
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
codymikol/multiverse.nvim#384 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
2个显示的问题Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
coolsnowwolf/lede#14209 ·