diff --git a/test/data/toBundleExamples/referenced_parameter/expected.json b/test/data/toBundleExamples/referenced_parameter/expected.json index 6a7c603..61e514f 100644 --- a/test/data/toBundleExamples/referenced_parameter/expected.json +++ b/test/data/toBundleExamples/referenced_parameter/expected.json @@ -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", diff --git a/test/data/toBundleExamples/referenced_parameter/hello.yaml b/test/data/toBundleExamples/referenced_parameter/parameter.yaml similarity index 100% rename from test/data/toBundleExamples/referenced_parameter/hello.yaml rename to test/data/toBundleExamples/referenced_parameter/parameter.yaml diff --git a/test/data/toBundleExamples/referenced_parameter/root.yaml b/test/data/toBundleExamples/referenced_parameter/root.yaml index 8dc8c64..2e35e08 100644 --- a/test/data/toBundleExamples/referenced_parameter/root.yaml +++ b/test/data/toBundleExamples/referenced_parameter/root.yaml @@ -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 diff --git a/test/data/toBundleExamples/referenced_request_body/expected.json b/test/data/toBundleExamples/referenced_request_body/expected.json index 2a0c5b6..9de50c8 100644 --- a/test/data/toBundleExamples/referenced_request_body/expected.json +++ b/test/data/toBundleExamples/referenced_request_body/expected.json @@ -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": { diff --git a/test/data/toBundleExamples/referenced_request_body/hello.yaml b/test/data/toBundleExamples/referenced_request_body/rbody.yaml similarity index 100% rename from test/data/toBundleExamples/referenced_request_body/hello.yaml rename to test/data/toBundleExamples/referenced_request_body/rbody.yaml diff --git a/test/data/toBundleExamples/referenced_request_body/root.yaml b/test/data/toBundleExamples/referenced_request_body/root.yaml index 9eb8115..aa11208 100644 --- a/test/data/toBundleExamples/referenced_request_body/root.yaml +++ b/test/data/toBundleExamples/referenced_request_body/root.yaml @@ -24,7 +24,7 @@ paths: items: $ref: "#/components/schemas/Pet" requestBody: - $ref: "./hello.yaml" + $ref: "./rbody.yaml" components: schemas: Pet: diff --git a/test/data/toBundleExamples/referenced_response/expected.json b/test/data/toBundleExamples/referenced_response/expected.json index 47e2bf8..82f10a7 100644 --- a/test/data/toBundleExamples/referenced_response/expected.json +++ b/test/data/toBundleExamples/referenced_response/expected.json @@ -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": { diff --git a/test/data/toBundleExamples/referenced_response/hello.yaml b/test/data/toBundleExamples/referenced_response/response.yaml similarity index 100% rename from test/data/toBundleExamples/referenced_response/hello.yaml rename to test/data/toBundleExamples/referenced_response/response.yaml diff --git a/test/data/toBundleExamples/referenced_response/root.yaml b/test/data/toBundleExamples/referenced_response/root.yaml index 6e2e91b..5e585e3 100644 --- a/test/data/toBundleExamples/referenced_response/root.yaml +++ b/test/data/toBundleExamples/referenced_response/root.yaml @@ -19,4 +19,4 @@ paths: operationId: findPets responses: 200: - $ref: "./hello.yaml" + $ref: "./response.yaml" diff --git a/test/unit/bundle.test.js b/test/unit/bundle.test.js index 65b93fb..434e65f 100644 --- a/test/unit/bundle.test.js +++ b/test/unit/bundle.test.js @@ -1530,7 +1530,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', @@ -1546,7 +1546,7 @@ describe('bundle files method - 3.0', function () { content: contentRoot }, { - path: '/hello.yaml', + path: '/response.yaml', content: contentRef } ], @@ -1562,7 +1562,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', @@ -1578,7 +1578,7 @@ describe('bundle files method - 3.0', function () { content: contentRoot }, { - path: '/hello.yaml', + path: '/parameter.yaml', content: contentRef } ], @@ -1594,7 +1594,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', @@ -1610,7 +1610,7 @@ describe('bundle files method - 3.0', function () { content: contentRoot }, { - path: '/hello.yaml', + path: '/rbody.yaml', content: contentRef } ],