Merge pull request #623 from janhq/docs/openai-api
docs: add OpenAI swagger file #623
This commit is contained in:
commit
5557695da7
@ -103,8 +103,8 @@ const config = {
|
||||
{
|
||||
specs: [
|
||||
{
|
||||
spec: "openapi/OpenAPISpec.json", // can be local file, url, or parsed json object
|
||||
route: "/api/",
|
||||
spec: "openapi/OpenAIAPI.yaml", // can be local file, url, or parsed json object
|
||||
route: "/api-reference", // path where to render docs
|
||||
},
|
||||
],
|
||||
theme: {
|
||||
|
||||
9497
docs/openapi/OpenAIAPI.yaml
Normal file
9497
docs/openapi/OpenAIAPI.yaml
Normal file
File diff suppressed because it is too large
Load Diff
@ -1,74 +0,0 @@
|
||||
{
|
||||
"openapi": "3.0.0",
|
||||
"info": {
|
||||
"description": "Jan.ai api reference documentation.",
|
||||
"title": "Rest Endpoints",
|
||||
"version": ""
|
||||
},
|
||||
"paths": {
|
||||
"/api/rest/myquery": {
|
||||
"get": {
|
||||
"summary": "MyQuery",
|
||||
"description": "***\nThe GraphQl query for this endpoint is:\n``` graphql\nquery MyQuery {\n collections {\n id\n name\n slug\n }\n}\n```",
|
||||
"parameters": [
|
||||
{
|
||||
"description": "Your x-hasura-admin-secret will be used for authentication of the API request.",
|
||||
"in": "header",
|
||||
"name": "x-hasura-admin-secret",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"properties": {
|
||||
"collections": {
|
||||
"items": {
|
||||
"description": "columns and relationships of \"collections\"",
|
||||
"nullable": false,
|
||||
"properties": {
|
||||
"id": {
|
||||
"$ref": "#/components/schemas/uuid!"
|
||||
},
|
||||
"name": {
|
||||
"nullable": false,
|
||||
"title": "String",
|
||||
"type": "string"
|
||||
},
|
||||
"slug": {
|
||||
"nullable": false,
|
||||
"title": "String",
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"title": "collections",
|
||||
"type": "object"
|
||||
},
|
||||
"nullable": false,
|
||||
"type": "array"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"description": "Responses for GET /api/rest/myquery"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"components": {
|
||||
"schemas": {
|
||||
"uuid!": {
|
||||
"nullable": false,
|
||||
"pattern": "[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}",
|
||||
"title": "uuid",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -24,7 +24,9 @@
|
||||
"autoprefixer": "^10.4.16",
|
||||
"axios": "^1.5.1",
|
||||
"clsx": "^1.2.1",
|
||||
"docusaurus-plugin-redoc": "^2.0.0",
|
||||
"docusaurus-plugin-sass": "^0.2.5",
|
||||
"docusaurus-theme-redoc": "^2.0.0",
|
||||
"js-yaml": "^4.1.0",
|
||||
"postcss": "^8.4.30",
|
||||
"posthog-docusaurus": "^2.0.0",
|
||||
@ -32,7 +34,7 @@
|
||||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-icons": "^4.11.0",
|
||||
"redocusaurus": "^1.6.3",
|
||||
"redocusaurus": "^2.0.0",
|
||||
"sass": "^1.69.3",
|
||||
"tailwindcss": "^3.3.3"
|
||||
},
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user