Skip to content

[codex] Let hide_fields override show_fields#443

Draft
xantrac wants to merge 1 commit into
ash-project:mainfrom
xantrac:codex/show-fields-relationships
Draft

[codex] Let hide_fields override show_fields#443
xantrac wants to merge 1 commit into
ash-project:mainfrom
xantrac:codex/show-fields-relationships

Conversation

@xantrac

@xantrac xantrac commented Jun 19, 2026

Copy link
Copy Markdown

Summary

Aligns show_fields with the merged hide_fields runtime visibility implementation from #442.

  • Allows a field to appear in both show_fields and hide_fields.
  • Keeps the existing show_field?/2 precedence where hide_fields wins.
  • Updates DSL docs to state the precedence explicitly.
  • Adds runtime, OpenAPI, and JSON Schema coverage proving hidden fields remain hidden even when listed in show_fields.

Validation

Passed with local available toolchain ASDF_ELIXIR_VERSION=1.19.0-otp-28 ASDF_ERLANG_VERSION=28.1:

  • mix spark.formatter
  • mix format --check-formatted
  • mix compile --warnings-as-errors
  • mix test test/acceptance/field_visibility_test.exs
  • mix test test/acceptance/open_api_test.exs
  • mix test test/acceptance/json_schema_test.exs
  • mix test test/acceptance/get_test.exs test/acceptance/index_test.exs test/acceptance/get_related_test.exs test/spec_compliance/fetching_data/inclusion_of_related_resources_test.exs
  • mix docs

Full mix test was also run, but it currently fails in existing pagination tests with a Xema/Regex exported pattern error under the local Elixir/Erlang versions. The repository-pinned patch versions were not installed locally.

@xantrac xantrac changed the title [codex] Add JSON API show field allowlists [codex] Add JSON API show_fields allowlist Jun 19, 2026
@xantrac xantrac changed the title [codex] Add JSON API show_fields allowlist Add JSON API show_fields allowlist Jun 19, 2026
@xantrac xantrac force-pushed the codex/show-fields-relationships branch from 533623d to 6230e49 Compare June 19, 2026 16:22
@xantrac xantrac changed the title Add JSON API show_fields allowlist [codex] Let hide_fields override show_fields Jun 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant