From 6deb6c9bb0364816e77aebd45fd29b5077e22aa3 Mon Sep 17 00:00:00 2001 From: Jeremy LaCivita Date: Fri, 23 Feb 2024 11:10:36 -0500 Subject: [PATCH] fix: Added API Gateway note --- .../openrpc-extensions/app-passthrough-apis.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/requirements/specifications/openrpc-extensions/app-passthrough-apis.md b/requirements/specifications/openrpc-extensions/app-passthrough-apis.md index 4a8f920aa..67103c844 100644 --- a/requirements/specifications/openrpc-extensions/app-passthrough-apis.md +++ b/requirements/specifications/openrpc-extensions/app-passthrough-apis.md @@ -27,8 +27,9 @@ The key words "**MUST**", "**MUST NOT**", "**REQUIRED**", "**SHALL**", "**SHALL - [3.1. Aggregated vs Single Providers](#31-aggregated-vs-single-providers) - [3.2. Selecting the best provider app](#32-selecting-the-best-provider-app) - [3.3. Inserting the appId](#33-inserting-the-appid) -- [4. Example: User Interest](#4-example-user-interest) -- [5. Example: Keyboard](#5-example-keyboard) +- [4. API Gateway](#4-api-gateway) +- [5. Example: User Interest](#5-example-user-interest) +- [6. Example: Keyboard](#6-example-keyboard) ## 3. App Provided Extension Firebolt OpenRPC **MUST** support a `boolean` `x-app-provided` extension property on the `capabilities` tag that denotes a method is provided by some app on the device. @@ -84,7 +85,10 @@ If an app provided method's `capabilities` tag has an `x-app-id-property` proper If an app provided method's `capabilities` tag has an `x-app-id-property` property and `x-aggregate` is `true`, then the `items` schema of the result schema **MUST** have a property with that name, and property's value **MUST** be set to the the appId of the providing app for each of the items in the result. -## 4. Example: User Interest +## 4. API Gateway +The Firebolt API Gateway **MUST** detect app-passthrough APIs and map the `use`/`manage` APIs to the corresponding `provide` APIs by parsing the Firebolt OpenRPC Specification and following the logic outline in this document. + +## 5. Example: User Interest User Interest does not use the `x-app-method` property because there is only one method and one event in the API, so they can be detected automatically via the capability string. @@ -288,7 +292,7 @@ Content.onUserInterest (push) } ``` -## 5. Example: Keyboard +## 6. Example: Keyboard Keyboard *requires* the* `x-app-method` property because there are three methods in the same capability, so the mapping cannot be detected automatically via the capability string.