Skip to content

Commit 8f3cfac

Browse files
committed
fixes casing of OpenAPI
1 parent 221b058 commit 8f3cfac

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

test/unit/definitionGenerator.spec.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ describe("DefinitionGenerator", () => {
3838
expect(expected).to.be.an.instanceOf(DefinitionGenerator);
3939
});
4040

41-
it("should default to version 3.0.0 of openAPI when openAPI version is not passed in", function () {
41+
it("should default to version 3.0.0 of OpenAPI when OpenAPI version is not passed in", function () {
4242
const serverlessWithoutOpenAPIVersion = structuredClone(mockServerless);
4343
delete serverlessWithoutOpenAPIVersion.processedInput;
4444
let expected = new DefinitionGenerator(
@@ -105,7 +105,7 @@ describe("DefinitionGenerator", () => {
105105
expect(expected.version).to.be.equal("3.0.0");
106106
});
107107

108-
it("should respect the version of openAPI when passed in", function () {
108+
it("should respect the version of OpenAPI when passed in", function () {
109109
const serverlessWithOpenAPIVersion = structuredClone(mockServerless);
110110
serverlessWithOpenAPIVersion.processedInput.options.openApiVersion =
111111
"3.0.2";
@@ -157,7 +157,7 @@ describe("DefinitionGenerator", () => {
157157
});
158158

159159
describe("createInfo", () => {
160-
it("should create openAPI info object correctly", function () {
160+
it("should create OpenAPI info object correctly", function () {
161161
const definitionGenerator = new DefinitionGenerator(
162162
mockServerless,
163163
logger
@@ -918,14 +918,15 @@ describe("DefinitionGenerator", () => {
918918
definitionGenerator.openAPI.components.securitySchemes
919919
).to.have.property("x_amazon_api_key");
920920
expect(
921-
definitionGenerator.openAPI.components.securitySchemes.x_amazon_api_key
921+
definitionGenerator.openAPI.components.securitySchemes
922+
.x_amazon_api_key
922923
).to.have.property("x-amazon-apigateway-authtype");
923924
});
924925
});
925926
});
926927

927928
describe("createTags", () => {
928-
it("should add tags to the openAPI object correctly", function () {
929+
it("should add tags to the OpenAPI object correctly", function () {
929930
mockServerless.service.custom.documentation.tags = [{ name: "tag1" }];
930931

931932
const definitionGenerator = new DefinitionGenerator(

test/unit/openAPIGenerator.spec.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ describe("OpenAPIGenerator", () => {
6868
});
6969

7070
describe("generationAndValidation", () => {
71-
it("should correctly generate a valid openAPI document", async function () {
71+
it("should correctly generate a valid OpenAPI document", async function () {
7272
const succSpy = sinon.spy(logOutput.log, "success");
7373
const errSpy = sinon.spy(logOutput.log, "error");
7474

@@ -99,7 +99,7 @@ describe("OpenAPIGenerator", () => {
9999
getFuncStub.reset();
100100
});
101101

102-
xit("should throw an error when trying to generate an invalid openAPI document", async function () {
102+
xit("should throw an error when trying to generate an invalid OpenAPI document", async function () {
103103
const succSpy = sinon.spy(logOutput.log, "success");
104104
const errSpy = sinon.spy(logOutput.log, "error");
105105

@@ -135,7 +135,7 @@ describe("OpenAPIGenerator", () => {
135135
getFuncStub.reset();
136136
});
137137

138-
it("should correctly validate a valid openAPI document", async function () {
138+
it("should correctly validate a valid OpenAPI document", async function () {
139139
const succSpy = sinon.spy(logOutput.log, "success");
140140
const errSpy = sinon.spy(logOutput.log, "error");
141141

@@ -168,7 +168,7 @@ describe("OpenAPIGenerator", () => {
168168
getFuncStub.reset();
169169
});
170170

171-
it("should throw an error when trying to validate an invalid openAPI document", async function () {
171+
it("should throw an error when trying to validate an invalid OpenAPI document", async function () {
172172
const succSpy = sinon.spy(logOutput.log, "success");
173173
const errSpy = sinon.spy(logOutput.log, "error");
174174

@@ -212,7 +212,7 @@ describe("OpenAPIGenerator", () => {
212212
});
213213

214214
describe("createPostman", () => {
215-
it("should generate a postman collection when a valid openAPI file is generated", function () {
215+
it("should generate a postman collection when a valid OpenAPI file is generated", function () {
216216
const fsStub = sinon.stub(fs, "writeFileSync").returns(true);
217217
const succSpy = sinon.spy(logOutput.log, "success");
218218
const errSpy = sinon.spy(logOutput.log, "error");

0 commit comments

Comments
 (0)