Skip to content

Commit 3014b9c

Browse files
authored
Initial commit
0 parents  commit 3014b9c

24 files changed

+1439
-0
lines changed

README.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Mintlify Starter Kit
2+
3+
Click on `Use this template` to copy the Mintlify starter kit. The starter kit contains examples including
4+
5+
- Guide pages
6+
- Navigation
7+
- Customizations
8+
- API Reference pages
9+
- Use of popular components
10+
11+
### Development
12+
13+
Install the [Mintlify CLI](https://www.npmjs.com/package/mintlify) to preview the documentation changes locally. To install, use the following command
14+
15+
```
16+
npm i -g mintlify
17+
```
18+
19+
Run the following command at the root of your documentation (where docs.json is)
20+
21+
```
22+
mintlify dev
23+
```
24+
25+
### Publishing Changes
26+
27+
Install our Github App to auto propagate changes from your repo to your deployment. Changes will be deployed to production automatically after pushing to the default branch. Find the link to install on your dashboard.
28+
29+
#### Troubleshooting
30+
31+
- Mintlify dev isn't running - Run `mintlify install` it'll re-install dependencies.
32+
- Page loads as a 404 - Make sure you are running in a folder with `docs.json`

api-reference/endpoint/create.mdx

+4
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

+4
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

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

api-reference/endpoint/webhook.mdx

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: 'New Plant'
3+
openapi: 'WEBHOOK /plant/webhook'
4+
---

api-reference/introduction.mdx

+33
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

+217
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,217 @@
1+
{
2+
"openapi": "3.1.0",
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+
"webhooks": {
134+
"/plant/webhook": {
135+
"post": {
136+
"description": "Information about a new plant added to the store",
137+
"requestBody": {
138+
"description": "Plant added to the store",
139+
"content": {
140+
"application/json": {
141+
"schema": {
142+
"$ref": "#/components/schemas/NewPlant"
143+
}
144+
}
145+
}
146+
},
147+
"responses": {
148+
"200": {
149+
"description": "Return a 200 status to indicate that the data was received successfully"
150+
}
151+
}
152+
}
153+
}
154+
},
155+
"components": {
156+
"schemas": {
157+
"Plant": {
158+
"required": [
159+
"name"
160+
],
161+
"type": "object",
162+
"properties": {
163+
"name": {
164+
"description": "The name of the plant",
165+
"type": "string"
166+
},
167+
"tag": {
168+
"description": "Tag to specify the type",
169+
"type": "string"
170+
}
171+
}
172+
},
173+
"NewPlant": {
174+
"allOf": [
175+
{
176+
"$ref": "#/components/schemas/Plant"
177+
},
178+
{
179+
"required": [
180+
"id"
181+
],
182+
"type": "object",
183+
"properties": {
184+
"id": {
185+
"description": "Identification number of the plant",
186+
"type": "integer",
187+
"format": "int64"
188+
}
189+
}
190+
}
191+
]
192+
},
193+
"Error": {
194+
"required": [
195+
"error",
196+
"message"
197+
],
198+
"type": "object",
199+
"properties": {
200+
"error": {
201+
"type": "integer",
202+
"format": "int32"
203+
},
204+
"message": {
205+
"type": "string"
206+
}
207+
}
208+
}
209+
},
210+
"securitySchemes": {
211+
"bearerAuth": {
212+
"type": "http",
213+
"scheme": "bearer"
214+
}
215+
}
216+
}
217+
}

0 commit comments

Comments
 (0)