mirror of
https://github.com/postmanlabs/openapi-to-postman.git
synced 2022-11-29 22:05:00 +03:00
Merge branch 'fix/referencedComponents' into fix/refprop20
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
"operationId": "findPets",
|
||||
"parameters": [
|
||||
{
|
||||
"$ref": "#/components/parameters/_hello.yaml"
|
||||
"$ref": "#/components/parameters/_parameter.yaml"
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
@@ -61,7 +61,7 @@
|
||||
}
|
||||
},
|
||||
"parameters": {
|
||||
"_hello.yaml": {
|
||||
"_parameter.yaml": {
|
||||
"name": "tags",
|
||||
"in": "query",
|
||||
"description": "tags to filter by",
|
||||
|
||||
@@ -18,7 +18,7 @@ paths:
|
||||
description: Returns all pets alesuada ac...
|
||||
operationId: findPets
|
||||
parameters:
|
||||
- $ref: "./hello.yaml"
|
||||
- $ref: "./parameter.yaml"
|
||||
responses:
|
||||
200:
|
||||
description: pet response
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
}
|
||||
},
|
||||
"requestBody": {
|
||||
"$ref": "#/components/requestBodies/_hello.yaml"
|
||||
"$ref": "#/components/requestBodies/_rbody.yaml"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -58,7 +58,7 @@
|
||||
}
|
||||
},
|
||||
"requestBodies": {
|
||||
"_hello.yaml": {
|
||||
"_rbody.yaml": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
|
||||
@@ -24,7 +24,7 @@ paths:
|
||||
items:
|
||||
$ref: "#/components/schemas/Pet"
|
||||
requestBody:
|
||||
$ref: "./hello.yaml"
|
||||
$ref: "./rbody.yaml"
|
||||
components:
|
||||
schemas:
|
||||
Pet:
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
"operationId": "findPets",
|
||||
"responses": {
|
||||
"200": {
|
||||
"$ref": "#/components/responses/_hello.yaml"
|
||||
"$ref": "#/components/responses/_response.yaml"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -30,7 +30,7 @@
|
||||
},
|
||||
"components": {
|
||||
"responses": {
|
||||
"_hello.yaml": {
|
||||
"_response.yaml": {
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
|
||||
@@ -19,4 +19,4 @@ paths:
|
||||
operationId: findPets
|
||||
responses:
|
||||
200:
|
||||
$ref: "./hello.yaml"
|
||||
$ref: "./response.yaml"
|
||||
|
||||
@@ -1548,7 +1548,7 @@ describe('bundle files method - 3.0', function () {
|
||||
|
||||
it('Should return bundled file - referenced response', async function () {
|
||||
let contentRoot = fs.readFileSync(referencedResponse + '/root.yaml', 'utf8'),
|
||||
contentRef = fs.readFileSync(referencedResponse + '/hello.yaml', 'utf8'),
|
||||
contentRef = fs.readFileSync(referencedResponse + '/response.yaml', 'utf8'),
|
||||
expected = fs.readFileSync(referencedResponse + '/expected.json', 'utf8'),
|
||||
input = {
|
||||
type: 'multiFile',
|
||||
@@ -1564,7 +1564,7 @@ describe('bundle files method - 3.0', function () {
|
||||
content: contentRoot
|
||||
},
|
||||
{
|
||||
path: '/hello.yaml',
|
||||
path: '/response.yaml',
|
||||
content: contentRef
|
||||
}
|
||||
],
|
||||
@@ -1580,7 +1580,7 @@ describe('bundle files method - 3.0', function () {
|
||||
|
||||
it('Should return bundled file - referenced Parameter', async function () {
|
||||
let contentRoot = fs.readFileSync(referencedParameter + '/root.yaml', 'utf8'),
|
||||
contentRef = fs.readFileSync(referencedParameter + '/hello.yaml', 'utf8'),
|
||||
contentRef = fs.readFileSync(referencedParameter + '/parameter.yaml', 'utf8'),
|
||||
expected = fs.readFileSync(referencedParameter + '/expected.json', 'utf8'),
|
||||
input = {
|
||||
type: 'multiFile',
|
||||
@@ -1596,7 +1596,7 @@ describe('bundle files method - 3.0', function () {
|
||||
content: contentRoot
|
||||
},
|
||||
{
|
||||
path: '/hello.yaml',
|
||||
path: '/parameter.yaml',
|
||||
content: contentRef
|
||||
}
|
||||
],
|
||||
@@ -1612,7 +1612,7 @@ describe('bundle files method - 3.0', function () {
|
||||
|
||||
it('Should return bundled file - referenced Request Body', async function () {
|
||||
let contentRoot = fs.readFileSync(referencedRequestBody + '/root.yaml', 'utf8'),
|
||||
contentRef = fs.readFileSync(referencedRequestBody + '/hello.yaml', 'utf8'),
|
||||
contentRef = fs.readFileSync(referencedRequestBody + '/rbody.yaml', 'utf8'),
|
||||
expected = fs.readFileSync(referencedRequestBody + '/expected.json', 'utf8'),
|
||||
input = {
|
||||
type: 'multiFile',
|
||||
@@ -1628,7 +1628,7 @@ describe('bundle files method - 3.0', function () {
|
||||
content: contentRoot
|
||||
},
|
||||
{
|
||||
path: '/hello.yaml',
|
||||
path: '/rbody.yaml',
|
||||
content: contentRef
|
||||
}
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user