You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Example generator still truncates nested schemas at level 8 (follow-up to #1160) #1171
#1160 fixed the schema table in 12.0.0, but the example generator schemaToSampleObj still stops at level > 8. Each allOf member counts as a level, so a field that is only 5 properties deep is silently missing from the generated example.
Expected (as in 9.3.8; the schema table in 12.0.0 is already correct)
{
"a": {
"b": {
"c": {
"d": {
"e": "X"
}
}
}
}
}
Actual (12.0.0)
{
"a": {
"b": {
"c": {
"d": {}
}
}
}
}
Cause
schemaToSampleObj in packages/rapidoc/src/utils/schema-utils.js still has if (!schema || level > 8) return; and increments level for every allOf member. Applying the same depth handling as the schema table (#1160), or not counting allOf members as a level, would fix it.
Environment
RapiDoc 12.0.0 (official npm bundle), also reproduced in 11.0.1; correct in 9.3.8
render-style="focused" schema-style="table"
OpenAPI 3.0.3, validated against https://spec.openapis.org/oas/3.0/schema/2021-09-28
Activity