Skip to content

Commit b4fc51f

Browse files
authored
Add yaml example (#70)
1 parent ef5a394 commit b4fc51f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

demo/docusaurus.config.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,14 @@ const config = {
5959
routeBasePath: "cos",
6060
},
6161
],
62+
[
63+
"docusaurus-plugin-openapi",
64+
{
65+
id: "yaml",
66+
path: "examples/openapi.yaml",
67+
routeBasePath: "yaml",
68+
},
69+
],
6270
],
6371

6472
themeConfig:
@@ -80,6 +88,7 @@ const config = {
8088
{ to: "/api", label: "API", position: "left" },
8189
{ to: "/issue-21", label: "Issue 21", position: "left" },
8290
{ to: "/cos", label: "COS", position: "left" },
91+
{ to: "/yaml", label: "YAML", position: "left" },
8392
{ to: "/blog", label: "Blog", position: "left" },
8493
{
8594
href: "https://github.com/facebook/docusaurus",

demo/examples/openapi.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
openapi: 3.0.3
2+
info:
3+
title: YAML Example
4+
version: 1.0.0
5+
description: Sample description.
6+
paths:
7+
/hello:
8+
get:
9+
summary: Hello World
10+
description: Example OpenApi definition with YAML.
11+
responses:
12+
200:
13+
description: OK

0 commit comments

Comments
 (0)