Skip to content

Commit 45b115e

Browse files
committed
Update docs
1 parent 6cfd333 commit 45b115e

Some content is hidden

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

48 files changed

+1723
-431
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
openapi: 3.1.0
2+
info:
3+
title: Non-oAuth Scopes example
4+
version: 1.0.0
5+
paths:
6+
/users:
7+
get:
8+
security:
9+
- bearerAuth:
10+
- 'read:users'
11+
- 'public'
12+
components:
13+
securitySchemes:
14+
bearerAuth:
15+
type: http
16+
scheme: bearer
17+
bearerFormat: jwt
18+
description: 'note: non-oauth scopes are not defined at the securityScheme level'
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
openapi: 3.1.0
2+
info:
3+
title: Webhook Example
4+
version: 1.0.0
5+
# Since OAS 3.1.0 the paths element isn't necessary. Now a valid OpenAPI Document can describe only paths, webhooks, or even only reusable components
6+
webhooks:
7+
# Each webhook needs a name
8+
newPet:
9+
# This is a Path Item Object, the only difference is that the request is initiated by the API provider
10+
post:
11+
requestBody:
12+
description: Information about a new pet in the system
13+
content:
14+
application/json:
15+
schema:
16+
$ref: "#/components/schemas/Pet"
17+
responses:
18+
"200":
19+
description: Return a 200 status to indicate that the data was received successfully
20+
21+
components:
22+
schemas:
23+
Pet:
24+
required:
25+
- id
26+
- name
27+
properties:
28+
id:
29+
type: integer
30+
format: int64
31+
name:
32+
type: string
33+
tag:
34+
type: string
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
Support using local OpenAPI Specification file on website.
2+
3+
## Markdown
4+
5+
```html
6+
<swagger-ui src="./openapi-spec/sample.yaml"/>
7+
```
8+
9+
## Swagger UI
10+
11+
<swagger-ui src="./openapi-spec/v3.1/non-oauth-scopes.yaml"/>
12+
13+
<swagger-ui src="./openapi-spec/v3.1/webhook-example.yaml"/>

demo-mkdocs/docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ A MkDocs plugin supports for add [Swagger UI](https://github.com/swagger-api/swa
2121
1. Python Package
2222
1. beautifulsoup4>=4.11.1
2323
2. [Swagger UI dist](https://www.npmjs.com/package/swagger-ui-dist) javascript file and css file
24-
1. swagger-ui-dist==4.14.0
24+
1. swagger-ui-dist==5.0.0-alpha.0
2525

2626
## Usage
2727

demo-mkdocs/mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,4 @@ nav:
6868
- Multiple: demo/multiple.md
6969
- Build-in Multiple: demo/build-in-multiple.md
7070
- OAuth2 Initialization: demo/oauth2.md
71+
- OpenAPI v3.1: demo/openapi-v3.1.md

0 commit comments

Comments
 (0)