-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: add diagrams for the import and scanning component (#154)
* docs: add diagrams for the import and scanning component Signed-off-by: Nam Hoang <[email protected]> * docs: format the table of render check list component docs Signed-off-by: Nam Hoang <[email protected]> * docs: add docs for headers, vc configs and examples --------- Signed-off-by: Nam Hoang <[email protected]>
- Loading branch information
1 parent
6be27a2
commit f76c8cf
Showing
6 changed files
with
425 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
--- | ||
sidebar_position: 57 | ||
title: HTTP Headers | ||
--- | ||
|
||
import Disclaimer from '../.././\_disclaimer.mdx'; | ||
|
||
<Disclaimer /> | ||
|
||
## Description | ||
|
||
The `Http Headers` object contains configuration details for the HTTP headers that is used to make requests. The headers content follow the [HTTP headers specification](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers). | ||
|
||
## Example | ||
|
||
```json | ||
{ | ||
"Authorization": "Bearer test", | ||
"Content-Type": "application/json" | ||
} | ||
``` |
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,56 @@ | ||
--- | ||
sidebar_position: 58 | ||
title: Payload Type | ||
--- | ||
|
||
import Disclaimer from '../../\_disclaimer.mdx'; | ||
|
||
<Disclaimer /> | ||
|
||
## Description | ||
|
||
The `type` property of the `props` object in a [component](/docs/mock-apps/configuration/component-config) configuration defines the kind of data that component is responsible for handling. | ||
|
||
## Usage | ||
|
||
The `type` property of the `props` object is required for component receiving data such as [import-button](/docs/mock-apps/components/import-button), [qr-code-scanner-dialog-button](/docs/mock-apps/components/qr-code-scanner-dialog-button), etc. The component will use the `type` to determine how to handle the data it receives. | ||
|
||
## Types | ||
|
||
### JSON | ||
|
||
When a component has the `JSON` type, it will suppose receive any JSON object as its payload and will not transform it in any way. | ||
|
||
### VerifiableCredential | ||
|
||
When a component has the `VerifiableCredential` type, it will suppose receive a [Verifiable Credential](/docs/mock-apps/common/verifiable-credentials) as its payload and will verify the credential before using it. | ||
|
||
## Examples | ||
|
||
```json | ||
{ | ||
"name": "ImportButton", | ||
"type": "EntryData", | ||
"props": { | ||
"label": "Import JSON", | ||
"type": "JSON", | ||
"style": {} | ||
} | ||
} | ||
``` | ||
|
||
In this example, the `ImportButton` component is of type `EntryData` and expects any JSON object as its payload. | ||
|
||
```json | ||
{ | ||
"name": "ImportButton", | ||
"type": "EntryData", | ||
"props": { | ||
"label": "Import JSON", | ||
"type": "VerifiableCredential", | ||
"style": {} | ||
} | ||
} | ||
``` | ||
|
||
In this example, the `ImportButton` component is of type `EntryData` and expects a Verifiable Credential as its payload. |
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
Oops, something went wrong.