Skip to content

Implement processing v2#32

Merged
Siegrift merged 11 commits intomainfrom
processing-v2
Nov 27, 2023
Merged

Implement processing v2#32
Siegrift merged 11 commits intomainfrom
processing-v2

Conversation

@Siegrift
Copy link
Collaborator

@Siegrift Siegrift commented Nov 18, 2023

Relates to #27

Rationale

The change starts with introducing new processing option in OIS, called preProcessingSpecificationV2 and postProcessingSpecificationV2 respectively. Note, that original issue only talks about post processing, but since we are changing the format is makes sense to also do pre processing.

The new processing code requires user to write a function which accepts the input as first argument and the output is a return value. This function can be both async or sync. See many examples in the tests. There are also tests which take the v1 snippets and convert them to v2.

The old implementation functions are suffixed with V1 version and postProcessApiCallResponse and preProcessApiCallParameters abstract away which processing is used (under the hood they choose either v1 or v2 implementation) and they return a standard response. This is especially nice for end use, such as Airnode or Pusher.

@Siegrift Siegrift requested a review from andreogle November 18, 2023 16:16
@Siegrift Siegrift self-assigned this Nov 18, 2023
@Siegrift Siegrift requested a review from aquarat November 18, 2023 16:16
@Siegrift Siegrift changed the title Processing v2 Implement processing v2 Nov 18, 2023
@Siegrift Siegrift merged commit a170578 into main Nov 27, 2023
@Siegrift Siegrift deleted the processing-v2 branch November 27, 2023 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants