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