Skip to content

Commit cfb123d

Browse files
committed
move to mintlify
1 parent 7448c90 commit cfb123d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

71 files changed

+1896
-1177
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 32 deletions
This file was deleted.

Makefile

Lines changed: 0 additions & 8 deletions
This file was deleted.

README.md

Lines changed: 0 additions & 41 deletions
This file was deleted.

api-reference/endpoint/create.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: 'Create Plant'
3+
openapi: 'POST /plants'
4+
---

api-reference/endpoint/delete.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: 'Delete Plant'
3+
openapi: 'DELETE /plants/{id}'
4+
---

api-reference/endpoint/get.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: 'Get Plants'
3+
openapi: 'GET /plants'
4+
---

api-reference/introduction.mdx

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
title: 'Introduction'
3+
description: 'Example section for showcasing API endpoints'
4+
---
5+
6+
<Note>
7+
If you're not looking to build API reference documentation, you can delete
8+
this section by removing the api-reference folder.
9+
</Note>
10+
11+
## Welcome
12+
13+
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.
14+
15+
<Card
16+
title="Plant Store Endpoints"
17+
icon="leaf"
18+
href="https://github.com/mintlify/starter/blob/main/api-reference/openapi.json"
19+
>
20+
View the OpenAPI specification file
21+
</Card>
22+
23+
## Authentication
24+
25+
All API endpoints are authenticated using Bearer tokens and picked up from the specification file.
26+
27+
```json
28+
"security": [
29+
{
30+
"bearerAuth": []
31+
}
32+
]
33+
```

api-reference/openapi.json

Lines changed: 195 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,195 @@
1+
{
2+
"openapi": "3.0.1",
3+
"info": {
4+
"title": "OpenAPI Plant Store",
5+
"description": "A sample API that uses a plant store as an example to demonstrate features in the OpenAPI specification",
6+
"license": {
7+
"name": "MIT"
8+
},
9+
"version": "1.0.0"
10+
},
11+
"servers": [
12+
{
13+
"url": "http://sandbox.mintlify.com"
14+
}
15+
],
16+
"security": [
17+
{
18+
"bearerAuth": []
19+
}
20+
],
21+
"paths": {
22+
"/plants": {
23+
"get": {
24+
"description": "Returns all plants from the system that the user has access to",
25+
"parameters": [
26+
{
27+
"name": "limit",
28+
"in": "query",
29+
"description": "The maximum number of results to return",
30+
"schema": {
31+
"type": "integer",
32+
"format": "int32"
33+
}
34+
}
35+
],
36+
"responses": {
37+
"200": {
38+
"description": "Plant response",
39+
"content": {
40+
"application/json": {
41+
"schema": {
42+
"type": "array",
43+
"items": {
44+
"$ref": "#/components/schemas/Plant"
45+
}
46+
}
47+
}
48+
}
49+
},
50+
"400": {
51+
"description": "Unexpected error",
52+
"content": {
53+
"application/json": {
54+
"schema": {
55+
"$ref": "#/components/schemas/Error"
56+
}
57+
}
58+
}
59+
}
60+
}
61+
},
62+
"post": {
63+
"description": "Creates a new plant in the store",
64+
"requestBody": {
65+
"description": "Plant to add to the store",
66+
"content": {
67+
"application/json": {
68+
"schema": {
69+
"$ref": "#/components/schemas/NewPlant"
70+
}
71+
}
72+
},
73+
"required": true
74+
},
75+
"responses": {
76+
"200": {
77+
"description": "plant response",
78+
"content": {
79+
"application/json": {
80+
"schema": {
81+
"$ref": "#/components/schemas/Plant"
82+
}
83+
}
84+
}
85+
},
86+
"400": {
87+
"description": "unexpected error",
88+
"content": {
89+
"application/json": {
90+
"schema": {
91+
"$ref": "#/components/schemas/Error"
92+
}
93+
}
94+
}
95+
}
96+
}
97+
}
98+
},
99+
"/plants/{id}": {
100+
"delete": {
101+
"description": "Deletes a single plant based on the ID supplied",
102+
"parameters": [
103+
{
104+
"name": "id",
105+
"in": "path",
106+
"description": "ID of plant to delete",
107+
"required": true,
108+
"schema": {
109+
"type": "integer",
110+
"format": "int64"
111+
}
112+
}
113+
],
114+
"responses": {
115+
"204": {
116+
"description": "Plant deleted",
117+
"content": {}
118+
},
119+
"400": {
120+
"description": "unexpected error",
121+
"content": {
122+
"application/json": {
123+
"schema": {
124+
"$ref": "#/components/schemas/Error"
125+
}
126+
}
127+
}
128+
}
129+
}
130+
}
131+
}
132+
},
133+
"components": {
134+
"schemas": {
135+
"Plant": {
136+
"required": [
137+
"name"
138+
],
139+
"type": "object",
140+
"properties": {
141+
"name": {
142+
"description": "The name of the plant",
143+
"type": "string"
144+
},
145+
"tag": {
146+
"description": "Tag to specify the type",
147+
"type": "string"
148+
}
149+
}
150+
},
151+
"NewPlant": {
152+
"allOf": [
153+
{
154+
"$ref": "#/components/schemas/Plant"
155+
},
156+
{
157+
"required": [
158+
"id"
159+
],
160+
"type": "object",
161+
"properties": {
162+
"id": {
163+
"description": "Identification number of the plant",
164+
"type": "integer",
165+
"format": "int64"
166+
}
167+
}
168+
}
169+
]
170+
},
171+
"Error": {
172+
"required": [
173+
"error",
174+
"message"
175+
],
176+
"type": "object",
177+
"properties": {
178+
"error": {
179+
"type": "integer",
180+
"format": "int32"
181+
},
182+
"message": {
183+
"type": "string"
184+
}
185+
}
186+
}
187+
},
188+
"securitySchemes": {
189+
"bearerAuth": {
190+
"type": "http",
191+
"scheme": "bearer"
192+
}
193+
}
194+
}
195+
}

0 commit comments

Comments
 (0)