Comment by amelius
21 hours ago
This is why an API should always have an
"assertions": true
option. Why should normal function calls have assertion/invariant checks, and not API calls?
21 hours ago
This is why an API should always have an
"assertions": true
option. Why should normal function calls have assertion/invariant checks, and not API calls?
This idea looks good. Have you used it in practice? Can you share how?
Yes, you basically use the option whenever you have assertions turned on in your code.
Then the service running the API will do extra checking when the assertions option is true, basically making it less forgiving and following the specification closely.