Skip to content

Commit

Permalink
patch response body for swagger
Browse files Browse the repository at this point in the history
  • Loading branch information
timothycarambat committed Jul 22, 2024
1 parent 76aa2a4 commit d0713e1
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
2 changes: 1 addition & 1 deletion server/endpoints/api/document/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ function apiDocumentEndpoints(app) {
example: {
"textContent": "This is the raw text that will be saved as a document in AnythingLLM.",
"metadata": {
"title": "This key is required. See in /server/endpoints/api/document/index.js:287"
"title": "This key is required. See in /server/endpoints/api/document/index.js:287",
keyOne: "valueOne",
keyTwo: "valueTwo",
etc: "etc"
Expand Down
22 changes: 21 additions & 1 deletion server/swagger/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -1012,7 +1012,27 @@
"description": "Internal Server Error"
}
},
"requestBody": {}
"requestBody": {
"description": "Text content and metadata of the file to be saved to the system. Use metadata-schema endpoint to get the possible metadata keys",
"required": true,
"type": "object",
"content": {
"application/json": {
"schema": {
"type": "object",
"example": {
"textContent": "This is the raw text that will be saved as a document in AnythingLLM.",
"metadata": {
"title": "This key is required. See in /server/endpoints/api/document/index.js:287",
"keyOne": "valueOne",
"keyTwo": "valueTwo",
"etc": "etc"
}
}
}
}
}
}
}
},
"/v1/documents": {
Expand Down

0 comments on commit d0713e1

Please sign in to comment.