Skip to content

fix: Fix schema generation for calculcations marked with allow_nil?: false - #449

Open
Rutgerdj wants to merge 2 commits into
ash-project:mainfrom
Rutgerdj:bugs/fix-non-nil-calculations-schema
Open

fix: Fix schema generation for calculcations marked with allow_nil?: false#449
Rutgerdj wants to merge 2 commits into
ash-project:mainfrom
Rutgerdj:bugs/fix-non-nil-calculations-schema

Conversation

@Rutgerdj

Copy link
Copy Markdown

This PR fixes an issue where the schema that was generated for a calculcation with allow_nil?: false had a wrong type:
Before:
image
After:
image

Fixed it by adding the
Ash.Resource.Info.public_calculations(resource) to the required_attributes functions.

Contributor checklist

Leave anything that you believe does not apply unchecked.

  • I accept the AI Policy, or AI was not used in the creation of this PR.
  • Bug fixes include regression tests
  • Chores
  • Documentation changes
  • Features include unit/acceptance tests
  • Refactoring
  • Update dependencies

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