-
Notifications
You must be signed in to change notification settings - Fork 13
feat(next): group-array field support #177
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
base: main
Are you sure you want to change the base?
Conversation
… group arrays don't work yet
next/src/field/array.ts
Outdated
} | ||
|
||
if (schema.description !== undefined) { | ||
field.description = schema.description |
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: We should spread all schema keys (except items
) down to field
, why did you decide to not do it?
For example, if I pass x-foo
, it will be ignored by JSF.
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.
Good catch, that was not intentional. I've just pushed a change that reuses the same logic for propagating schema props to fields while excluding certain keywords.
This also simplifies field generation a bit by removing the object special case as well as the array special case which
41d63be
to
541f8ee
Compare
This adds support for generating fields for
{"type":"array"}
schemas which includes:items
subschema is anobject
schema)items
subschema is anything else e.g.{"type": "array", "items": {"type": "string}}