Skip to content

OpenAPI spec update from glideapps/glide#30466 #24

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions api-reference/v2/resources/changelog.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@ title: Glide API Changelog
sidebarTitle: Changelog
---

### October 25, 2024

- Introduced a PATCH endpoint to update an existing row.
- `$stashID` is now a reserved column ID.

### October 21, 2024

- Expanded the "type" enumeration for column definitions to include `imageURI`, `audioURI`, `markdown`, `phoneNumber`, `emailAddress`, `emoji`, `date`, `time`, and `duration`, in addition to the existing types and arrays of those values.
Expand Down
6 changes: 6 additions & 0 deletions api-reference/v2/tables/patch-table-row.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Update Row
openapi: patch /tables/{tableID}/rows/{rowID}
---

Updates an existing row in a Big Table.
3 changes: 2 additions & 1 deletion mint.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@
"api-reference/v2/tables/get-tables",
"api-reference/v2/tables/post-tables",
"api-reference/v2/tables/post-table-rows",
"api-reference/v2/tables/put-tables"
"api-reference/v2/tables/put-tables",
"api-reference/v2/tables/patch-table-row"
]
},
{
Expand Down
219 changes: 213 additions & 6 deletions openapi/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,14 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
"additionalProperties": {},
"description": "A row object conforming to the schema of the table, where keys are the column IDs and values are the column values:\n\n```json\n{\n\t\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```",
"example": {
"fullName": "Alex Bard",
"invoiceDate": "2024-07-29T14:04:15.561Z",
"totalAmount": 34.5,
"amountPaid": 0
}
},
"description": "A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:\n\n```json\n[\n\t{\n\t\t\"fullName\": \"Alex Bard\",\n\t\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\t\"totalAmount\": 34.50,\n\t\t\"amountPaid\": 0\n\t},\n\t{\n\t\t\"fullName\": \"Alicia Hines\",\n\t\t\"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n\t\t\"totalAmount\": 50.75,\n\t\t\"amountPaid\": 20\n\t}\n]\n```",
"example": [
Expand Down Expand Up @@ -143,7 +150,9 @@
"rowIDs": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"description": "ID of the row, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`",
"example": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
},
"description": "Row IDs of added rows, e.g., \n\n```json\n[\n\t\"2a1bad8b-cf7c-44437-b8c1-e3782df6\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```",
"example": [
Expand Down Expand Up @@ -507,7 +516,9 @@
"rowIDs": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"description": "ID of the row, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`",
"example": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
},
"description": "Row IDs of added rows, e.g., \n\n```json\n[\n\t\"2a1bad8b-cf7c-44437-b8c1-e3782df6\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```",
"example": [
Expand Down Expand Up @@ -900,7 +911,9 @@
"rowIDs": {
"type": "array",
"items": {
"type": "string"
"type": "string",
"description": "ID of the row, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`",
"example": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
},
"description": "Row IDs of added rows, e.g., \n\n```json\n[\n\t\"2a1bad8b-cf7c-44437-b8c1-e3782df6\",\n\t\"93a19-cf7c-44437-b8c1-e9acbbb\"\n]\n```",
"example": [
Expand Down Expand Up @@ -1065,7 +1078,14 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
"additionalProperties": {},
"description": "A row object conforming to the schema of the table, where keys are the column IDs and values are the column values:\n\n```json\n{\n\t\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```",
"example": {
"fullName": "Alex Bard",
"invoiceDate": "2024-07-29T14:04:15.561Z",
"totalAmount": 34.5,
"amountPaid": 0
}
},
"description": "A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:\n\n```json\n[\n\t{\n\t\t\"fullName\": \"Alex Bard\",\n\t\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\t\"totalAmount\": 34.50,\n\t\t\"amountPaid\": 0\n\t},\n\t{\n\t\t\"fullName\": \"Alicia Hines\",\n\t\t\"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n\t\t\"totalAmount\": 50.75,\n\t\t\"amountPaid\": 20\n\t}\n]\n```",
"example": [
Expand Down Expand Up @@ -1121,6 +1141,186 @@
"description": "Adds rows to a Big Table"
}
},
"/tables/{tableID}/rows/{rowID}": {
"patch": {
"responses": {
"200": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {},
"additionalProperties": false,
"description": "A 200 HTTP response code indicates that the row was successfully updated."
}
}
}
},
"400": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"type": {
"type": "string"
},
"message": {
"type": "string"
}
},
"required": [
"type",
"message"
],
"additionalProperties": false
}
},
"required": [
"error"
],
"additionalProperties": false
}
}
}
},
"404": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"row_not_found",
"table_not_found",
"table_not_big_table"
]
},
"message": {
"type": "string"
}
},
"required": [
"type",
"message"
],
"additionalProperties": false
}
},
"required": [
"error"
],
"additionalProperties": false
}
}
}
},
"422": {
"description": "",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
"error": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"column_has_invalid_value",
"column_id_reserved",
"column_id_not_found"
]
},
"message": {
"type": "string"
}
},
"required": [
"type",
"message"
],
"additionalProperties": false
}
},
"required": [
"error"
],
"additionalProperties": false
}
}
}
}
},
"parameters": [
{
"name": "tableID",
"in": "path",
"schema": {
"type": "string",
"description": "ID of the table, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`",
"example": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
},
"required": true
},
{
"name": "rowID",
"in": "path",
"schema": {
"type": "string",
"description": "ID of the row, e.g., `2a1bad8b-cf7c-44437-b8c1-e3782df6`",
"example": "2a1bad8b-cf7c-44437-b8c1-e3782df6"
},
"required": true
},
{
"name": "onSchemaError",
"in": "query",
"schema": {
"type": "string",
"enum": [
"abort",
"dropColumns",
"updateSchema"
],
"description": "The action to take when the passed data does not match the table schema:\n\n- `abort`: Abort the entire operation and return an error.\n- `dropColumns`: Ignore the data that caused the error, and do not import those columns in the affected rows.\n- `updateSchema`: Update the schema as needed to add any missing columns or widen the data types of existing columns, and then import the data from them.",
"example": "updateSchema"
},
"required": false
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {},
"description": "A row object conforming to the schema of the table, where keys are the column IDs and values are the column values:\n\n```json\n{\n\t\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```",
"example": {
"fullName": "Alex Bard",
"invoiceDate": "2024-07-29T14:04:15.561Z",
"totalAmount": 34.5,
"amountPaid": 0
}
}
}
}
},
"description": "Updates a row in a Big Table"
}
},
"/stashes/{stashID}/{serial}": {
"put": {
"responses": {
Expand Down Expand Up @@ -1201,7 +1401,14 @@
"type": "array",
"items": {
"type": "object",
"additionalProperties": {}
"additionalProperties": {},
"description": "A row object conforming to the schema of the table, where keys are the column IDs and values are the column values:\n\n```json\n{\n\t\"fullName\": \"Alex Bard\",\n\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\"totalAmount\": 34.50,\n\t\"amountPaid\": 0\n}\n```",
"example": {
"fullName": "Alex Bard",
"invoiceDate": "2024-07-29T14:04:15.561Z",
"totalAmount": 34.5,
"amountPaid": 0
}
},
"description": "A collection of row objects conforming to the schema of the table where keys are the column IDs and values are the column values:\n\n```json\n[\n\t{\n\t\t\"fullName\": \"Alex Bard\",\n\t\t\"invoiceDate\": \"2024-07-29T14:04:15.561Z\",\n\t\t\"totalAmount\": 34.50,\n\t\t\"amountPaid\": 0\n\t},\n\t{\n\t\t\"fullName\": \"Alicia Hines\",\n\t\t\"invoiceDate\": \"2023-06-15T10:30:00.000Z\",\n\t\t\"totalAmount\": 50.75,\n\t\t\"amountPaid\": 20\n\t}\n]\n```",
"example": [
Expand Down
Loading