-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
Ajv validation inside allOf #481
Comments
Will it be fixed by #480 |
@climba03003 No, it's a different issue. |
This problem happens when we add a schema that contains |
@climba03003 It turns out that #480 fixed this, despite the fact that they are different problems. #480 has a small bug. I fixed it here #482. |
FWIW, I think I encountered this issue too while using a schema similar to this (observed in 5.0.4, unrelated to #479): {
"type": "object",
"required": [
"list"
],
"properties": {
"list": {
"type": "array",
"items": {
"type": "object",
"allOf": [
{
"type": "object",
"required": [
"value"
],
"properties": {
"value": {
"anyOf": [
{
"type": "string",
"const": "one"
},
{
"type": "string",
"const": "two"
}
]
}
}
}
]
}
}
}
} Error: no schema with key or ref "merged_d63d76d2-7f36-4b28-8997-579e7e46cfdb#/properties/list/items/properties/value/anyOf/0"
at Ajv.validate (..../node_modules/ajv/lib/core.ts:359:21)
at anonymous2 (eval at build (..../node_modules/fast-json-stringify/index.js:177:23), <anonymous>:30:20)
at anonymous1 (eval at build (..../node_modules/fast-json-stringify/index.js:177:23), <anonymous>:64:17)
at anonymous0 (eval at build (..../node_modules/fast-json-stringify/index.js:177:23), <anonymous>:92:15)
at main (eval at build (..../node_modules/fast-json-stringify/index.js:177:23), <anonymous>:6:15)
at Object.<anonymous> (..../src/index.ts:345:27)
at Module._compile (node:internal/modules/cjs/loader:1105:14)
at Module.m._compile (..../node_modules/ts-node/src/index.ts:1597:23)
at Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
at Object.require.extensions.<computed> [as .ts] (..../node_modules/ts-node/src/index.ts:1600:12) |
Does it work with this fix? |
Yep! #482 fixes it for me too. |
Prerequisites
Issue
There is a fastify issue fastify/fastify#4092
I reduced the test example.
I'm working on that.
The text was updated successfully, but these errors were encountered: