-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Support composition for stronger validation
- Loading branch information
Showing
2 changed files
with
105 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
requirements/specifications/openrpc-extensions/push-pull-methods.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# App Pass-through APIs | ||
|
||
Document Status: Working Draft | ||
|
||
See [Firebolt Requirements Governance](../../governance.md) for more info. | ||
|
||
| Contributor | Organization | | ||
|-----------------|----------------| | ||
| Jeremy LaCivita | Comcast | | ||
| Kevin Pearson | Comcast | | ||
|
||
## 1. Overview | ||
This document describes the Push / Pull Firebolt OpenRPC extension. | ||
|
||
Some APIs require both a push and a pull version so that data can be provided on request, or out of band. | ||
|
||
To facilitate these APIs, Firebolt denotes an OpenRPC tag with OpenRPC extensions to auto-genrate the push notifcation, pull provider, and pull request APIs from the main push API. | ||
|
||
This document is written using the [IETF Best Common Practice 14](https://www.rfc-editor.org/rfc/rfc2119.txt) and should include the following summary in the Overview section: | ||
|
||
The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL NOT**", "**SHOULD**", "**SHOULD NOT**", "**RECOMMENDED**", "**NOT RECOMMENDED**", "**MAY**", and "**OPTIONAL**" in this document are to be interpreted as described in [BCP 14](https://www.rfc-editor.org/rfc/rfc2119.txt) [RFC2119] [RFC8174] when, and only when, they appear in all capitals, as shown here. | ||
|
||
## 2. Table of Contents | ||
- [1. Overview](#1-overview) | ||
- [2. Table of Contents](#2-table-of-contents) | ||
- [3. Push / Pull Extension](#3-push--pull-extension) | ||
|
||
## 3. Push / Pull Extension | ||
Firebolt OpenRPC **MUST** support a method tag named `push-pull` that denotes a method should have a set of pull APIs generated from the current method, which is referred to as the "push method" for the remainder of this section. | ||
|
||
If a *any* method has a `push-pull` tag then an additional method named `onRequest<method.Name>` **MUST** be auto-generated by the OpenRPC tooling; This new method is called the "pull provider method" for the remainder of this section. | ||
|
||
The pull provider method **MUST** have the `x-result` extension schema set to the schema of the last parameter of the push method. | ||
|
||
The pull provider method **MUST** have any remaining parameters (not the last one) from the push method, as these are context parameters used by both push and pull. | ||
|
||
The pull provider method **MUST** have the same capabilities tag as the push method. | ||
|
||
If a *any* method has a `push-pull` tag then an additional method named `request<method.Name>` **MUST** be auto-generated by the OpenRPC tooling; This new method is called the "pull request method" for the remainder of this section. | ||
|
||
The pull request method **MUST** have the `result` schema set to the schema of the last parameter of the push method. | ||
|
||
The pull request method **MUST** have any remaining parameters (not the last one) from the push method, as these are context parameters used by both push and pull. | ||
|
||
The pull request method **MUST** have the `x-uses` array contain the value of the `x-provides` value from the push method. | ||
|
||
If a *any* method has a `push-pull` tag then an additional method named `on<method.Name>` **MUST** be auto-generated by the OpenRPC tooling; This new method is called the "push notification method" for the remainder of this section. | ||
|
||
The push notification method **MUST** have the `result` schema set to the schema of the last parameter of the push method. | ||
|
||
The push notification method **MUST** have any remaining parameters (not the last one) from the push method, as these are context parameters used by both push and pull. | ||
|
||
The push notification method **MUST** have the `x-uses` array contain the value of the `x-provides` value from the push method. |