-
Notifications
You must be signed in to change notification settings - Fork 318
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(queries): update queries catalog
- Loading branch information
1 parent
4d0afd1
commit fcece3e
Showing
2 changed files
with
524 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -457,7 +457,41 @@ paths: | |
} | ||
|
||
``` | ||
```json title="Negative test num. 2 - json file" | ||
```yaml title="Negative test num. 2 - yaml file" | ||
swagger: "2.0" | ||
info: | ||
title: Simple API Overview | ||
version: 1.0.0 | ||
paths: | ||
"/": | ||
get: | ||
operationId: listVersionsv2 | ||
summary: List API versions | ||
responses: | ||
"200": | ||
description: 200 response | ||
schema: | ||
type: object | ||
discriminator: petType | ||
additionalProperties: false | ||
properties: | ||
code: | ||
type: string | ||
maxLength: 15 | ||
enum: | ||
- brown | ||
- grey | ||
- black | ||
- white | ||
message: | ||
type: string | ||
format: date | ||
extra: | ||
type: string | ||
format: date-time | ||
|
||
``` | ||
```json title="Negative test num. 3 - json file" | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
|
@@ -531,7 +565,9 @@ paths: | |
} | ||
|
||
``` | ||
```yaml title="Negative test num. 3 - yaml file" | ||
<details><summary>Negative test num. 4 - yaml file</summary> | ||
|
||
```yaml | ||
openapi: 3.0.0 | ||
info: | ||
title: Simple API Overview | ||
|
@@ -585,7 +621,8 @@ components: | |
$ref: "#/components/schemas/GeneralError" | ||
|
||
``` | ||
<details><summary>Negative test num. 4 - yaml file</summary> | ||
</details> | ||
<details><summary>Negative test num. 5 - yaml file</summary> | ||
|
||
```yaml | ||
openapi: 3.0.0 | ||
|
@@ -630,7 +667,7 @@ paths: | |
|
||
``` | ||
</details> | ||
<details><summary>Negative test num. 5 - json file</summary> | ||
<details><summary>Negative test num. 6 - json file</summary> | ||
|
||
```json | ||
{ | ||
|
@@ -680,7 +717,7 @@ paths: | |
|
||
``` | ||
</details> | ||
<details><summary>Negative test num. 6 - yaml file</summary> | ||
<details><summary>Negative test num. 7 - yaml file</summary> | ||
|
||
```yaml | ||
swagger: "2.0" | ||
|
@@ -712,3 +749,223 @@ paths: | |
|
||
``` | ||
</details> | ||
<details><summary>Negative test num. 8 - json file</summary> | ||
|
||
```json | ||
{ | ||
"openapi": "3.0.0", | ||
"info": { | ||
"title": "Simple API Overview", | ||
"version": "1.0.0", | ||
"contact": { | ||
"name": "contact", | ||
"url": "https://www.google.com/", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"paths": { | ||
"/": { | ||
"get": { | ||
"operationId": "listVersionsv2", | ||
"summary": "List API versions", | ||
"responses": { | ||
"200": { | ||
"description": "200 response", | ||
"content": { | ||
"application/json": { | ||
"examples": { | ||
"foo": { | ||
"value": { | ||
"versions": [ | ||
{ | ||
"status": "CURRENT", | ||
"updated": "2011-01-21T11:33:21Z", | ||
"id": "v2.0", | ||
"links": [ | ||
{ | ||
"href": "http://127.0.0.1:8774/v2/", | ||
"rel": "self" | ||
} | ||
] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"components": { | ||
"schemas": { | ||
"GeneralError": { | ||
"type": "object", | ||
"discriminator": { | ||
"propertyName": "petType" | ||
}, | ||
"additionalProperties": false, | ||
"properties": { | ||
"code": { | ||
"type": "string", | ||
"maxLength": 15, | ||
"enum": [ | ||
"brown", | ||
"grey", | ||
"black", | ||
"white" | ||
] | ||
}, | ||
"message": { | ||
"type": "string", | ||
"format": "date" | ||
}, | ||
"extra": { | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
}, | ||
"required": [ | ||
"petType" | ||
] | ||
} | ||
}, | ||
"requestBodies": { | ||
"NewItem": { | ||
"description": "A JSON object containing item data", | ||
"required": true, | ||
"content": { | ||
"multipart/form-data": { | ||
"schema": { | ||
"$ref": "#/components/schemas/GeneralError" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
``` | ||
</details> | ||
<details><summary>Negative test num. 9 - yaml file</summary> | ||
|
||
```yaml | ||
openapi: 3.0.0 | ||
info: | ||
title: Simple API Overview | ||
version: 1.0.0 | ||
paths: | ||
"/": | ||
get: | ||
operationId: listVersionsv2 | ||
summary: List API versions | ||
responses: | ||
"200": | ||
description: 200 response | ||
content: | ||
application/json: | ||
examples: | ||
foo: | ||
value: | ||
versions: | ||
- status: CURRENT | ||
updated: "2011-01-21T11:33:21Z" | ||
id: v2.0 | ||
links: | ||
- href: http://127.0.0.1:8774/v2/ | ||
rel: self | ||
components: | ||
schemas: | ||
GeneralError: | ||
type: object | ||
discriminator: | ||
propertyName: petType | ||
additionalProperties: false | ||
properties: | ||
code: | ||
type: string | ||
maxLength: 15 | ||
enum: | ||
- brown | ||
- grey | ||
- black | ||
- white | ||
message: | ||
type: string | ||
format: date | ||
extra: | ||
type: string | ||
format: date-time | ||
required: | ||
- petType | ||
requestBodies: | ||
NewItem: | ||
description: A JSON object containing item data | ||
required: true | ||
content: | ||
multipart/form-data: | ||
schema: | ||
$ref: "#/components/schemas/GeneralError" | ||
|
||
``` | ||
</details> | ||
<details><summary>Negative test num. 10 - json file</summary> | ||
|
||
```json | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "Simple API Overview", | ||
"version": "1.0.0", | ||
"contact": { | ||
"name": "contact", | ||
"url": "https://www.google.com/", | ||
"email": "[email protected]" | ||
} | ||
}, | ||
"paths": { | ||
"/": { | ||
"get": { | ||
"responses": { | ||
"200": { | ||
"description": "200 response", | ||
"schema": { | ||
"discriminator": "petType", | ||
"additionalProperties": false, | ||
"properties": { | ||
"code": { | ||
"type": "string", | ||
"maxLength": 15, | ||
"enum": [ | ||
"brown", | ||
"grey", | ||
"black", | ||
"white" | ||
] | ||
}, | ||
"message": { | ||
"type": "string", | ||
"format": "date" | ||
}, | ||
"extra": { | ||
"type": "string", | ||
"format": "date-time" | ||
} | ||
}, | ||
"required": [ | ||
"petType" | ||
], | ||
"type": "object" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
} | ||
|
||
``` | ||
</details> |
Oops, something went wrong.