mirror of
https://github.com/LukeHagar/redocly-cli.git
synced 2025-12-06 04:21:09 +00:00
chore: use prettier more (#1109)
This commit is contained in:
3
.github/CONTRIBUTING.md
vendored
3
.github/CONTRIBUTING.md
vendored
@@ -18,6 +18,7 @@ Hi! We're really excited that you are interested in contributing to Redocly CLI.
|
||||
- Abide by our [Code of Conduct](https://redocly.com/code-of-conduct/) in all your interactions on this repository, and show patience and respect to other community members.
|
||||
|
||||
## Pull Request Guidelines
|
||||
|
||||
Before submitting a pull request, please make sure the following is done:
|
||||
|
||||
1. Fork the repository and create your branch from `main`.
|
||||
@@ -38,7 +39,7 @@ $ npm install # or npm i
|
||||
|
||||
### Commonly used NPM scripts
|
||||
|
||||
``` bash
|
||||
```bash
|
||||
# run a separate CLI command
|
||||
$ npm run <command>
|
||||
|
||||
|
||||
9
.github/ISSUE_TEMPLATE/bug_report.md
vendored
9
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@@ -4,34 +4,41 @@ about: Create a report to help us improve
|
||||
title: ''
|
||||
labels: 'Type: Bug'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
|
||||
<!-- A clear and concise description of what the bug is. -->
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
|
||||
1. Given this `redocly.yaml` file
|
||||
2. And this OpenAPI file(s)
|
||||
3. Run this command with these arguments... `redocly ...`
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
|
||||
<!-- A clear and concise description of what you expected to happen. -->
|
||||
|
||||
**Logs**
|
||||
|
||||
<!-- If applicable, add logs to help explain your problem. -->
|
||||
|
||||
**OpenAPI definition**
|
||||
|
||||
<!-- If applicable, add an OpenAPI definition and `.redocly.yaml` configuration file that helps reproduce the problem.
|
||||
At a minimum, please state the specification version(s) you're using (e.g. 2.0, 3.0, 3.1). -->
|
||||
|
||||
**Redocly Version(s)**
|
||||
|
||||
<!-- What version of Redocly CLI are you using? -->
|
||||
|
||||
**`Node.js` Version(s)**
|
||||
|
||||
<!-- What version of `node.js` are you using? -->
|
||||
|
||||
**Additional context**
|
||||
|
||||
<!-- Add any other context about the problem here. -->
|
||||
|
||||
5
.github/ISSUE_TEMPLATE/feature_request.md
vendored
5
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@@ -4,17 +4,20 @@ about: Suggest an idea for this project
|
||||
title: ''
|
||||
labels: 'Type: Enhancement'
|
||||
assignees: ''
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
|
||||
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
|
||||
|
||||
**Describe the solution you'd like**
|
||||
|
||||
<!-- A clear and concise description of what you want to happen. -->
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
|
||||
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
|
||||
|
||||
**Additional context**
|
||||
|
||||
<!-- Add any other context or screenshots about the feature request here. -->
|
||||
|
||||
@@ -3,3 +3,6 @@ dist/
|
||||
packages/cli/lib/
|
||||
packages/core/lib/
|
||||
*snapshot.js
|
||||
packages/core/src/rules/__tests__/fixtures/invalid-yaml.yaml
|
||||
resources/output/invalid.json
|
||||
__tests__/webpack-bundle/bundle-workflows/metafile.json
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
{ 'type': 'string' }
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
{ 'type': 'string' }
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
{ 'type': 'string' }
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
{ 'type': 'string' }
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
{ 'type': 'string' }
|
||||
|
||||
@@ -1,3 +1 @@
|
||||
{
|
||||
"type": "string"
|
||||
}
|
||||
{ 'type': 'string' }
|
||||
|
||||
@@ -17,7 +17,7 @@ paths:
|
||||
get:
|
||||
summary: Get user by ID
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OK
|
||||
"404":
|
||||
'404':
|
||||
description: Not found
|
||||
|
||||
@@ -24,7 +24,7 @@ paths:
|
||||
x-private: true
|
||||
summary: Get an order by ID for a specific user
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OK
|
||||
"404":
|
||||
'404':
|
||||
description: Not found
|
||||
|
||||
@@ -17,7 +17,7 @@ paths:
|
||||
get:
|
||||
summary: Get user by ID
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OK
|
||||
"404":
|
||||
'404':
|
||||
description: Not found
|
||||
|
||||
@@ -24,7 +24,7 @@ paths:
|
||||
x-private: true
|
||||
summary: Get an order by ID for a specific user
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OK
|
||||
"404":
|
||||
'404':
|
||||
description: Not found
|
||||
|
||||
@@ -6,7 +6,8 @@ openapi: 3.0.0
|
||||
info:
|
||||
version: 1.0.0
|
||||
title: Example OpenAPI 3 definition.
|
||||
description: Test description from md file
|
||||
description: |
|
||||
Test description from md file
|
||||
license:
|
||||
name: MIT
|
||||
url: https://opensource.org/licenses/MIT
|
||||
|
||||
@@ -8,14 +8,14 @@ servers:
|
||||
paths:
|
||||
/users/{userId}/orders/{orderId}:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/userIdParam"
|
||||
- $ref: "#/components/parameters/orderIdParam"
|
||||
- $ref: '#/components/parameters/userIdParam'
|
||||
- $ref: '#/components/parameters/orderIdParam'
|
||||
get:
|
||||
summary: Get an order by ID for a specific user
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OK
|
||||
"404":
|
||||
'404':
|
||||
description: Not found
|
||||
components:
|
||||
parameters:
|
||||
|
||||
@@ -8,26 +8,26 @@ servers:
|
||||
paths:
|
||||
/users/{userId}/products/{productId}:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/userIdParam"
|
||||
- $ref: "#/components/parameters/productIdParam"
|
||||
- $ref: '#/components/parameters/userIdParam'
|
||||
- $ref: '#/components/parameters/productIdParam'
|
||||
get:
|
||||
summary: Get a product by ID for a specific user
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OK
|
||||
"404":
|
||||
'404':
|
||||
description: Not found
|
||||
/users/{userId}/orders/{orderId}/items/{itemId}:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/userIdParam"
|
||||
- $ref: "#/components/parameters/orderIdParam"
|
||||
- $ref: "#/components/parameters/itemIdParam"
|
||||
- $ref: '#/components/parameters/userIdParam'
|
||||
- $ref: '#/components/parameters/orderIdParam'
|
||||
- $ref: '#/components/parameters/itemIdParam'
|
||||
get:
|
||||
summary: Get an item by ID for a specific order and user
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: OK
|
||||
"404":
|
||||
'404':
|
||||
description: Not found
|
||||
components:
|
||||
parameters:
|
||||
|
||||
@@ -19,8 +19,7 @@ paths:
|
||||
description: string
|
||||
description: get Pet description
|
||||
servers:
|
||||
- url:
|
||||
/pet
|
||||
- url: /pet
|
||||
description: some description
|
||||
|
||||
get:
|
||||
@@ -30,8 +29,7 @@ paths:
|
||||
description: Returns a single pet
|
||||
operationId: getPetById
|
||||
servers:
|
||||
- url:
|
||||
/pet
|
||||
- url: /pet
|
||||
parameters:
|
||||
- name: petId
|
||||
in: path
|
||||
|
||||
@@ -17,10 +17,8 @@ paths:
|
||||
- name: param2
|
||||
in: header
|
||||
servers:
|
||||
- url:
|
||||
/test
|
||||
- url:
|
||||
/pets
|
||||
- url: /test
|
||||
- url: /pets
|
||||
description: another description
|
||||
post:
|
||||
tags:
|
||||
@@ -40,4 +38,3 @@ paths:
|
||||
responses:
|
||||
'200':
|
||||
description: oka
|
||||
|
||||
|
||||
@@ -12,10 +12,11 @@ minLength assertion failed because the Schema didn't meet the assertions: Requir
|
||||
31 | type: object
|
||||
| ^^^^^^^^^^^^
|
||||
32 | required:
|
||||
| ^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
… | < 18 more lines >
|
||||
51 | type: string
|
||||
| ^^^^^^^^^^^^
|
||||
52 |
|
||||
|
||||
Error was generated by the minLength assertion rule.
|
||||
|
||||
@@ -29,10 +30,11 @@ minLength assertion failed because the Schema didn't meet the assertions: Requir
|
||||
46 | type: object
|
||||
| ^^^^^^^^^^^^
|
||||
47 | required:
|
||||
| ^^^^^^^^^^
|
||||
| ^^^^^^^^^
|
||||
… | < 3 more lines >
|
||||
51 | type: string
|
||||
| ^^^^^^^^^^^^
|
||||
52 |
|
||||
|
||||
Error was generated by the minLength assertion rule.
|
||||
|
||||
|
||||
@@ -5,17 +5,17 @@ info:
|
||||
name: MIT
|
||||
url: example.com
|
||||
tags:
|
||||
- name: sometag
|
||||
- name: sometag
|
||||
description: sometag
|
||||
servers:
|
||||
- url: https://example.com
|
||||
- url: https://example.com
|
||||
security: []
|
||||
paths:
|
||||
/someGet:
|
||||
get:
|
||||
operationId: operationIdGet
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/header_Accept"
|
||||
- $ref: '#/components/parameters/header_Accept'
|
||||
responses:
|
||||
'200':
|
||||
description: ''
|
||||
|
||||
@@ -26,8 +26,8 @@ paths:
|
||||
summary: My resource
|
||||
description: summary example
|
||||
externalDocs:
|
||||
description: "Find more info here"
|
||||
url: "https://example.com"
|
||||
description: 'Find more info here'
|
||||
url: 'https://example.com'
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
@@ -80,4 +80,3 @@ paths:
|
||||
- lang: 'C#'
|
||||
source: |
|
||||
PetStore.v1.Pet pet = new PetStore.v1.Pet();
|
||||
|
||||
|
||||
@@ -97,10 +97,10 @@ Every path item must have a GET operation.
|
||||
| ^^^^
|
||||
25 | operationId: exampleOne
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^
|
||||
… | < 57 more lines >
|
||||
… | < 56 more lines >
|
||||
82 | PetStore.v1.Pet pet = new PetStore.v1.Pet();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
83 |
|
||||
| ^
|
||||
84 |
|
||||
|
||||
Error was generated by the path-item-get-defined assertion rule.
|
||||
|
||||
@@ -128,7 +128,7 @@ anyType assertion failed because the any description didn't meet the assertions:
|
||||
27 | description: summary example
|
||||
| ^^^^^^^^^^^^^^^
|
||||
28 | externalDocs:
|
||||
29 | description: "Find more info here"
|
||||
29 | description: 'Find more info here'
|
||||
|
||||
Error was generated by the anyType assertion rule.
|
||||
|
||||
@@ -186,9 +186,9 @@ anyType assertion failed because the any description didn't meet the assertions:
|
||||
|
||||
27 | description: summary example
|
||||
28 | externalDocs:
|
||||
29 | description: "Find more info here"
|
||||
29 | description: 'Find more info here'
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
30 | url: "https://example.com"
|
||||
30 | url: 'https://example.com'
|
||||
31 | requestBody:
|
||||
|
||||
Error was generated by the anyType assertion rule.
|
||||
@@ -362,10 +362,10 @@ x-codeSamples must be defined
|
||||
| ^^^^^^^^^^^^^^^^^^^^
|
||||
59 | summary: ''
|
||||
| ^^^^^^^^^^^
|
||||
… | < 23 more lines >
|
||||
… | < 22 more lines >
|
||||
82 | PetStore.v1.Pet pet = new PetStore.v1.Pet();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
83 |
|
||||
| ^
|
||||
84 |
|
||||
|
||||
Error was generated by the operation-x-code-samples-defined assertion rule.
|
||||
|
||||
@@ -385,8 +385,6 @@ Did you mean: x-codeSamples instead of x-code-samples ?
|
||||
82 | PetStore.v1.Pet pet = new PetStore.v1.Pet();
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
83 |
|
||||
| ^
|
||||
84 |
|
||||
|
||||
Error was generated by the operation-x-code-samples-undefined assertion rule.
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ paths:
|
||||
parameters:
|
||||
- name: Accept-Language
|
||||
in: header
|
||||
description: "The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US"
|
||||
description: 'The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US'
|
||||
example: en-US
|
||||
required: false
|
||||
schema:
|
||||
|
||||
@@ -28,4 +28,3 @@ paths:
|
||||
description: example description
|
||||
'404':
|
||||
description: example description
|
||||
|
||||
@@ -29,4 +29,3 @@ paths:
|
||||
description: example description
|
||||
'404':
|
||||
description: example description
|
||||
|
||||
@@ -42,4 +42,3 @@ paths:
|
||||
description: example description
|
||||
'404':
|
||||
description: example description
|
||||
|
||||
@@ -24,8 +24,8 @@ paths:
|
||||
operationId: exampleOne
|
||||
summary: My resource
|
||||
externalDocs:
|
||||
description: "Find more info here"
|
||||
url: "https://example.com"
|
||||
description: 'Find more info here'
|
||||
url: 'https://example.com'
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
@@ -87,4 +87,3 @@ paths:
|
||||
- lang: 'C#'
|
||||
source: |
|
||||
PetStore.v1.Pet pet = new PetStore.v1.Pet();
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ info:
|
||||
security: []
|
||||
|
||||
paths:
|
||||
|
||||
/v1/pets/{petId}:
|
||||
get:
|
||||
operationId: getPet
|
||||
@@ -30,7 +29,6 @@ paths:
|
||||
description: Internal Server Error.
|
||||
|
||||
components:
|
||||
|
||||
schemas:
|
||||
Pet:
|
||||
type: object
|
||||
|
||||
@@ -15,28 +15,29 @@ Servers must be present.
|
||||
Error was generated by the no-empty-servers rule.
|
||||
|
||||
|
||||
[2] openapi.yaml:11:5 at #/paths/~1v1~1pets~1{petId}/get/summary
|
||||
[2] openapi.yaml:10:5 at #/paths/~1v1~1pets~1{petId}/get/summary
|
||||
|
||||
Operation object should contain \`summary\` field.
|
||||
|
||||
9 |
|
||||
10 | /v1/pets/{petId}:
|
||||
11 | get:
|
||||
8 | paths:
|
||||
9 | /v1/pets/{petId}:
|
||||
10 | get:
|
||||
| ^^^
|
||||
12 | operationId: getPet
|
||||
13 | parameters:
|
||||
11 | operationId: getPet
|
||||
12 | parameters:
|
||||
|
||||
Error was generated by the operation-summary rule.
|
||||
|
||||
|
||||
[3] openapi.yaml:47:17 at #/components/schemas/Pet/properties/status/enum
|
||||
[3] openapi.yaml:45:17 at #/components/schemas/Pet/properties/status/enum
|
||||
|
||||
Expected type \`array\` but got \`string\`.
|
||||
|
||||
45 | status:
|
||||
46 | type: string
|
||||
47 | enum: string
|
||||
43 | status:
|
||||
44 | type: string
|
||||
45 | enum: string
|
||||
| ^^^^^^
|
||||
46 |
|
||||
|
||||
Error was generated by the spec rule.
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ paths:
|
||||
- array
|
||||
enum:
|
||||
- 1
|
||||
- [ 1, 2, 3, string]
|
||||
- [1, 2, 3, string]
|
||||
- 3
|
||||
- string
|
||||
/pong:
|
||||
|
||||
@@ -7,7 +7,7 @@ validating /openapi.yaml...
|
||||
|
||||
Enum value \`string\` must be of allowed types: \`integer,array\`.
|
||||
|
||||
19 | - [ 1, 2, 3, string]
|
||||
19 | - [1, 2, 3, string]
|
||||
20 | - 3
|
||||
21 | - string
|
||||
| ^^^^^^
|
||||
|
||||
@@ -16,7 +16,7 @@ paths:
|
||||
- array
|
||||
enum:
|
||||
- 1
|
||||
- [ 1, 2, 3, string]
|
||||
- [1, 2, 3, string]
|
||||
- 3
|
||||
userId:
|
||||
application/json:
|
||||
|
||||
@@ -8,14 +8,14 @@ info:
|
||||
name: Apache 2.0
|
||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
||||
servers:
|
||||
- url: http://petstore.swagger.io/v1
|
||||
- url: http://petstore.swagger.io/v1
|
||||
security: []
|
||||
components:
|
||||
schemas:
|
||||
Test:
|
||||
nullable: true
|
||||
paths:
|
||||
"/test":
|
||||
/test:
|
||||
get:
|
||||
summary: test
|
||||
operationId: test
|
||||
@@ -25,7 +25,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Test"
|
||||
$ref: '#/components/schemas/Test'
|
||||
example: {}
|
||||
'400':
|
||||
description: An error response
|
||||
|
||||
@@ -12,7 +12,7 @@ The \`type\` field must be defined when the \`nullable\` field is used.
|
||||
16 | nullable: true
|
||||
| ^^^^
|
||||
17 | paths:
|
||||
18 | "/test":
|
||||
18 | /test:
|
||||
|
||||
Error was generated by the spec rule.
|
||||
|
||||
@@ -23,7 +23,7 @@ Example validation errored: "nullable" cannot be used without "type".
|
||||
|
||||
26 | application/json:
|
||||
27 | schema:
|
||||
28 | $ref: "#/components/schemas/Test"
|
||||
28 | $ref: '#/components/schemas/Test'
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
29 | example: {}
|
||||
30 | '400':
|
||||
|
||||
@@ -9,9 +9,11 @@
|
||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
}
|
||||
},
|
||||
"servers": [{
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://petstore.swagger.io/v1"
|
||||
}],
|
||||
}
|
||||
],
|
||||
"security": [],
|
||||
"paths": {
|
||||
"/test": {
|
||||
@@ -39,10 +41,7 @@
|
||||
"schemas": {
|
||||
"Pet": {
|
||||
"type": "object",
|
||||
"oneOf": [
|
||||
{ "$ref": "#/components/schemas/Pet" },
|
||||
{ "$ref": "#/components/schemas/Cat" }
|
||||
]
|
||||
"oneOf": [{ "$ref": "#/components/schemas/Pet" }, { "$ref": "#/components/schemas/Cat" }]
|
||||
},
|
||||
"Cat": {
|
||||
"type": "object",
|
||||
|
||||
@@ -10,9 +10,11 @@
|
||||
}
|
||||
},
|
||||
"security": [],
|
||||
"servers": [{
|
||||
"servers": [
|
||||
{
|
||||
"url": "http://petstore.swagger.io/v1"
|
||||
}],
|
||||
}
|
||||
],
|
||||
"paths": {
|
||||
"/test": {
|
||||
"get": {
|
||||
@@ -25,8 +27,7 @@
|
||||
"application/json": {
|
||||
"schema": { "$ref": "#/components/schemas/PetWithProps" },
|
||||
"example": {
|
||||
"a": {
|
||||
},
|
||||
"a": {},
|
||||
"b": {
|
||||
"c": "hello"
|
||||
}
|
||||
|
||||
@@ -3,41 +3,39 @@
|
||||
exports[`E2E lint no-invalid-media-type-examples-recursion 1`] = `
|
||||
|
||||
validating /openapi.json...
|
||||
[1] openapi.json:27:28 at #/paths/~1test/get/responses/202/content/application~1json/example
|
||||
[1] openapi.json:29:28 at #/paths/~1test/get/responses/202/content/application~1json/example
|
||||
|
||||
Example value must conform to the schema: must have required property 'c'.
|
||||
|
||||
25 | "application/json": {
|
||||
26 | "schema": { "$ref": "#/components/schemas/PetWithProps" },
|
||||
27 | "example": {
|
||||
| ^
|
||||
28 | "a": {
|
||||
| ^^^^^^
|
||||
… | < 4 more lines >
|
||||
33 | }
|
||||
27 | "application/json": {
|
||||
28 | "schema": { "$ref": "#/components/schemas/PetWithProps" },
|
||||
29 | "example": {
|
||||
| ^
|
||||
30 | "a": {},
|
||||
| ^^^^^^^^
|
||||
… | < 3 more lines >
|
||||
34 | }
|
||||
| ^
|
||||
35 | }
|
||||
36 | }
|
||||
|
||||
referenced from openapi.json:25:35 at #/paths/~1test/get/responses/202/content/application~1json
|
||||
referenced from openapi.json:27:35 at #/paths/~1test/get/responses/202/content/application~1json
|
||||
|
||||
Warning was generated by the no-invalid-media-type-examples rule.
|
||||
|
||||
|
||||
[2] openapi.json:28:24 at #/paths/~1test/get/responses/202/content/application~1json/example/a
|
||||
[2] openapi.json:30:24 at #/paths/~1test/get/responses/202/content/application~1json/example/a
|
||||
|
||||
Example value must conform to the schema: \`a\` property must have required property 'c'.
|
||||
|
||||
26 | "schema": { "$ref": "#/components/schemas/PetWithProps" },
|
||||
27 | "example": {
|
||||
28 | "a": {
|
||||
| ^
|
||||
29 | },
|
||||
| ^
|
||||
30 | "b": {
|
||||
31 | "c": "hello"
|
||||
28 | "schema": { "$ref": "#/components/schemas/PetWithProps" },
|
||||
29 | "example": {
|
||||
30 | "a": {},
|
||||
| ^^
|
||||
31 | "b": {
|
||||
32 | "c": "hello"
|
||||
|
||||
referenced from openapi.json:25:35 at #/paths/~1test/get/responses/202/content/application~1json
|
||||
referenced from openapi.json:27:35 at #/paths/~1test/get/responses/202/content/application~1json
|
||||
|
||||
Warning was generated by the no-invalid-media-type-examples rule.
|
||||
|
||||
|
||||
@@ -30,8 +30,7 @@ paths:
|
||||
uniqueItems: true
|
||||
items:
|
||||
type: string
|
||||
example:
|
||||
test
|
||||
example: test
|
||||
responses:
|
||||
'200':
|
||||
description: My 200 response
|
||||
|
||||
@@ -3,16 +3,16 @@
|
||||
exports[`E2E lint no-invalid-schema-examples-array-error 1`] = `
|
||||
|
||||
validating /openapi.yaml...
|
||||
[1] openapi.yaml:34:21 at #/paths/~1my_post/post/requestBody/content/application~1json/schema/properties/my_list/example
|
||||
[1] openapi.yaml:33:28 at #/paths/~1my_post/post/requestBody/content/application~1json/schema/properties/my_list/example
|
||||
|
||||
Example value must conform to the schema: type must be array.
|
||||
|
||||
31 | items:
|
||||
32 | type: string
|
||||
33 | example:
|
||||
34 | test
|
||||
33 | example: test
|
||||
| ^^^^
|
||||
35 | responses:
|
||||
36 | '200':
|
||||
34 | responses:
|
||||
35 | '200':
|
||||
|
||||
referenced from openapi.yaml:29:19 at #/paths/~1my_post/post/requestBody/content/application~1json/schema/properties/my_list
|
||||
|
||||
|
||||
@@ -15,4 +15,3 @@ paths:
|
||||
responses:
|
||||
'200':
|
||||
description: example description
|
||||
|
||||
|
||||
@@ -23,4 +23,3 @@ components:
|
||||
format: int64
|
||||
name:
|
||||
type: string
|
||||
|
||||
|
||||
@@ -1,209 +1,209 @@
|
||||
swagger: "2.0"
|
||||
swagger: '2.0'
|
||||
info:
|
||||
description: "This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters."
|
||||
version: "1.0.0"
|
||||
title: "Swagger Petstore"
|
||||
termsOfService: "http://swagger.io/terms/"
|
||||
description: 'This is a sample server Petstore server. You can find out more about Swagger at [http://swagger.io](http://swagger.io) or on [irc.freenode.net, #swagger](http://swagger.io/irc/). For this sample, you can use the api key `special-key` to test the authorization filters.'
|
||||
version: '1.0.0'
|
||||
title: 'Swagger Petstore'
|
||||
termsOfService: 'http://swagger.io/terms/'
|
||||
contact:
|
||||
email: "apiteam@swagger.io"
|
||||
email: 'apiteam@swagger.io'
|
||||
license:
|
||||
name: "Apache 2.0"
|
||||
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
host: "petstore.swagger.io"
|
||||
basePath: "/v2"
|
||||
name: 'Apache 2.0'
|
||||
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
||||
host: 'petstore.swagger.io'
|
||||
basePath: '/v2'
|
||||
tags:
|
||||
- name: "pet"
|
||||
description: "Everything about your Pets"
|
||||
- name: 'pet'
|
||||
description: 'Everything about your Pets'
|
||||
externalDocs:
|
||||
description: "Find out more"
|
||||
url: "http://swagger.io"
|
||||
description: 'Find out more'
|
||||
url: 'http://swagger.io'
|
||||
schemes:
|
||||
- "http"
|
||||
- 'http'
|
||||
security: []
|
||||
paths:
|
||||
/pet:
|
||||
post:
|
||||
tags:
|
||||
- "pet"
|
||||
summary: "Add a new pet to the store"
|
||||
description: "post a pet to store"
|
||||
operationId: "add_pet"
|
||||
- 'pet'
|
||||
summary: 'Add a new pet to the store'
|
||||
description: 'post a pet to store'
|
||||
operationId: 'add_pet'
|
||||
consumes:
|
||||
- "application/json"
|
||||
- "application/xml"
|
||||
- 'application/json'
|
||||
- 'application/xml'
|
||||
produces:
|
||||
- "application/xml"
|
||||
- "application/json"
|
||||
- 'application/xml'
|
||||
- 'application/json'
|
||||
parameters:
|
||||
- in: "body"
|
||||
name: "body"
|
||||
description: "Pet object that needs to be added to the store"
|
||||
- in: 'body'
|
||||
name: 'body'
|
||||
description: 'Pet object that needs to be added to the store'
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/Pet"
|
||||
$ref: '#/definitions/Pet'
|
||||
responses:
|
||||
200:
|
||||
description: example description
|
||||
405:
|
||||
description: "Invalid input"
|
||||
description: 'Invalid input'
|
||||
security:
|
||||
- petstore_auth:
|
||||
- "write:pets"
|
||||
- "read:pets"
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
put:
|
||||
tags:
|
||||
- "pet"
|
||||
summary: "Update an existing pet"
|
||||
description: "put new data for existing pet"
|
||||
operationId: "update_pet"
|
||||
- 'pet'
|
||||
summary: 'Update an existing pet'
|
||||
description: 'put new data for existing pet'
|
||||
operationId: 'update_pet'
|
||||
consumes:
|
||||
- "application/json"
|
||||
- "application/xml"
|
||||
- 'application/json'
|
||||
- 'application/xml'
|
||||
produces:
|
||||
- "application/xml"
|
||||
- "application/json"
|
||||
- 'application/xml'
|
||||
- 'application/json'
|
||||
parameters:
|
||||
- in: "body"
|
||||
name: "body"
|
||||
description: "Pet object that needs to be added to the store"
|
||||
- in: 'body'
|
||||
name: 'body'
|
||||
description: 'Pet object that needs to be added to the store'
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/Pet"
|
||||
$ref: '#/definitions/Pet'
|
||||
responses:
|
||||
200:
|
||||
description: example description
|
||||
400:
|
||||
description: "Invalid ID supplied"
|
||||
description: 'Invalid ID supplied'
|
||||
404:
|
||||
description: "Pet not found"
|
||||
description: 'Pet not found'
|
||||
405:
|
||||
description: "Validation exception"
|
||||
description: 'Validation exception'
|
||||
security:
|
||||
- petstore_auth:
|
||||
- "write:pets"
|
||||
- "read:pets"
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
/pet/find_by_status:
|
||||
get:
|
||||
tags:
|
||||
- "pet"
|
||||
summary: "Finds Pets by status"
|
||||
description: "Multiple status values can be provided with comma separated strings"
|
||||
operationId: "list_pets_by_status"
|
||||
- 'pet'
|
||||
summary: 'Finds Pets by status'
|
||||
description: 'Multiple status values can be provided with comma separated strings'
|
||||
operationId: 'list_pets_by_status'
|
||||
produces:
|
||||
- "application/xml"
|
||||
- "application/json"
|
||||
- 'application/xml'
|
||||
- 'application/json'
|
||||
parameters:
|
||||
- name: "status"
|
||||
in: "query"
|
||||
description: "Status values that need to be considered for filter"
|
||||
- name: 'status'
|
||||
in: 'query'
|
||||
description: 'Status values that need to be considered for filter'
|
||||
required: true
|
||||
type: "array"
|
||||
type: 'array'
|
||||
items:
|
||||
type: "string"
|
||||
type: 'string'
|
||||
enum:
|
||||
- "available"
|
||||
- "pending"
|
||||
- "sold"
|
||||
default: "available"
|
||||
collectionFormat: "multi"
|
||||
- 'available'
|
||||
- 'pending'
|
||||
- 'sold'
|
||||
default: 'available'
|
||||
collectionFormat: 'multi'
|
||||
responses:
|
||||
200:
|
||||
description: "successful operation"
|
||||
description: 'successful operation'
|
||||
schema:
|
||||
$ref: "#/definitions/InlineResponse200"
|
||||
$ref: '#/definitions/InlineResponse200'
|
||||
400:
|
||||
description: "Invalid status value"
|
||||
description: 'Invalid status value'
|
||||
security:
|
||||
- petstore_auth:
|
||||
- "write:pets"
|
||||
- "read:pets"
|
||||
- 'write:pets'
|
||||
- 'read:pets'
|
||||
securityDefinitions:
|
||||
petstore_auth:
|
||||
type: "oauth2"
|
||||
authorizationUrl: "http://petstore.swagger.io/oauth/dialog"
|
||||
flow: "implicit"
|
||||
type: 'oauth2'
|
||||
authorizationUrl: 'http://petstore.swagger.io/oauth/dialog'
|
||||
flow: 'implicit'
|
||||
scopes:
|
||||
write:pets: "modify pets in your account"
|
||||
read:pets: "read your pets"
|
||||
write:pets: 'modify pets in your account'
|
||||
read:pets: 'read your pets'
|
||||
definitions:
|
||||
InlineResponse200:
|
||||
type: "object"
|
||||
description: "string"
|
||||
type: 'object'
|
||||
description: 'string'
|
||||
properties:
|
||||
pets:
|
||||
type: "array"
|
||||
description: "list of pets"
|
||||
type: 'array'
|
||||
description: 'list of pets'
|
||||
items:
|
||||
$ref: "#/definitions/Pet"
|
||||
$ref: '#/definitions/Pet'
|
||||
Category:
|
||||
type: "object"
|
||||
description: "string"
|
||||
type: 'object'
|
||||
description: 'string'
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
description: "string"
|
||||
type: 'integer'
|
||||
format: 'int64'
|
||||
description: 'string'
|
||||
name:
|
||||
type: "string"
|
||||
description: "string"
|
||||
type: 'string'
|
||||
description: 'string'
|
||||
xml:
|
||||
name: "Category"
|
||||
name: 'Category'
|
||||
Tag:
|
||||
type: "object"
|
||||
description: "string"
|
||||
type: 'object'
|
||||
description: 'string'
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
description: "string"
|
||||
type: 'integer'
|
||||
format: 'int64'
|
||||
description: 'string'
|
||||
name:
|
||||
type: "string"
|
||||
description: "string"
|
||||
type: 'string'
|
||||
description: 'string'
|
||||
xml:
|
||||
name: "Tag"
|
||||
name: 'Tag'
|
||||
Pet:
|
||||
type: "object"
|
||||
description: "string"
|
||||
type: 'object'
|
||||
description: 'string'
|
||||
required:
|
||||
- "name"
|
||||
- "photo_urls"
|
||||
- 'name'
|
||||
- 'photo_urls'
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
description: "string"
|
||||
type: 'integer'
|
||||
format: 'int64'
|
||||
description: 'string'
|
||||
category:
|
||||
$ref: "#/definitions/Category"
|
||||
$ref: '#/definitions/Category'
|
||||
name:
|
||||
type: "string"
|
||||
example: "doggie"
|
||||
description: "string"
|
||||
type: 'string'
|
||||
example: 'doggie'
|
||||
description: 'string'
|
||||
photo_urls:
|
||||
type: "array"
|
||||
description: "string"
|
||||
type: 'array'
|
||||
description: 'string'
|
||||
xml:
|
||||
name: "photo_url"
|
||||
name: 'photo_url'
|
||||
wrapped: true
|
||||
items:
|
||||
type: "string"
|
||||
type: 'string'
|
||||
tags:
|
||||
type: "array"
|
||||
description: "string"
|
||||
type: 'array'
|
||||
description: 'string'
|
||||
pattern: "^http(s)?:\\/\\/([^\\/?#]*)([^?#]*)(\\?([^#]*))?(#(.*))?$"
|
||||
xml:
|
||||
name: "tag"
|
||||
name: 'tag'
|
||||
wrapped: true
|
||||
items:
|
||||
$ref: "#/definitions/Tag"
|
||||
$ref: '#/definitions/Tag'
|
||||
status:
|
||||
type: "string"
|
||||
description: "pet status in the store"
|
||||
type: 'string'
|
||||
description: 'pet status in the store'
|
||||
enum:
|
||||
- "available"
|
||||
- "pending"
|
||||
- "sold"
|
||||
- 'available'
|
||||
- 'pending'
|
||||
- 'sold'
|
||||
xml:
|
||||
name: "Pet"
|
||||
name: 'Pet'
|
||||
externalDocs:
|
||||
description: "Find out more about Swagger"
|
||||
url: "http://swagger.io"
|
||||
description: 'Find out more about Swagger'
|
||||
url: 'http://swagger.io'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
openapi: "3.0.0"
|
||||
openapi: '3.0.0'
|
||||
info:
|
||||
version: 1.0.0
|
||||
title: Swagger Petstore
|
||||
@@ -44,7 +44,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
$ref: '#/components/schemas/Pets'
|
||||
'400':
|
||||
description: An error response
|
||||
default:
|
||||
@@ -52,7 +52,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
post:
|
||||
summary: Create a pet
|
||||
operationId: create_pets
|
||||
@@ -68,7 +68,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
/pets/{pet_id}:
|
||||
get:
|
||||
summary: Info for a specific pet
|
||||
@@ -88,7 +88,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
$ref: '#/components/schemas/Pets'
|
||||
'400':
|
||||
description: An error response
|
||||
default:
|
||||
@@ -96,12 +96,11 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
description:
|
||||
A pet
|
||||
description: A pet
|
||||
required:
|
||||
- id
|
||||
- name
|
||||
@@ -109,16 +108,15 @@ components:
|
||||
id:
|
||||
type: integer
|
||||
format: int64
|
||||
description: "id property"
|
||||
description: 'id property'
|
||||
name:
|
||||
type: string
|
||||
description: "name property"
|
||||
description: 'name property'
|
||||
tag:
|
||||
type: string
|
||||
description: "tag property"
|
||||
description: 'tag property'
|
||||
Pets:
|
||||
description:
|
||||
A list of pets
|
||||
description: A list of pets
|
||||
required:
|
||||
- pets
|
||||
- next_url
|
||||
@@ -127,9 +125,9 @@ components:
|
||||
properties:
|
||||
pets:
|
||||
type: array
|
||||
description: "object containing a list of pets"
|
||||
description: 'object containing a list of pets'
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
$ref: '#/components/schemas/Pet'
|
||||
next_url:
|
||||
type: string
|
||||
description: this is the url to next page
|
||||
@@ -146,8 +144,7 @@ components:
|
||||
description: next token
|
||||
|
||||
Error:
|
||||
description:
|
||||
An error in processing a service request
|
||||
description: An error in processing a service request
|
||||
required:
|
||||
- code
|
||||
- message
|
||||
@@ -155,7 +152,7 @@ components:
|
||||
code:
|
||||
type: integer
|
||||
format: int32
|
||||
description: "code property"
|
||||
description: 'code property'
|
||||
message:
|
||||
type: string
|
||||
description: "message property"
|
||||
description: 'message property'
|
||||
|
||||
@@ -28,13 +28,13 @@ paths:
|
||||
summary: Get Test! Foo! Etc!
|
||||
responses:
|
||||
200:
|
||||
description: "200"
|
||||
description: '200'
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
type: array
|
||||
prefixItems:
|
||||
- type: "string"
|
||||
- type: 'string'
|
||||
items: false
|
||||
400:
|
||||
description: An error response
|
||||
@@ -56,7 +56,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
$ref: '#/components/schemas/Pets'
|
||||
'400':
|
||||
description: An error response
|
||||
/pets/model:
|
||||
@@ -77,7 +77,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Model"
|
||||
$ref: '#/components/schemas/Model'
|
||||
'400':
|
||||
description: An error response
|
||||
/pets/person:
|
||||
@@ -98,7 +98,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/person"
|
||||
$ref: '#/components/schemas/person'
|
||||
'400':
|
||||
description: An error response
|
||||
/:
|
||||
@@ -151,7 +151,7 @@ webhooks:
|
||||
contentEncoding: base64
|
||||
contentMediaType: image/png
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Return a 200 status to indicate that the data was received successfully
|
||||
'405':
|
||||
description: Invalid input
|
||||
@@ -165,7 +165,7 @@ webhooks:
|
||||
content:
|
||||
application/octet-stream: {}
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Return a 200 status to indicate that the data was received successfully
|
||||
'400':
|
||||
description: An error response
|
||||
@@ -177,11 +177,11 @@ components:
|
||||
pathItems: {}
|
||||
schemas:
|
||||
Problem:
|
||||
id: "https://tools.ietf.org/rfc/rfc7807.txt"
|
||||
$schema: "http://json-schema.org/draft-06/schema#"
|
||||
description: "schema for a rfc7807"
|
||||
id: 'https://tools.ietf.org/rfc/rfc7807.txt'
|
||||
$schema: 'http://json-schema.org/draft-06/schema#'
|
||||
description: 'schema for a rfc7807'
|
||||
definitions: {}
|
||||
type: "object"
|
||||
type: 'object'
|
||||
properties:
|
||||
type:
|
||||
description: A URI reference [RFC3986] that identifies the problem type.
|
||||
@@ -237,14 +237,14 @@ components:
|
||||
type: array
|
||||
$comment: Array without items keyword
|
||||
either:
|
||||
type: ['string','null']
|
||||
type: ['string', 'null']
|
||||
discriminator:
|
||||
propertyName: type
|
||||
x-extension: true
|
||||
Pets:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
$ref: '#/components/schemas/Pet'
|
||||
Model:
|
||||
type: object
|
||||
properties:
|
||||
@@ -255,12 +255,12 @@ components:
|
||||
- string
|
||||
two:
|
||||
description: type 'null'
|
||||
type: "null"
|
||||
type: 'null'
|
||||
three:
|
||||
description: type array including 'null'
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
- 'null'
|
||||
four:
|
||||
description: array with no items
|
||||
type: array
|
||||
@@ -285,7 +285,7 @@ components:
|
||||
description: nullable string
|
||||
type:
|
||||
- string
|
||||
- "null"
|
||||
- 'null'
|
||||
eleven:
|
||||
description: x-nullable string
|
||||
type:
|
||||
|
||||
@@ -11,8 +11,8 @@ Component: "Problem" is never used.
|
||||
178 | schemas:
|
||||
179 | Problem:
|
||||
| ^^^^^^^
|
||||
180 | id: "https://tools.ietf.org/rfc/rfc7807.txt"
|
||||
181 | $schema: "http://json-schema.org/draft-06/schema#"
|
||||
180 | id: 'https://tools.ietf.org/rfc/rfc7807.txt'
|
||||
181 | $schema: 'http://json-schema.org/draft-06/schema#'
|
||||
|
||||
Warning was generated by the no-unused-components rule.
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
swagger: "2.0"
|
||||
swagger: '2.0'
|
||||
info:
|
||||
license:
|
||||
name: MIT
|
||||
url: 'https://opensource.org/licenses/MIT'
|
||||
title: "Swagger Petstore"
|
||||
description: "This is a sample"
|
||||
version: "1.0.0"
|
||||
host: "petstore.swagger.io"
|
||||
basePath: "/v2"
|
||||
title: 'Swagger Petstore'
|
||||
description: 'This is a sample'
|
||||
version: '1.0.0'
|
||||
host: 'petstore.swagger.io'
|
||||
basePath: '/v2'
|
||||
securityDefinitions:
|
||||
basicAuth:
|
||||
type: basic
|
||||
@@ -24,57 +24,57 @@ securityDefinitions:
|
||||
testProp: test
|
||||
oauthImplicit:
|
||||
type: oauth2
|
||||
authorizationUrl: "http://swagger.io/api/oauth/dialog"
|
||||
authorizationUrl: 'http://swagger.io/api/oauth/dialog'
|
||||
flow: implicit
|
||||
description: oauth implicit
|
||||
tokenUrl: "http://tokenUrl"
|
||||
tokenUrl: 'http://tokenUrl'
|
||||
scopes:
|
||||
"write:pets": "modify pets in your account"
|
||||
"read:pets": "read your pets"
|
||||
'write:pets': 'modify pets in your account'
|
||||
'read:pets': 'read your pets'
|
||||
oauthAccessCode:
|
||||
type: oauth2
|
||||
flow: accessCode
|
||||
authorizationUrl: "http://swagger.io/api/oauth/dialog"
|
||||
tokenUrl: "http://tokenUrl"
|
||||
authorizationUrl: 'http://swagger.io/api/oauth/dialog'
|
||||
tokenUrl: 'http://tokenUrl'
|
||||
description: access code
|
||||
name: accessCodeName
|
||||
scopes:
|
||||
"write:pets": "modify pets in your account"
|
||||
"read:pets": "read your pets"
|
||||
'write:pets': 'modify pets in your account'
|
||||
'read:pets': 'read your pets'
|
||||
oauthApplication:
|
||||
type: oauth2
|
||||
flow: application
|
||||
authorizationUrl: "http://swagger.io/api/oauth/dialog"
|
||||
tokenUrl: "http://tokenUrl"
|
||||
authorizationUrl: 'http://swagger.io/api/oauth/dialog'
|
||||
tokenUrl: 'http://tokenUrl'
|
||||
description: oauth application
|
||||
scopes:
|
||||
"write:pets": "modify pets in your account"
|
||||
"read:pets": "read your pets"
|
||||
'write:pets': 'modify pets in your account'
|
||||
'read:pets': 'read your pets'
|
||||
oauthPassword:
|
||||
type: oauth2
|
||||
flow: password
|
||||
authorizationUrl: "http://swagger.io/api/oauth/dialog"
|
||||
tokenUrl: "http://tokenUrl"
|
||||
authorizationUrl: 'http://swagger.io/api/oauth/dialog'
|
||||
tokenUrl: 'http://tokenUrl'
|
||||
description: oauth password
|
||||
scopes:
|
||||
"write:pets": "modify pets in your account"
|
||||
"read:pets": "read your pets"
|
||||
'write:pets': 'modify pets in your account'
|
||||
'read:pets': 'read your pets'
|
||||
paths:
|
||||
/pet:
|
||||
get:
|
||||
summary: "Add a new pet to the store"
|
||||
description: ""
|
||||
operationId: "addPet"
|
||||
summary: 'Add a new pet to the store'
|
||||
description: ''
|
||||
operationId: 'addPet'
|
||||
consumes:
|
||||
- "application/json"
|
||||
- "application/xml"
|
||||
- 'application/json'
|
||||
- 'application/xml'
|
||||
produces:
|
||||
- "application/xml"
|
||||
- "application/json"
|
||||
- 'application/xml'
|
||||
- 'application/json'
|
||||
responses:
|
||||
'201':
|
||||
description: Pet updated
|
||||
"405":
|
||||
description: "Invalid input"
|
||||
'405':
|
||||
description: 'Invalid input'
|
||||
security:
|
||||
- basicAuth: []
|
||||
|
||||
@@ -53,10 +53,10 @@ The field \`tokenUrl\` is not allowed here.
|
||||
|
||||
28 | flow: implicit
|
||||
29 | description: oauth implicit
|
||||
30 | tokenUrl: "http://tokenUrl"
|
||||
30 | tokenUrl: 'http://tokenUrl'
|
||||
| ^^^^^^^^
|
||||
31 | scopes:
|
||||
32 | "write:pets": "modify pets in your account"
|
||||
32 | 'write:pets': 'modify pets in your account'
|
||||
|
||||
Error was generated by the spec rule.
|
||||
|
||||
@@ -65,12 +65,12 @@ Error was generated by the spec rule.
|
||||
|
||||
The field \`name\` is not allowed here.
|
||||
|
||||
38 | tokenUrl: "http://tokenUrl"
|
||||
38 | tokenUrl: 'http://tokenUrl'
|
||||
39 | description: access code
|
||||
40 | name: accessCodeName
|
||||
| ^^^^
|
||||
41 | scopes:
|
||||
42 | "write:pets": "modify pets in your account"
|
||||
42 | 'write:pets': 'modify pets in your account'
|
||||
|
||||
Error was generated by the spec rule.
|
||||
|
||||
@@ -81,9 +81,9 @@ The field \`authorizationUrl\` is not allowed here.
|
||||
|
||||
45 | type: oauth2
|
||||
46 | flow: application
|
||||
47 | authorizationUrl: "http://swagger.io/api/oauth/dialog"
|
||||
47 | authorizationUrl: 'http://swagger.io/api/oauth/dialog'
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
48 | tokenUrl: "http://tokenUrl"
|
||||
48 | tokenUrl: 'http://tokenUrl'
|
||||
49 | description: oauth application
|
||||
|
||||
Error was generated by the spec rule.
|
||||
@@ -95,9 +95,9 @@ The field \`authorizationUrl\` is not allowed here.
|
||||
|
||||
54 | type: oauth2
|
||||
55 | flow: password
|
||||
56 | authorizationUrl: "http://swagger.io/api/oauth/dialog"
|
||||
56 | authorizationUrl: 'http://swagger.io/api/oauth/dialog'
|
||||
| ^^^^^^^^^^^^^^^^
|
||||
57 | tokenUrl: "http://tokenUrl"
|
||||
57 | tokenUrl: 'http://tokenUrl'
|
||||
58 | description: oauth password
|
||||
|
||||
Error was generated by the spec rule.
|
||||
|
||||
@@ -8,7 +8,7 @@ info:
|
||||
url: https://opensource.org/licenses/MIT
|
||||
|
||||
servers:
|
||||
- url: https://development.com/v1
|
||||
- url: https://development.com/v1
|
||||
|
||||
paths:
|
||||
'/api/user/{}/profie':
|
||||
|
||||
@@ -18,7 +18,7 @@ paths:
|
||||
parameters:
|
||||
- name: Accept-Language
|
||||
in: header
|
||||
description: "The language you prefer for messages"
|
||||
description: 'The language you prefer for messages'
|
||||
example: en-US
|
||||
required: false
|
||||
schema:
|
||||
|
||||
@@ -18,7 +18,7 @@ paths:
|
||||
parameters:
|
||||
- name: Accept-Language
|
||||
in: header
|
||||
description: "The language you prefer for messages"
|
||||
description: 'The language you prefer for messages'
|
||||
example: en-US
|
||||
required: false
|
||||
schema:
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
swagger: "2.0"
|
||||
swagger: '2.0'
|
||||
info:
|
||||
description: "This is a sample server Petstore server."
|
||||
version: "1.0.0"
|
||||
title: "Swagger Petstore"
|
||||
termsOfService: "http://swagger.io/terms/"
|
||||
description: 'This is a sample server Petstore server.'
|
||||
version: '1.0.0'
|
||||
title: 'Swagger Petstore'
|
||||
termsOfService: 'http://swagger.io/terms/'
|
||||
contact:
|
||||
email: "apiteam@swagger.io"
|
||||
email: 'apiteam@swagger.io'
|
||||
license:
|
||||
name: "Apache 2.0"
|
||||
url: "http://www.apache.org/licenses/LICENSE-2.0.html"
|
||||
host: "petstore.swagger.io"
|
||||
basePath: "/v2"
|
||||
name: 'Apache 2.0'
|
||||
url: 'http://www.apache.org/licenses/LICENSE-2.0.html'
|
||||
host: 'petstore.swagger.io'
|
||||
basePath: '/v2'
|
||||
consumes:
|
||||
- application/json
|
||||
- multipart/form-data
|
||||
@@ -18,50 +18,50 @@ produces:
|
||||
- application/json
|
||||
- application/xml
|
||||
tags:
|
||||
- name: "pet"
|
||||
description: "Everything about your Pets"
|
||||
- name: 'pet'
|
||||
description: 'Everything about your Pets'
|
||||
externalDocs:
|
||||
description: "Find out more"
|
||||
url: "http://swagger.io"
|
||||
description: 'Find out more'
|
||||
url: 'http://swagger.io'
|
||||
schemes:
|
||||
- "http"
|
||||
- 'http'
|
||||
paths:
|
||||
/pet:
|
||||
post:
|
||||
tags:
|
||||
- "pet"
|
||||
summary: "Add a new pet to the store"
|
||||
description: "post a pet to store"
|
||||
operationId: "add_pet"
|
||||
- 'pet'
|
||||
summary: 'Add a new pet to the store'
|
||||
description: 'post a pet to store'
|
||||
operationId: 'add_pet'
|
||||
consumes:
|
||||
- "application/xml"
|
||||
- 'application/xml'
|
||||
produces:
|
||||
- "application/xml"
|
||||
- 'application/xml'
|
||||
parameters:
|
||||
- in: "body"
|
||||
name: "body"
|
||||
description: "Pet object that needs to be added to the store"
|
||||
- in: 'body'
|
||||
name: 'body'
|
||||
description: 'Pet object that needs to be added to the store'
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/definitions/Pet"
|
||||
$ref: '#/definitions/Pet'
|
||||
responses:
|
||||
200:
|
||||
description: example description
|
||||
405:
|
||||
description: "Invalid input"
|
||||
description: 'Invalid input'
|
||||
definitions:
|
||||
Pet:
|
||||
type: "object"
|
||||
description: "string"
|
||||
type: 'object'
|
||||
description: 'string'
|
||||
required:
|
||||
- "name"
|
||||
- "photo_urls"
|
||||
- 'name'
|
||||
- 'photo_urls'
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
description: "string"
|
||||
type: 'integer'
|
||||
format: 'int64'
|
||||
description: 'string'
|
||||
name:
|
||||
type: "string"
|
||||
example: "doggie"
|
||||
description: "string"
|
||||
type: 'string'
|
||||
example: 'doggie'
|
||||
description: 'string'
|
||||
|
||||
@@ -7,12 +7,12 @@ validating /openapi.yaml...
|
||||
|
||||
Mime type "multipart/form-data" is not allowed
|
||||
|
||||
1 | swagger: "2.0"
|
||||
1 | swagger: '2.0'
|
||||
| ^^^^^^^^^^^^^^
|
||||
2 | info:
|
||||
| ^^^^^
|
||||
… | < 64 more lines >
|
||||
67 | description: "string"
|
||||
67 | description: 'string'
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
68 |
|
||||
|
||||
@@ -23,12 +23,12 @@ Error was generated by the request-mime-type rule.
|
||||
|
||||
Mime type "application/xml" is not allowed
|
||||
|
||||
1 | swagger: "2.0"
|
||||
1 | swagger: '2.0'
|
||||
| ^^^^^^^^^^^^^^
|
||||
2 | info:
|
||||
| ^^^^^
|
||||
… | < 64 more lines >
|
||||
67 | description: "string"
|
||||
67 | description: 'string'
|
||||
| ^^^^^^^^^^^^^^^^^^^^^
|
||||
68 |
|
||||
|
||||
@@ -44,7 +44,7 @@ Mime type "application/xml" is not allowed
|
||||
30 | post:
|
||||
| ^^^^
|
||||
31 | tags:
|
||||
32 | - "pet"
|
||||
32 | - 'pet'
|
||||
|
||||
Error was generated by the request-mime-type rule.
|
||||
|
||||
@@ -58,7 +58,7 @@ Mime type "application/xml" is not allowed
|
||||
30 | post:
|
||||
| ^^^^
|
||||
31 | tags:
|
||||
32 | - "pet"
|
||||
32 | - 'pet'
|
||||
|
||||
Error was generated by the response-mime-type rule.
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ x-webhooks:
|
||||
type: string
|
||||
example: Guru
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Return a 200 status
|
||||
content:
|
||||
application/xml:
|
||||
|
||||
@@ -49,4 +49,3 @@ paths:
|
||||
properties:
|
||||
d:
|
||||
type: string
|
||||
|
||||
@@ -10,4 +10,4 @@ components:
|
||||
TestSchema:
|
||||
title: TestSchema
|
||||
allOf:
|
||||
- $ref: "#/components/requestBodies/TestRequestBody"
|
||||
- $ref: '#/components/requestBodies/TestRequestBody'
|
||||
|
||||
@@ -12,8 +12,9 @@ The field \`paths\` must be present on this level.
|
||||
2 | components:
|
||||
| ^^^^^^^^^^^
|
||||
… | < 10 more lines >
|
||||
13 | - $ref: "#/components/requestBodies/TestRequestBody"
|
||||
13 | - $ref: '#/components/requestBodies/TestRequestBody'
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
14 |
|
||||
|
||||
Error was generated by the spec rule.
|
||||
|
||||
@@ -27,8 +28,9 @@ The field \`info\` must be present on this level.
|
||||
2 | components:
|
||||
| ^^^^^^^^^^^
|
||||
… | < 10 more lines >
|
||||
13 | - $ref: "#/components/requestBodies/TestRequestBody"
|
||||
13 | - $ref: '#/components/requestBodies/TestRequestBody'
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
14 |
|
||||
|
||||
Error was generated by the spec rule.
|
||||
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
swagger: "2.0"
|
||||
swagger: '2.0'
|
||||
info:
|
||||
version: "1.0.0"
|
||||
title: "Swagger Petstore"
|
||||
description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"
|
||||
termsOfService: "http://swagger.io/terms/"
|
||||
version: '1.0.0'
|
||||
title: 'Swagger Petstore'
|
||||
description: 'A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification'
|
||||
termsOfService: 'http://swagger.io/terms/'
|
||||
contact:
|
||||
name: "Swagger API Team"
|
||||
name: 'Swagger API Team'
|
||||
license:
|
||||
name: "MIT"
|
||||
host: "petstore.swagger.io"
|
||||
basePath: "/api"
|
||||
name: 'MIT'
|
||||
host: 'petstore.swagger.io'
|
||||
basePath: '/api'
|
||||
schemes:
|
||||
- "http"
|
||||
- 'http'
|
||||
consumes:
|
||||
- "application/json"
|
||||
- 'application/json'
|
||||
produces:
|
||||
- "application/json"
|
||||
- 'application/json'
|
||||
paths:
|
||||
/pets:
|
||||
get:
|
||||
description: "Returns all pets from the system that the user has access to"
|
||||
description: 'Returns all pets from the system that the user has access to'
|
||||
produces:
|
||||
- "application/json"
|
||||
- 'application/json'
|
||||
responses:
|
||||
"200":
|
||||
description: "A list of pets."
|
||||
'200':
|
||||
description: 'A list of pets.'
|
||||
schema:
|
||||
type: "array"
|
||||
type: 'array'
|
||||
items:
|
||||
$ref: "#/definitions/Pet"
|
||||
$ref: '#/definitions/Pet'
|
||||
definitions:
|
||||
Pet:
|
||||
type: "object"
|
||||
type: 'object'
|
||||
required:
|
||||
- "id"
|
||||
- "name"
|
||||
- 'id'
|
||||
- 'name'
|
||||
properties:
|
||||
id:
|
||||
type: "integer"
|
||||
format: "int64"
|
||||
type: 'integer'
|
||||
format: 'int64'
|
||||
name:
|
||||
type: "string"
|
||||
type: 'string'
|
||||
tag:
|
||||
type: "string"
|
||||
type: 'string'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
openapi: "3.0.0"
|
||||
openapi: '3.0.0'
|
||||
info:
|
||||
version: 1.0.0
|
||||
title: Swagger Petstore
|
||||
@@ -32,13 +32,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
$ref: '#/components/schemas/Pets'
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
post:
|
||||
summary: Create a pet
|
||||
operationId: createPets
|
||||
@@ -52,7 +52,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
/pets/{petId}:
|
||||
get:
|
||||
summary: Info for a specific pet
|
||||
@@ -72,13 +72,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
$ref: '#/components/schemas/Pet'
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
@@ -97,7 +97,7 @@ components:
|
||||
Pets:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
$ref: '#/components/schemas/Pet'
|
||||
Error:
|
||||
type: object
|
||||
required:
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
openapi: "3.0.0"
|
||||
openapi: '3.0.0'
|
||||
info:
|
||||
version: 1.0.0
|
||||
title: Swagger Petstore
|
||||
@@ -32,13 +32,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
$ref: '#/components/schemas/Pets'
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
post:
|
||||
summary: Create a pet
|
||||
operationId: createPets
|
||||
@@ -52,7 +52,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
/pets/{petId}:
|
||||
get:
|
||||
summary: Info for a specific pet
|
||||
@@ -72,13 +72,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
$ref: '#/components/schemas/Pet'
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
@@ -97,7 +97,7 @@ components:
|
||||
Pets:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
$ref: '#/components/schemas/Pet'
|
||||
Error:
|
||||
type: object
|
||||
required:
|
||||
|
||||
@@ -4,7 +4,7 @@ description: >-
|
||||
Lets you configure one or more API definition files.
|
||||
This gives you the flexibility to reference specific files in commands, and configure each file at a granular level.
|
||||
additionalProperties:
|
||||
x-additionalPropertiesName: "{name}@{version}"
|
||||
x-additionalPropertiesName: '{name}@{version}'
|
||||
type: object
|
||||
title: API object
|
||||
minItems: 1
|
||||
|
||||
@@ -43,7 +43,7 @@ properties:
|
||||
Lets you configure one or more API definition files.
|
||||
This gives you the flexibility to reference specific files in commands, and configure each file at a granular level.
|
||||
additionalProperties:
|
||||
x-additionalPropertiesName: "{name}@{version}"
|
||||
x-additionalPropertiesName: '{name}@{version}'
|
||||
type: object
|
||||
minItems: 1
|
||||
required:
|
||||
|
||||
@@ -15,8 +15,8 @@
|
||||
"coverage:core": "jest --roots packages/core/src --coverage",
|
||||
"typecheck": "tsc --noEmit --skipLibCheck",
|
||||
"e2e": "npm run webpack-bundle -- --mode=none && jest --roots=./__tests__/",
|
||||
"prettier": "npx prettier --write \"**/*.{ts,js}\"",
|
||||
"prettier:check": "npx prettier --check \"**/*.{ts,js}\"",
|
||||
"prettier": "npx prettier --write \"**/*.{ts,js,yaml,json}\"",
|
||||
"prettier:check": "npx prettier --check \"**/*.{ts,js,yaml,json}\"",
|
||||
"eslint": "eslint packages/**",
|
||||
"clean": "rm -rf packages/**/lib packages/**/node_modules packages/**/*.tsbuildinfo package-lock.json node_modules",
|
||||
"watch": "tsc -b tsconfig.build.json --watch ",
|
||||
|
||||
@@ -60,10 +60,7 @@
|
||||
"components": {
|
||||
"schemas": {
|
||||
"Pet": {
|
||||
"required": [
|
||||
"id",
|
||||
"name"
|
||||
],
|
||||
"required": ["id", "name"],
|
||||
"properties": {
|
||||
"id": {
|
||||
"type": "integer",
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
openapi: "3.0.3"
|
||||
openapi: '3.0.3'
|
||||
info:
|
||||
title: bugtest
|
||||
version: "1.0"
|
||||
version: '1.0'
|
||||
description: Demo
|
||||
license:
|
||||
name: DEMO
|
||||
@@ -10,18 +10,18 @@ servers:
|
||||
- url: http://demo.com/api
|
||||
paths:
|
||||
/customer:
|
||||
summary: "Customer scope"
|
||||
summary: 'Customer scope'
|
||||
get:
|
||||
summary: "Get demo no refs"
|
||||
summary: 'Get demo no refs'
|
||||
operationId: GetCustomer
|
||||
description: "Returns Demo No Refs"
|
||||
description: 'Returns Demo No Refs'
|
||||
responses:
|
||||
200:
|
||||
description: Demo No Refs
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Customer"
|
||||
$ref: '#/components/schemas/Customer'
|
||||
components:
|
||||
schemas:
|
||||
Customer:
|
||||
@@ -32,4 +32,4 @@ components:
|
||||
accounts:
|
||||
type: array
|
||||
items:
|
||||
$ref: "https://someexternal.schema"
|
||||
$ref: 'https://someexternal.schema'
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
openapi: "3.0.1"
|
||||
openapi: '3.0.1'
|
||||
info:
|
||||
title: Open API
|
||||
description: Open API
|
||||
|
||||
@@ -5,6 +5,6 @@ allOf:
|
||||
- integration_type
|
||||
properties:
|
||||
integration_type:
|
||||
$ref: "../openapi-with-back.yaml#/components/schemas/TypeB"
|
||||
$ref: '../openapi-with-back.yaml#/components/schemas/TypeB'
|
||||
name:
|
||||
type: string
|
||||
@@ -374,7 +374,8 @@ describe('collect refs', () => {
|
||||
Array [
|
||||
"# Hello World
|
||||
|
||||
Lorem ipsum",
|
||||
Lorem ipsum
|
||||
",
|
||||
]
|
||||
`);
|
||||
});
|
||||
|
||||
@@ -1567,7 +1567,7 @@ components:
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ResourceId'
|
||||
name:
|
||||
description: 'The tag''s unique name, which is case-insensitive.'
|
||||
description: "The tag's unique name, which is case-insensitive."
|
||||
type: string
|
||||
maxLength: 255
|
||||
pattern: '^[@~\-\.\w\s]+$'
|
||||
@@ -1628,10 +1628,10 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
medium:
|
||||
description: 'Lead Source''s medium (eg search, display)'
|
||||
description: "Lead Source's medium (eg search, display)"
|
||||
type: string
|
||||
source:
|
||||
description: 'Lead Source''s source (eg google, yahoo)'
|
||||
description: "Lead Source's source (eg google, yahoo)"
|
||||
type: string
|
||||
campaign:
|
||||
description: Lead Source's campaign (eg go-big-123)
|
||||
@@ -1643,7 +1643,7 @@ components:
|
||||
description: Lead Source's content (eg smiley faces)
|
||||
type: string
|
||||
affiliate:
|
||||
description: 'Lead Source''s affiliate (eg 123, Bob Smith)'
|
||||
description: "Lead Source's affiliate (eg 123, Bob Smith)"
|
||||
type: string
|
||||
subAffiliate:
|
||||
description: >-
|
||||
@@ -2952,7 +2952,7 @@ components:
|
||||
format: double
|
||||
example: 99.95
|
||||
maxQuantity:
|
||||
description: 'If the value is `null`, it''s assumed to be infinite.'
|
||||
description: "If the value is `null`, it's assumed to be infinite."
|
||||
type: integer
|
||||
example: 1
|
||||
stairstep:
|
||||
@@ -2995,7 +2995,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
price:
|
||||
description: 'If the price is 0, it''s free.'
|
||||
description: "If the price is 0, it's free."
|
||||
type: number
|
||||
format: double
|
||||
example: 99.95
|
||||
@@ -3047,7 +3047,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
price:
|
||||
description: 'If the price is 0, it''s free.'
|
||||
description: "If the price is 0, it's free."
|
||||
type: number
|
||||
format: double
|
||||
example: 99.95
|
||||
@@ -3099,7 +3099,7 @@ components:
|
||||
type: object
|
||||
properties:
|
||||
price:
|
||||
description: 'If the price is 0, it''s free.'
|
||||
description: "If the price is 0, it's free."
|
||||
type: number
|
||||
format: double
|
||||
example: 99.95
|
||||
@@ -3724,7 +3724,7 @@ components:
|
||||
readOnly: true
|
||||
type: integer
|
||||
subscriptionId:
|
||||
description: 'The related subscription''s ID if available, otherwise null.'
|
||||
description: "The related subscription's ID if available, otherwise null."
|
||||
readOnly: true
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/ResourceId'
|
||||
@@ -4863,10 +4863,10 @@ components:
|
||||
description: The gateway's response type
|
||||
type: string
|
||||
originalCode:
|
||||
description: 'The raw, unmapped gateway''s response code'
|
||||
description: "The raw, unmapped gateway's response code"
|
||||
type: string
|
||||
originalMessage:
|
||||
description: 'The raw, unmapped gateway''s response message'
|
||||
description: "The raw, unmapped gateway's response message"
|
||||
type: string
|
||||
avsResponse:
|
||||
description: The AVS gateway's response
|
||||
@@ -14948,7 +14948,7 @@ components:
|
||||
description: The user mobile phone number
|
||||
type: string
|
||||
password:
|
||||
description: 'User''s password. If not provided, password reset email will be sent'
|
||||
description: "User's password. If not provided, password reset email will be sent"
|
||||
type: string
|
||||
format: password
|
||||
permissions:
|
||||
|
||||
@@ -1,2 +1,2 @@
|
||||
rules:
|
||||
rules:
|
||||
info-contact: warn
|
||||
|
||||
@@ -88,7 +88,7 @@ paths:
|
||||
parameters:
|
||||
- name: Accept-Language
|
||||
in: header
|
||||
description: "The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US"
|
||||
description: 'The language you prefer for messages. Supported values are en-AU, en-CA, en-GB, en-US'
|
||||
example: en-US
|
||||
required: false
|
||||
schema:
|
||||
@@ -254,7 +254,7 @@ paths:
|
||||
required: false
|
||||
schema:
|
||||
type: string
|
||||
example: "Bearer <TOKEN>"
|
||||
example: 'Bearer <TOKEN>'
|
||||
- name: petId
|
||||
in: path
|
||||
description: Pet id to delete
|
||||
@@ -427,7 +427,7 @@ paths:
|
||||
application/json:
|
||||
example:
|
||||
status: 400
|
||||
message: "Invalid Order"
|
||||
message: 'Invalid Order'
|
||||
requestBody:
|
||||
content:
|
||||
application/json:
|
||||
@@ -1025,8 +1025,8 @@ components:
|
||||
properties:
|
||||
id:
|
||||
externalDocs:
|
||||
description: "Find more info here"
|
||||
url: "https://example.com"
|
||||
description: 'Find more info here'
|
||||
url: 'https://example.com'
|
||||
description: Pet ID
|
||||
allOf:
|
||||
- $ref: '#/components/schemas/Id'
|
||||
@@ -1199,7 +1199,7 @@ x-webhooks:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
$ref: '#/components/schemas/Pet'
|
||||
responses:
|
||||
"200":
|
||||
'200':
|
||||
description: Return a 200 status to indicate that the data was received successfully
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
openapi: "3.0.0"
|
||||
openapi: '3.0.0'
|
||||
info:
|
||||
version: 1.0.0
|
||||
title: Swagger Petstore
|
||||
@@ -29,12 +28,12 @@ paths:
|
||||
type: number
|
||||
example:
|
||||
summary: A foo example
|
||||
value: {"foo": "bar"}
|
||||
value: { 'foo': 'bar' }
|
||||
externalValue: 'http://example.org/foo.json'
|
||||
examples:
|
||||
foo:
|
||||
summary: A foo example
|
||||
value: {"foo": "bar"}
|
||||
value: { 'foo': 'bar' }
|
||||
externalValue: 'http://example.org/foo.json'
|
||||
tags:
|
||||
- pets
|
||||
@@ -63,13 +62,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pets"
|
||||
$ref: '#/components/schemas/Pets'
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
post:
|
||||
summary: Create a pet
|
||||
description: afasf
|
||||
@@ -84,7 +83,7 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
/pets/{petId}/TesSt:
|
||||
get:
|
||||
summary: Info for a specific pet
|
||||
@@ -105,13 +104,13 @@ paths:
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
$ref: '#/components/schemas/Pet'
|
||||
default:
|
||||
description: unexpected error
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Error"
|
||||
$ref: '#/components/schemas/Error'
|
||||
components:
|
||||
parameters:
|
||||
anotherParam:
|
||||
@@ -142,7 +141,7 @@ components:
|
||||
Pets:
|
||||
type: array
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
$ref: '#/components/schemas/Pet'
|
||||
Error:
|
||||
type: object
|
||||
required:
|
||||
|
||||
Reference in New Issue
Block a user