-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
da1d024
commit c70519b
Showing
11 changed files
with
201 additions
and
5 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
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
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
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,22 @@ | ||
# Example with requestBody component, see https://github.com/Neoteroi/essentials-openapi/issues/21 | ||
openapi: 3.0.1 | ||
info: | ||
title: Test | ||
version: v1 | ||
paths: | ||
"/something": | ||
post: | ||
requestBody: | ||
$ref: "#/components/requestBodies/SomeBody" | ||
components: | ||
requestBodies: | ||
SomeBody: | ||
description: Foo Bar. | ||
required: true | ||
content: | ||
application/json: | ||
schema: | ||
type: object | ||
properties: | ||
a: | ||
type: string |
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,50 @@ | ||
<!-- | ||
This Markdown has been generated by essentials-openapi | ||
https://github.com/Neoteroi/essentials-openapi | ||
Most likely, it is not desirable to edit this file by hand! | ||
--> | ||
|
||
# Test <span class="api-version">v1</span> | ||
|
||
|
||
## <span class="api-tag"></span> | ||
|
||
<hr class="operation-separator" /> | ||
|
||
### <span class="http-post">POST</span> /something | ||
|
||
<p class="request-body-title"><strong>Request body</strong></p> | ||
|
||
|
||
|
||
=== "application/json" | ||
|
||
|
||
```json | ||
{ | ||
"a": "string" | ||
} | ||
``` | ||
<span class="small-note">⚠️</span> <em class="small-note warning">This example has been generated automatically from the schema and it is not accurate. Refer to the schema for more information.</em> | ||
|
||
|
||
|
||
??? hint "Schema of the request body" | ||
```json | ||
{ | ||
"type": "object", | ||
"properties": { | ||
"a": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
``` | ||
|
||
|
||
|
||
|
||
|
||
|
||
--- |
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,26 @@ | ||
# https://github.com/Neoteroi/essentials-openapi/issues/24 | ||
openapi: "3.0.2" | ||
info: | ||
title: API Title | ||
description: | | ||
**Response** | ||
```json | ||
[ | ||
{ | ||
"a": "b", | ||
"c": { | ||
"d": "e" | ||
} | ||
} | ||
] | ||
``` | ||
version: "1.0" | ||
servers: | ||
- url: https://api.server.test/v1 | ||
paths: | ||
/test: | ||
get: | ||
responses: | ||
'200': | ||
description: OK |
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,56 @@ | ||
<!-- | ||
This Markdown has been generated by essentials-openapi | ||
https://github.com/Neoteroi/essentials-openapi | ||
Most likely, it is not desirable to edit this file by hand! | ||
--> | ||
|
||
# API Title <span class="api-version">1.0</span> | ||
|
||
**Response** | ||
|
||
```json | ||
[ | ||
{ | ||
"a": "b", | ||
"c": { | ||
"d": "e" | ||
} | ||
} | ||
] | ||
``` | ||
<hr /> | ||
## Servers | ||
|
||
<table> | ||
<thead> | ||
<tr> | ||
<th>Description</th> | ||
<th>URL</th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr> | ||
<td>https://api.server.test/v1</td> | ||
<td> | ||
<a href="https://api.server.test/v1" target="_blank" rel="noopener noreferrer">https://api.server.test/v1</a> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
|
||
## <span class="api-tag"></span> | ||
|
||
<hr class="operation-separator" /> | ||
|
||
### <span class="http-get">GET</span> /test | ||
|
||
|
||
<p class="response-title"> | ||
<strong>Response <span class="response-code code-200">200</span> <span class="status-phrase">OK</span></strong> | ||
</p> | ||
|
||
|
||
|
||
|
||
--- |
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