Browse Source

refactor(nocodb): row comment / audit model in swagger.json

pull/5222/head
Wing-Kam Wong 2 years ago
parent
commit
0c47f8086e
  1. 57
      packages/nocodb/src/schema/swagger.json

57
packages/nocodb/src/schema/swagger.json

@ -6237,32 +6237,38 @@
"parameters": [ "parameters": [
{ {
"schema": { "schema": {
"type": "string" "type": "string",
"example": "10"
}, },
"in": "query", "in": "query",
"name": "row_id", "name": "row_id",
"required": true "required": true,
"description": "Row ID"
}, },
{ {
"schema": { "schema": {
"$ref": "#/components/schemas/Id" "$ref": "#/components/schemas/Id",
"example": "md_c6csq89tl37jm5"
}, },
"in": "query", "in": "query",
"name": "fk_model_id", "name": "fk_model_id",
"required": true "required": true,
"description": "Foreign Key to Model"
}, },
{ {
"schema": { "schema": {
"type": "boolean" "type": "boolean",
"example": "true"
}, },
"in": "query", "in": "query",
"name": "comments_only" "name": "comments_only",
"description": "Is showing comments only?"
} }
], ],
"tags": ["Utils"] "tags": ["Utils"]
}, },
"post": { "post": {
"summary": "", "summary": "Comment Rows",
"operationId": "utils-comment-row", "operationId": "utils-comment-row",
"responses": { "responses": {
"200": { "200": {
@ -6274,12 +6280,21 @@
"application/json": { "application/json": {
"schema": { "schema": {
"$ref": "#/components/schemas/CommentReq" "$ref": "#/components/schemas/CommentReq"
},
"examples": {
"Example 1": {
"value": {
"description": "This is the comment for the row",
"fk_model_id": "md_ehn5izr99m7d45",
"row_id": "3"
}
}
} }
} }
} }
}, },
"tags": ["Utils"], "tags": ["Utils"],
"description": "Create a new comment for Audit" "description": "Create a new comment in a row. Logged in Audit."
} }
}, },
"/api/v1/db/meta/audits/comments/count": { "/api/v1/db/meta/audits/comments/count": {
@ -7736,7 +7751,7 @@
"EXPORT_TO_ZIP", "EXPORT_TO_ZIP",
"UPDATED", "UPDATED",
"SIGNIN", "SIGNIN",
"SIGN", "SIGNUP",
"PASSWORD_RESET", "PASSWORD_RESET",
"PASSWORD_FORGOT", "PASSWORD_FORGOT",
"PASSWORD_CHANGE", "PASSWORD_CHANGE",
@ -8495,25 +8510,31 @@
"description": "Model for Comment Request", "description": "Model for Comment Request",
"examples": [ "examples": [
{ {
"description": "string", "description": "This is the comment for the row",
"fk_model_id": "string", "fk_model_id": "md_ehn5izr99m7d45",
"row_id": "string" "row_id": "3"
} }
], ],
"title": "Comment Request Model",
"type": "object",
"properties": { "properties": {
"description": { "description": {
"type": "string" "type": "string",
"description": "Description for the target row",
"example": "This is the comment for the row"
}, },
"fk_model_id": { "fk_model_id": {
"type": "string" "type": "string",
"description": "Foreign Key to Model",
"example": "md_ehn5izr99m7d45"
}, },
"row_id": { "row_id": {
"type": "string" "type": "string",
"description": "Row ID",
"example": "3"
} }
}, },
"required": ["comment", "fk_model_id", "row_id"], "required": ["fk_model_id", "row_id"]
"title": "Comment Request Model",
"type": "object"
}, },
"Filter": { "Filter": {
"description": "Model for Filter", "description": "Model for Filter",

Loading…
Cancel
Save