You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.
Would like to be able to define a default value for a resource parameter so that if it is not passed, it will be defaulted. Use case: a trait that has a standard min/max/default value, but that can be overridden if necessary. For example, a trait that adds query parameters to a list api. this would have query parameters for offset and limit. Limit would have a default value for the number of returned records, and a maximum number allowed. I would like to define this in the trait. Then, if I have an endpoint that needs to change those numbers (for example, raise it because there is a larger amount of smaller data) I can override the default
Current workaround:
Create two traits: One with resource parameters, and one without that calls the first one and passes in values. This requires duplicated traits to exist and be maintained though
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Would like to be able to define a default value for a resource parameter so that if it is not passed, it will be defaulted. Use case: a trait that has a standard min/max/default value, but that can be overridden if necessary. For example, a trait that adds query parameters to a list api. this would have query parameters for
offset
andlimit
. Limit would have a default value for the number of returned records, and a maximum number allowed. I would like to define this in the trait. Then, if I have an endpoint that needs to change those numbers (for example, raise it because there is a larger amount of smaller data) I can override the defaultCurrent workaround:
Create two traits: One with resource parameters, and one without that calls the first one and passes in values. This requires duplicated traits to exist and be maintained though
The text was updated successfully, but these errors were encountered: