-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(schema): add schemas for helix-data-embed (#507)
schemas for response (either workbook or worksheet + metadata), workbook, worksheet, and row. Response must have `type` and `version` properties now. see adobe/helix-data-embed#356 (comment)
- Loading branch information
Showing
34 changed files
with
1,384 additions
and
0 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
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,120 @@ | ||
# Workbook Schema | ||
|
||
```txt | ||
https://ns.adobe.com/helix/data-embed/workbook#/allOf/0/oneOf/1 | ||
``` | ||
|
||
A JSON representation of an Excel or Google Sheets workbook containing multiple sheets. | ||
|
||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | | ||
| :------------------ | :--------- | :---------- | :----------- | :---------------- | :-------------------- | :------------------ | :----------------------------------------------------------------------------------------- | | ||
| Can be instantiated | No | Stabilizing | No | Forbidden | Forbidden | none | [data-embed-response.schema.json*](data-embed-response.schema.json "open original schema") | | ||
|
||
## 1 Type | ||
|
||
`object` ([Workbook](data-embed-response-allof-0-oneof-workbook.md)) | ||
|
||
# 1 Properties | ||
|
||
| Property | Type | Required | Nullable | Defined by | | ||
| :------------------- | :------------ | :------- | :------------- | :---------------------------------------------------------------------------------------------------------------------------------- | | ||
| [:type](#type) | Not specified | Optional | cannot be null | [Workbook](workbook-properties-type.md "https://ns.adobe.com/helix/data-embed/workbook#/properties/:type") | | ||
| [:names](#names) | `array` | Required | cannot be null | [Workbook](workbook-properties-names.md "https://ns.adobe.com/helix/data-embed/workbook#/properties/:names") | | ||
| [:version](#version) | `number` | Optional | cannot be null | [Workbook](workbook-properties-version.md "https://ns.adobe.com/helix/data-embed/workbook#/properties/:version") | | ||
| `^[^:].*` | `object` | Optional | cannot be null | [Workbook](data-embed-response-allof-0-oneof-worksheet.md "https://ns.adobe.com/helix/data-embed/sheet#/patternProperties/^[^:].*") | | ||
|
||
## :type | ||
|
||
The response type, depending on the presence of the `sheet` request parameter. | ||
|
||
`:type` | ||
|
||
* is optional | ||
|
||
* Type: unknown | ||
|
||
* cannot be null | ||
|
||
* defined in: [Workbook](workbook-properties-type.md "https://ns.adobe.com/helix/data-embed/workbook#/properties/:type") | ||
|
||
### :type Type | ||
|
||
unknown | ||
|
||
### :type Constraints | ||
|
||
**constant**: the value of this property must be equal to: | ||
|
||
```json | ||
"multi-sheet" | ||
``` | ||
|
||
## :names | ||
|
||
The list of sheet names that exist in the workbook response. | ||
|
||
`:names` | ||
|
||
* is required | ||
|
||
* Type: `string[]` | ||
|
||
* cannot be null | ||
|
||
* defined in: [Workbook](workbook-properties-names.md "https://ns.adobe.com/helix/data-embed/workbook#/properties/:names") | ||
|
||
### :names Type | ||
|
||
`string[]` | ||
|
||
## :version | ||
|
||
The workbook response format version | ||
|
||
`:version` | ||
|
||
* is optional | ||
|
||
* Type: `number` | ||
|
||
* cannot be null | ||
|
||
* defined in: [Workbook](workbook-properties-version.md "https://ns.adobe.com/helix/data-embed/workbook#/properties/:version") | ||
|
||
### :version Type | ||
|
||
`number` | ||
|
||
### :version Constraints | ||
|
||
**enum**: the value of this property must be equal to one of the following values: | ||
|
||
| Value | Explanation | | ||
| :---- | :---------- | | ||
| `3` | | | ||
|
||
### :version Default Value | ||
|
||
The default value is: | ||
|
||
```json | ||
3 | ||
``` | ||
|
||
## Pattern: `^[^:].*` | ||
|
||
A JSON representation of an Excel or Google Sheets worksheet containing rows and columns. | ||
|
||
`^[^:].*` | ||
|
||
* is optional | ||
|
||
* Type: `object` ([Worksheet](data-embed-response-allof-0-oneof-worksheet.md)) | ||
|
||
* cannot be null | ||
|
||
* defined in: [Workbook](data-embed-response-allof-0-oneof-worksheet.md "https://ns.adobe.com/helix/data-embed/sheet#/patternProperties/^\[^:].\*") | ||
|
||
### ^\[^:].\* Type | ||
|
||
`object` ([Worksheet](data-embed-response-allof-0-oneof-worksheet.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,170 @@ | ||
# Worksheet Schema | ||
|
||
```txt | ||
https://ns.adobe.com/helix/data-embed/sheet#/allOf/0/oneOf/0 | ||
``` | ||
|
||
A JSON representation of an Excel or Google Sheets worksheet containing rows and columns. | ||
|
||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | | ||
| :------------------ | :--------- | :---------- | :----------- | :---------------- | :-------------------- | :------------------ | :----------------------------------------------------------------------------------------- | | ||
| Can be instantiated | No | Stabilizing | No | Forbidden | Forbidden | none | [data-embed-response.schema.json*](data-embed-response.schema.json "open original schema") | | ||
|
||
## 0 Type | ||
|
||
`object` ([Worksheet](data-embed-response-allof-0-oneof-worksheet.md)) | ||
|
||
# 0 Properties | ||
|
||
| Property | Type | Required | Nullable | Defined by | | ||
| :------------------- | :------------ | :------- | :------------- | :---------------------------------------------------------------------------------------------------------- | | ||
| [:type](#type) | Not specified | Optional | cannot be null | [Worksheet](sheet-properties-type.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/:type") | | ||
| [limit](#limit) | `integer` | Required | cannot be null | [Worksheet](sheet-properties-limit.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/limit") | | ||
| [offset](#offset) | `integer` | Required | cannot be null | [Worksheet](sheet-properties-offset.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/offset") | | ||
| [total](#total) | `integer` | Required | cannot be null | [Worksheet](sheet-properties-total.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/total") | | ||
| [data](#data) | `array` | Required | cannot be null | [Worksheet](sheet-properties-data.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/data") | | ||
| [:version](#version) | `number` | Optional | cannot be null | [Worksheet](sheet-properties-version.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/:version") | | ||
|
||
## :type | ||
|
||
The response type, depending on the presence of the `sheet` request parameter. | ||
|
||
`:type` | ||
|
||
* is optional | ||
|
||
* Type: unknown | ||
|
||
* cannot be null | ||
|
||
* defined in: [Worksheet](sheet-properties-type.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/:type") | ||
|
||
### :type Type | ||
|
||
unknown | ||
|
||
### :type Constraints | ||
|
||
**constant**: the value of this property must be equal to: | ||
|
||
```json | ||
"sheet" | ||
``` | ||
|
||
## limit | ||
|
||
The maximum number of items requested by the `limit` parameter. | ||
|
||
`limit` | ||
|
||
* is required | ||
|
||
* Type: `integer` | ||
|
||
* cannot be null | ||
|
||
* defined in: [Worksheet](sheet-properties-limit.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/limit") | ||
|
||
### limit Type | ||
|
||
`integer` | ||
|
||
### limit Constraints | ||
|
||
**minimum**: the value of this number must greater than or equal to: `0` | ||
|
||
## offset | ||
|
||
The starting row that items have been retrieved by as specified by the `offset` parameter. | ||
|
||
`offset` | ||
|
||
* is required | ||
|
||
* Type: `integer` | ||
|
||
* cannot be null | ||
|
||
* defined in: [Worksheet](sheet-properties-offset.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/offset") | ||
|
||
### offset Type | ||
|
||
`integer` | ||
|
||
### offset Constraints | ||
|
||
**minimum**: the value of this number must greater than or equal to: `0` | ||
|
||
## total | ||
|
||
The total number of items in the data sheet. This value can be greater than the sum of `limit` and `offset` | ||
|
||
`total` | ||
|
||
* is required | ||
|
||
* Type: `integer` | ||
|
||
* cannot be null | ||
|
||
* defined in: [Worksheet](sheet-properties-total.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/total") | ||
|
||
### total Type | ||
|
||
`integer` | ||
|
||
### total Constraints | ||
|
||
**minimum**: the value of this number must greater than or equal to: `0` | ||
|
||
## data | ||
|
||
The data rows that are part of the result set | ||
|
||
`data` | ||
|
||
* is required | ||
|
||
* Type: `object[]` ([Row](sheet-properties-data-row.md)) | ||
|
||
* cannot be null | ||
|
||
* defined in: [Worksheet](sheet-properties-data.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/data") | ||
|
||
### data Type | ||
|
||
`object[]` ([Row](sheet-properties-data-row.md)) | ||
|
||
## :version | ||
|
||
The workbook response format version | ||
|
||
`:version` | ||
|
||
* is optional | ||
|
||
* Type: `number` | ||
|
||
* cannot be null | ||
|
||
* defined in: [Worksheet](sheet-properties-version.md "https://ns.adobe.com/helix/data-embed/sheet#/properties/:version") | ||
|
||
### :version Type | ||
|
||
`number` | ||
|
||
### :version Constraints | ||
|
||
**enum**: the value of this property must be equal to one of the following values: | ||
|
||
| Value | Explanation | | ||
| :---- | :---------- | | ||
| `3` | | | ||
|
||
### :version Default Value | ||
|
||
The default value is: | ||
|
||
```json | ||
3 | ||
``` |
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 @@ | ||
# Untitled undefined type in Response Schema | ||
|
||
```txt | ||
https://ns.adobe.com/helix/data-embed/response#/allOf/0 | ||
``` | ||
|
||
|
||
|
||
| Abstract | Extensible | Status | Identifiable | Custom Properties | Additional Properties | Access Restrictions | Defined In | | ||
| :------------------ | :--------- | :------------- | :---------------------- | :---------------- | :-------------------- | :------------------ | :----------------------------------------------------------------------------------------- | | ||
| Can be instantiated | No | Unknown status | Unknown identifiability | Forbidden | Allowed | none | [data-embed-response.schema.json*](data-embed-response.schema.json "open original schema") | | ||
|
||
## 0 Type | ||
|
||
merged type ([Details](data-embed-response-allof-0.md)) | ||
|
||
one (and only one) of | ||
|
||
* [Worksheet](data-embed-response-allof-0-oneof-worksheet.md "check type definition") | ||
|
||
* [Workbook](data-embed-response-allof-0-oneof-workbook.md "check type definition") |
Oops, something went wrong.