aboutsummaryrefslogtreecommitdiff
path: root/apps/docs/api-reference
diff options
context:
space:
mode:
authorDhravya Shah <[email protected]>2025-01-30 18:46:37 -0700
committerDhravya Shah <[email protected]>2025-01-30 18:46:37 -0700
commit81529a9791b2badf539e837cbba6e7e7e9cf64b9 (patch)
tree980a17bf6dfc0689bbe50789f4d69a789be0797a /apps/docs/api-reference
parentdocs without submodule (diff)
downloadsupermemory-81529a9791b2badf539e837cbba6e7e7e9cf64b9.tar.xz
supermemory-81529a9791b2badf539e837cbba6e7e7e9cf64b9.zip
docs no submodule
Diffstat (limited to 'apps/docs/api-reference')
m---------apps/docs0
-rw-r--r--apps/docs/api-reference/endpoint/create.mdx4
-rw-r--r--apps/docs/api-reference/endpoint/delete.mdx4
-rw-r--r--apps/docs/api-reference/endpoint/get.mdx4
-rw-r--r--apps/docs/api-reference/introduction.mdx33
-rw-r--r--apps/docs/api-reference/openapi.json195
6 files changed, 240 insertions, 0 deletions
diff --git a/apps/docs b/apps/docs
deleted file mode 160000
-Subproject cc9c512a12fe23a349c990076b5a97c46a189e4
diff --git a/apps/docs/api-reference/endpoint/create.mdx b/apps/docs/api-reference/endpoint/create.mdx
new file mode 100644
index 00000000..5689f1b6
--- /dev/null
+++ b/apps/docs/api-reference/endpoint/create.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Create Plant'
+openapi: 'POST /plants'
+---
diff --git a/apps/docs/api-reference/endpoint/delete.mdx b/apps/docs/api-reference/endpoint/delete.mdx
new file mode 100644
index 00000000..657dfc87
--- /dev/null
+++ b/apps/docs/api-reference/endpoint/delete.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Delete Plant'
+openapi: 'DELETE /plants/{id}'
+---
diff --git a/apps/docs/api-reference/endpoint/get.mdx b/apps/docs/api-reference/endpoint/get.mdx
new file mode 100644
index 00000000..56aa09ec
--- /dev/null
+++ b/apps/docs/api-reference/endpoint/get.mdx
@@ -0,0 +1,4 @@
+---
+title: 'Get Plants'
+openapi: 'GET /plants'
+---
diff --git a/apps/docs/api-reference/introduction.mdx b/apps/docs/api-reference/introduction.mdx
new file mode 100644
index 00000000..c835b78b
--- /dev/null
+++ b/apps/docs/api-reference/introduction.mdx
@@ -0,0 +1,33 @@
+---
+title: 'Introduction'
+description: 'Example section for showcasing API endpoints'
+---
+
+<Note>
+ If you're not looking to build API reference documentation, you can delete
+ this section by removing the api-reference folder.
+</Note>
+
+## Welcome
+
+There are two ways to build API documentation: [OpenAPI](https://mintlify.com/docs/api-playground/openapi/setup) and [MDX components](https://mintlify.com/docs/api-playground/mdx/configuration). For the starter kit, we are using the following OpenAPI specification.
+
+<Card
+ title="Plant Store Endpoints"
+ icon="leaf"
+ href="https://github.com/mintlify/starter/blob/main/api-reference/openapi.json"
+>
+ View the OpenAPI specification file
+</Card>
+
+## Authentication
+
+All API endpoints are authenticated using Bearer tokens and picked up from the specification file.
+
+```json
+"security": [
+ {
+ "bearerAuth": []
+ }
+]
+```
diff --git a/apps/docs/api-reference/openapi.json b/apps/docs/api-reference/openapi.json
new file mode 100644
index 00000000..b1509be0
--- /dev/null
+++ b/apps/docs/api-reference/openapi.json
@@ -0,0 +1,195 @@
+{
+ "openapi": "3.0.1",
+ "info": {
+ "title": "OpenAPI Plant Store",
+ "description": "A sample API that uses a plant store as an example to demonstrate features in the OpenAPI specification",
+ "license": {
+ "name": "MIT"
+ },
+ "version": "1.0.0"
+ },
+ "servers": [
+ {
+ "url": "http://sandbox.mintlify.com"
+ }
+ ],
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "paths": {
+ "/plants": {
+ "get": {
+ "description": "Returns all plants from the system that the user has access to",
+ "parameters": [
+ {
+ "name": "limit",
+ "in": "query",
+ "description": "The maximum number of results to return",
+ "schema": {
+ "type": "integer",
+ "format": "int32"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Plant response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "$ref": "#/components/schemas/Plant"
+ }
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Unexpected error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ }
+ }
+ }
+ },
+ "post": {
+ "description": "Creates a new plant in the store",
+ "requestBody": {
+ "description": "Plant to add to the store",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/NewPlant"
+ }
+ }
+ },
+ "required": true
+ },
+ "responses": {
+ "200": {
+ "description": "plant response",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Plant"
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "unexpected error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/plants/{id}": {
+ "delete": {
+ "description": "Deletes a single plant based on the ID supplied",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "description": "ID of plant to delete",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ ],
+ "responses": {
+ "204": {
+ "description": "Plant deleted",
+ "content": {}
+ },
+ "400": {
+ "description": "unexpected error",
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Error"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "components": {
+ "schemas": {
+ "Plant": {
+ "required": [
+ "name"
+ ],
+ "type": "object",
+ "properties": {
+ "name": {
+ "description": "The name of the plant",
+ "type": "string"
+ },
+ "tag": {
+ "description": "Tag to specify the type",
+ "type": "string"
+ }
+ }
+ },
+ "NewPlant": {
+ "allOf": [
+ {
+ "$ref": "#/components/schemas/Plant"
+ },
+ {
+ "required": [
+ "id"
+ ],
+ "type": "object",
+ "properties": {
+ "id": {
+ "description": "Identification number of the plant",
+ "type": "integer",
+ "format": "int64"
+ }
+ }
+ }
+ ]
+ },
+ "Error": {
+ "required": [
+ "error",
+ "message"
+ ],
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "integer",
+ "format": "int32"
+ },
+ "message": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "securitySchemes": {
+ "bearerAuth": {
+ "type": "http",
+ "scheme": "bearer"
+ }
+ }
+ }
+} \ No newline at end of file