Skip to content

Commit

Permalink
fix: remove docs path and update codeblocks highlight css
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Lin committed Jan 31, 2023
1 parent 879725f commit a933013
Show file tree
Hide file tree
Showing 31 changed files with 62 additions and 50 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ npm-debug.log*
yarn-debug.log*
yarn-error.log*
.vercel
.envrc
21 changes: 21 additions & 0 deletions docs/advanced/configuration-files/sidebars.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,24 @@
title: sidebars.js
sidebar_position: 4
---

By default, the sidebars are defined in `sidebars.js` in the root folder of this repo.

Under the key `config > presents > docs > sidebarPath` is where the path to the `sidebars.js` is referred for the docs plugin for Docusaurus.

```js title="docusaurus.config.js" {8}
const config = {
...
presets: [
[
"classic",
{
docs: {
sidebarPath: require.resolve("./sidebars.js"),
...
},
},
],
],
};
```
11 changes: 0 additions & 11 deletions docs/advanced/index.mdx

This file was deleted.

2 changes: 1 addition & 1 deletion docs/advanced/remove-openapi-demo.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ As part of this template repo, two options have been tested and provided for inc
Click on the links to see the demo.

- [_redocusaurus_](/api)
- [_docusaurus-plugin-openapi-docs_](/docs/category/test-api)
- [_docusaurus-plugin-openapi-docs_](/category/test-api)

## Choosing between both plugins

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/add-pet.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ api:
},
}
sidebar_class_name: "post api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/create-user.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -544,7 +544,7 @@ api:
},
}
sidebar_class_name: "post api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/create-users-with-array-input.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ api:
},
}
sidebar_class_name: "post api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/create-users-with-list-input.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ api:
},
}
sidebar_class_name: "post api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/delete-order.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ api:
},
}
sidebar_class_name: "delete api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/delete-pet.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ api:
},
}
sidebar_class_name: "delete api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/delete-user.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ api:
},
}
sidebar_class_name: "delete api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/find-pets-by-status.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ api:
},
}
sidebar_class_name: "get api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/find-pets-by-tags.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ api:
},
}
sidebar_class_name: "get api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/get-inventory.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ api:
},
}
sidebar_class_name: "get api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
4 changes: 2 additions & 2 deletions docs/test-api/get-order-by-id.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ api:
},
}
sidebar_class_name: "get api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand All @@ -296,7 +296,7 @@ For valid response try integer IDs with value <= 5 or > 10. Other values will ge

successful operation

</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"object"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"petId"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"object"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"quantity"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"int32"} qualifierMessage={"**Possible values:** `>= 1`"} defaultValue={1}></SchemaItem><SchemaItem collapsible={false} name={"shipDate"} required={false} deprecated={undefined} schemaDescription={"Estimated ship date"} schemaName={"date-time"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"status"} required={false} deprecated={undefined} schemaDescription={"Order Status"} schemaName={"string"} qualifierMessage={"**Possible values:** [`placed`, `approved`, `delivered`]"} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"complete"} required={false} deprecated={undefined} schemaDescription={"Indicates whenever order was completed or not"} schemaName={"boolean"} qualifierMessage={undefined} defaultValue={false}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": 0,\n \"petId\": 0,\n \"quantity\": 1,\n \"shipDate\": \"2023-01-30\",\n \"status\": \"placed\",\n \"complete\": false\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem><TabItem label={"application/xml"} value={"application/xml"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"object"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"petId"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"object"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"quantity"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"int32"} qualifierMessage={"**Possible values:** `>= 1`"} defaultValue={1}></SchemaItem><SchemaItem collapsible={false} name={"shipDate"} required={false} deprecated={undefined} schemaDescription={"Estimated ship date"} schemaName={"date-time"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"status"} required={false} deprecated={undefined} schemaDescription={"Order Status"} schemaName={"string"} qualifierMessage={"**Possible values:** [`placed`, `approved`, `delivered`]"} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"complete"} required={false} deprecated={undefined} schemaDescription={"Indicates whenever order was completed or not"} schemaName={"boolean"} qualifierMessage={undefined} defaultValue={false}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"<root>\n <id>0</id>\n <petId>0</petId>\n <quantity>1</quantity>\n <shipDate>2023-01-30</shipDate>\n <status>placed</status>\n <complete>false</complete>\n</root>"} language={"xml"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>
</div><div><MimeTabs schemaType={"response"}><TabItem label={"application/json"} value={"application/json"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"object"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"petId"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"object"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"quantity"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"int32"} qualifierMessage={"**Possible values:** `>= 1`"} defaultValue={1}></SchemaItem><SchemaItem collapsible={false} name={"shipDate"} required={false} deprecated={undefined} schemaDescription={"Estimated ship date"} schemaName={"date-time"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"status"} required={false} deprecated={undefined} schemaDescription={"Order Status"} schemaName={"string"} qualifierMessage={"**Possible values:** [`placed`, `approved`, `delivered`]"} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"complete"} required={false} deprecated={undefined} schemaDescription={"Indicates whenever order was completed or not"} schemaName={"boolean"} qualifierMessage={undefined} defaultValue={false}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"{\n \"id\": 0,\n \"petId\": 0,\n \"quantity\": 1,\n \"shipDate\": \"2023-01-31\",\n \"status\": \"placed\",\n \"complete\": false\n}"} language={"json"}></ResponseSamples></TabItem></SchemaTabs></TabItem><TabItem label={"application/xml"} value={"application/xml"}><SchemaTabs><TabItem label={"Schema"} value={"Schema"}><details style={{}} data-collapsed={false} open={true}><summary style={{"textAlign":"left"}}><strong>Schema</strong></summary><div style={{"textAlign":"left","marginLeft":"1rem"}}></div><ul style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"id"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"object"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"petId"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"object"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"quantity"} required={false} deprecated={undefined} schemaDescription={undefined} schemaName={"int32"} qualifierMessage={"**Possible values:** `>= 1`"} defaultValue={1}></SchemaItem><SchemaItem collapsible={false} name={"shipDate"} required={false} deprecated={undefined} schemaDescription={"Estimated ship date"} schemaName={"date-time"} qualifierMessage={undefined} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"status"} required={false} deprecated={undefined} schemaDescription={"Order Status"} schemaName={"string"} qualifierMessage={"**Possible values:** [`placed`, `approved`, `delivered`]"} defaultValue={undefined}></SchemaItem><SchemaItem collapsible={false} name={"complete"} required={false} deprecated={undefined} schemaDescription={"Indicates whenever order was completed or not"} schemaName={"boolean"} qualifierMessage={undefined} defaultValue={false}></SchemaItem></ul></details></TabItem><TabItem label={"Example (from schema)"} value={"Example (from schema)"}><ResponseSamples responseExample={"<root>\n <id>0</id>\n <petId>0</petId>\n <quantity>1</quantity>\n <shipDate>2023-01-31</shipDate>\n <status>placed</status>\n <complete>false</complete>\n</root>"} language={"xml"}></ResponseSamples></TabItem></SchemaTabs></TabItem></MimeTabs></div></TabItem><TabItem label={"400"} value={"400"}><div>

Invalid ID supplied

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/get-pet-by-id.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -744,7 +744,7 @@ api:
},
}
sidebar_class_name: "get api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/get-user-by-name.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -973,7 +973,7 @@ api:
},
}
sidebar_class_name: "get api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/login-user.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ api:
},
}
sidebar_class_name: "get api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/logout-user.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ api:
},
}
sidebar_class_name: "get api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
2 changes: 1 addition & 1 deletion docs/test-api/new-pet.api.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ api:
},
}
sidebar_class_name: "event api-method"
info_path: docs/test-api/swagger-petstore-yaml
info_path: test-api/swagger-petstore-yaml
custom_edit_url: null
---

Expand Down
Loading

0 comments on commit a933013

Please sign in to comment.