-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Description
While declaring an endpoint, one can omit operation, which means the API call is to be skipped, and the fulfillment will depend on pre/post processing https://docs.api3.org/reference/ois/latest/processing.html#skip-the-api-call This works fine, but there are some issues with the implementation
| if (!endpoint.operation && isEmpty(endpoint.fixedOperationParameters)) { |
- The implementation require
operationto not be defined andfixedOperationParametersto be empty to skip the call. Instead, the implementation should only requireoperationto not be defined, and the fact thatfixedOperationParametersis empty should be validated. - The implementation throws if
operationis not defined and both pre-processing and post-processing are empty. These should be validated instead of checking at runtime. - When an endpoint doesn't define an
operation, none of its parameters should have anoperationParameterdefined. It's currently not possible to not define anoperationParameterfor an endpoint parameter, so the only way to use this feature is to map these endpoints to dummy operation parameters. This issue is not specific to skipping API calls and is tracked in Allow endpoint parameters to not be mapped to operation parameters #1800
Metadata
Metadata
Assignees
Labels
No labels