Fix object type thing + config for backwards compat + a regression in deps update#413
Merged
zachdaniel merged 3 commits intoash-project:mainfrom Feb 3, 2026
Merged
Fix object type thing + config for backwards compat + a regression in deps update#413zachdaniel merged 3 commits intoash-project:mainfrom
zachdaniel merged 3 commits intoash-project:mainfrom
Conversation
The filter schema type `deepObject` is technically invalid per the
OpenAPI spec (it's only valid for the `style` property, not `type`),
but works better with Swagger UI.
This adds a config option to opt-in to the spec-compliant `object` type:
config :ash_json_api, correct_filter_schema_type?: true
The default remains `deepObject` for backwards compatibility with
Swagger UI.
zachdaniel
reviewed
Feb 2, 2026
documentation/topics/open-api.md
Outdated
| By default, the filter schema uses `deepObject` as its type, which works well with Swagger UI but is technically invalid per the OpenAPI spec (`deepObject` is only valid for the `style` property, not `type`). If you need a spec-compliant schema, you can opt-in to use the correct `object` type: | ||
|
|
||
| ```elixir | ||
| config :ash_json_api, correct_filter_schema_type?: true |
Contributor
There was a problem hiding this comment.
Might be more clear like use_deep_object_for_filter_type?: false, defaulting to true? Name doesn't say much on its own about what it does.
Contributor
Author
There was a problem hiding this comment.
Force pushed a new variant based on this feedback
The filter schema type `deepObject` is technically invalid per the
OpenAPI spec (it's only valid for the `style` property, not `type`),
but works better with Swagger UI.
This adds a config option to opt out of the `deepObject` type:
config :ash_json_api, use_deep_object_for_filter_type?: false
The default remains `deepObject` (true) for backwards compatibility
with Swagger UI.
Update tests to include the new filter operators added in recent Ash versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contributor checklist
Leave anything that you believe does not apply unchecked.