Skip to content
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

fix: required fields are not required in schema when they have default values #1185

Conversation

realSpok
Copy link
Contributor

@realSpok realSpok commented Sep 30, 2024

https://community.forestadmin.com/t/migration-to-forestadmin-agent-problems-with-not-null-default-value-fields/7475
#86c0fy2u0

Definition of Done

General

  • Write an explicit title for the Pull Request, following Conventional Commits specification
  • Test manually the implemented changes
  • Validate the code quality (indentation, syntax, style, simplicity, readability)

Security

  • Consider the security impact of the changes made

Copy link

codeclimate bot commented Sep 30, 2024

Code Climate has analyzed commit 965a082 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (98% is the threshold).

This pull request will bring the total coverage in the repository to 97.5%.

View more on Code Climate.

@realSpok realSpok changed the title fix: fields required are required in schema even if they have default values fix: required fields are not required in schema when they have default values Sep 30, 2024
Copy link
Member

@Thenkei Thenkei left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • ✅ Code review - As I said we need an additional fix on top of this one to propose a clean experience when it come to record creation with a field default value being a function. So let's merge that one and add the additional way to know when there's a defaultValueFunction. 🚀
    • ✅  The PR tackle one subject only
  • ✅ Automatic tests
  • ✅ Manual tests
  • ✅ PR title
  • ✅ PR linked to the clickup task

@realSpok realSpok merged commit a5501fc into main Oct 9, 2024
22 checks passed
@realSpok realSpok deleted the fix/fields-required-are-required-in-schema-even-if-they-have-default-values branch October 9, 2024 07:06
forest-bot added a commit that referenced this pull request Oct 9, 2024
## [1.11.3](https://github.com/ForestAdmin/agent-nodejs/compare/example@1.11.2...example@1.11.3) (2024-10-09)

### Bug Fixes

* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
@forest-bot
Copy link
Member

🎉 This PR is included in version 1.11.23 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

forest-bot added a commit that referenced this pull request Oct 9, 2024
forest-bot added a commit that referenced this pull request Oct 9, 2024
## [1.10.3](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sequelize@1.10.2...@forestadmin/datasource-sequelize@1.10.3) (2024-10-09)

### Bug Fixes

* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
* search hook with layout ([#1187](#1187)) ([e75a06e](e75a06e))

### Features

* support static action forms with layout ([#1182](#1182)) ([92011d8](92011d8))
forest-bot added a commit that referenced this pull request Oct 9, 2024
## [1.14.29](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-sql@1.14.28...@forestadmin/datasource-sql@1.14.29) (2024-10-09)

### Bug Fixes

* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
* search hook with layout ([#1187](#1187)) ([e75a06e](e75a06e))

### Features

* support static action forms with layout ([#1182](#1182)) ([92011d8](92011d8))
@forest-bot
Copy link
Member

🎉 This PR is included in version 1.11.3 🎉

The release is available on example@1.11.3

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.4.4 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.10.3 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

@forest-bot
Copy link
Member

🎉 This PR is included in version 1.14.29 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

forest-bot added a commit that referenced this pull request Oct 9, 2024
## [1.50.1](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/agent@1.50.0...@forestadmin/agent@1.50.1) (2024-10-09)

### Bug Fixes

* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
@forest-bot
Copy link
Member

🎉 This PR is included in version 1.50.1 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.55.1](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-customizer@1.55.0...@forestadmin/datasource-customizer@1.55.1) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.1.36](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-dummy@1.1.35...@forestadmin/datasource-dummy@1.1.36) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.8.4](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-mongoose@1.8.3...@forestadmin/datasource-mongoose@1.8.4) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
* search hook with layout ([#1187](#1187)) ([e75a06e](e75a06e))

### Features

* support static action forms with layout ([#1182](#1182)) ([92011d8](92011d8))
forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.42.1](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/datasource-toolkit@1.42.0...@forestadmin/datasource-toolkit@1.42.1) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
* search hook with layout ([#1187](#1187)) ([e75a06e](e75a06e))

### Features

* support static action forms with layout ([#1182](#1182)) ([92011d8](92011d8))
@forest-bot
Copy link
Member

🎉 This PR is included in version 1.3.24 🎉

The release is available on npm package (@latest dist-tag)

Your semantic-release bot 📦🚀

forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.34.1](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/forestadmin-client@1.34.0...@forestadmin/forestadmin-client@1.34.1) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
* search hook with layout ([#1187](#1187)) ([e75a06e](e75a06e))

### Features

* support static action forms with layout ([#1182](#1182)) ([92011d8](92011d8))
forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.4.4](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/plugin-aws-s3@1.4.3...@forestadmin/plugin-aws-s3@1.4.4) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.1.7](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/plugin-export-advanced@1.1.6...@forestadmin/plugin-export-advanced@1.1.7) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
forest-bot added a commit that referenced this pull request Oct 10, 2024
## [1.3.4](https://github.com/ForestAdmin/agent-nodejs/compare/@forestadmin/plugin-flattener@1.3.3...@forestadmin/plugin-flattener@1.3.4) (2024-10-10)

### Bug Fixes

* missing exported type ([#1192](#1192)) ([7e26bd9](7e26bd9))
* **permissions:** properly check permissions when dissociating or deleting related resources ([#1190](#1190)) ([211fd1f](211fd1f))
* required fields are not required in schema when they have default values ([#1185](#1185)) ([a5501fc](a5501fc))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants