-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(OAPlaygroundResponse): Allows to handle multiple response types (#…
…55) * feat(Badge): size variants * change(OACodeBlock): allows to pass Object/Array prop * change(OASchemaPropertyAttributes): use code instead of Badge * feat(OAPlaygroundResponse): Allows to handle multiple responses types * docs: response-types * fix(OATryItButton): interface * chore: rename openapi-response-types.json * docs: response-statuses * chore(OAPlaygroundResponse): downloadBlob * chore: release v0.0.3-alpha.32
- Loading branch information
1 parent
0844ecc
commit d539a79
Showing
20 changed files
with
554 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
aside: false | ||
outline: false | ||
title: vitepress-theme-openapi | ||
--- | ||
|
||
<script setup lang="ts"> | ||
import { useData } from 'vitepress' | ||
import spec from '../../docs/public/openapi-response-statuses.json' | ||
|
||
const { isDark } = useData() | ||
</script> | ||
|
||
<OASpec :spec="spec" :isDark="isDark" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
aside: false | ||
outline: false | ||
title: vitepress-theme-openapi | ||
--- | ||
|
||
<script setup lang="ts"> | ||
import { useData } from 'vitepress' | ||
import spec from '../../docs/public/openapi-response-types.json' | ||
|
||
const { isDark } = useData() | ||
</script> | ||
|
||
<OASpec :spec="spec" :isDark="isDark" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
aside: false | ||
outline: false | ||
title: vitepress-theme-openapi | ||
--- | ||
|
||
<script setup lang="ts"> | ||
import { useData } from 'vitepress' | ||
import spec from '../../public/openapi-response-statuses.json' | ||
|
||
const { isDark } = useData() | ||
</script> | ||
|
||
<OASpec :spec="spec" :isDark="isDark" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
aside: false | ||
outline: false | ||
title: vitepress-theme-openapi | ||
--- | ||
|
||
<script setup lang="ts"> | ||
import { useData } from 'vitepress' | ||
import spec from '../../public/openapi-response-types.json' | ||
|
||
const { isDark } = useData() | ||
</script> | ||
|
||
<OASpec :spec="spec" :isDark="isDark" /> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
"title": "Response statuses", | ||
"description": "Example of an OpenAPI document with response statuses.", | ||
"version": "1.0.0", | ||
"license": { | ||
"name": "MIT" | ||
} | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "https://httpstat.us/" | ||
} | ||
], | ||
"paths": { | ||
"200": { | ||
"get": { | ||
"operationId": "get200", | ||
"summary": "Get 200", | ||
"description": "Example of a response with a 200 status code.", | ||
"responses": { | ||
"200": { | ||
"description": "Successful response", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"example": "200 OK" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"201": { | ||
"get": { | ||
"operationId": "get201", | ||
"summary": "Get 201", | ||
"description": "Example of a response with a 201 status code.", | ||
"responses": { | ||
"201": { | ||
"description": "Created", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"example": "201 Created" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"400": { | ||
"get": { | ||
"operationId": "get400", | ||
"summary": "Get 400", | ||
"description": "Example of a response with a 400 status code.", | ||
"responses": { | ||
"400": { | ||
"description": "Bad Request", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"example": "400 Bad Request" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"401": { | ||
"get": { | ||
"operationId": "get401", | ||
"summary": "Get 401", | ||
"description": "Example of a response with a 401 status code.", | ||
"responses": { | ||
"401": { | ||
"description": "Unauthorized", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"example": "401 Unauthorized" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"403": { | ||
"get": { | ||
"operationId": "get403", | ||
"summary": "Get 403", | ||
"description": "Example of a response with a 403 status code.", | ||
"responses": { | ||
"403": { | ||
"description": "Forbidden", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"example": "403 Forbidden" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"404": { | ||
"get": { | ||
"operationId": "get404", | ||
"summary": "Get 404", | ||
"description": "Example of a response with a 404 status code.", | ||
"responses": { | ||
"404": { | ||
"description": "Not Found", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"example": "404 Not Found" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"500": { | ||
"get": { | ||
"operationId": "get500", | ||
"summary": "Get 500", | ||
"description": "Example of a response with a 500 status code.", | ||
"responses": { | ||
"500": { | ||
"description": "Internal Server Error", | ||
"content": { | ||
"application/json": { | ||
"schema": { | ||
"type": "object", | ||
"properties": { | ||
"status": { | ||
"type": "string", | ||
"example": "500 Internal Server Error" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
"title": "Multiple response types", | ||
"description": "Example of an OpenAPI document with multiple response types.", | ||
"version": "1.0.0", | ||
"license": { | ||
"name": "MIT" | ||
}, | ||
"contact": { | ||
"name": "OpenAI", | ||
"url": "https://openai.com" | ||
}, | ||
"termsOfService": "https://openai.com/terms" | ||
}, | ||
"servers": [ | ||
{ | ||
"url": "https://cdn.openai.com/API" | ||
} | ||
], | ||
"paths": { | ||
"/docs/audio/alloy.wav": { | ||
"get": { | ||
"operationId": "getAudio", | ||
"summary": "Get audio", | ||
"description": "Example of a response with an audio file.", | ||
"responses": { | ||
"200": { | ||
"description": "Successful response", | ||
"content": { | ||
"audio/wav": { | ||
"schema": { | ||
"type": "string", | ||
"format": "binary", | ||
"description": "An example of the `alloy` voice." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"/images/guides/simple-cat-image-dall-e-3.webp": { | ||
"get": { | ||
"operationId": "getImage", | ||
"summary": "Get image", | ||
"description": "Example of a response with an image file.", | ||
"responses": { | ||
"200": { | ||
"description": "Successful response", | ||
"content": { | ||
"image/webp": { | ||
"schema": { | ||
"type": "string", | ||
"format": "binary", | ||
"description": "An image generated by DALL-E 3." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "vitepress-theme-openapi", | ||
"type": "module", | ||
"version": "0.0.3-alpha.31", | ||
"version": "0.0.3-alpha.32", | ||
"packageManager": "[email protected]", | ||
"homepage": "https://vitepress-theme-openapi.vercel.app/", | ||
"repository": { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.