loopbackio / loopback-next

LoopBack makes it easy to build modern API applications that require complex integrations.
https://loopback.io
Other
4.97k stars 1.07k forks source link

fix(docs): clarify defaultFn #10625

Closed aaqilniz closed 3 months ago

aaqilniz commented 3 months ago

In the case of the defaultFn property, setting generated to true or setting required to true fails the request. This PR updates the docs and mentions not to set these options in the case of defaultFn.

The confusion arises from the fact that generated represents a field automatically generated. In the case of default, we can set the required to true but not in the case of defaultFn.

Checklist

👉 Check out how to submit a PR 👈