Skip to content

Commit

Permalink
#1370 Add tests for OASv2
Browse files Browse the repository at this point in the history
  • Loading branch information
Thodin3 committed Apr 13, 2021
1 parent c645cf4 commit 359fc9f
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -692,7 +692,7 @@ exports[`OpenAPI 2 generator query params endpoint with query params 1`] = `
\\"type\\": \\"string\\"
},
{
\\"name\\": \\"postcode\\",
\\"name\\": \\"post.code\\",
\\"in\\": \\"query\\",
\\"required\\": false,
\\"type\\": \\"string\\"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class EndpointWithQueryParams {
@queryParams
queryParams: {
country: String;
postcode?: String;
"post.code"?: String;
}
) {}

Expand Down
2 changes: 1 addition & 1 deletion lib/src/generators/openapi2/openapi2.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ describe("OpenAPI 2 generator", () => {
type: expect.anything()
},
{
name: "postcode",
name: "post.code",
in: "query",
required: false,
type: expect.anything()
Expand Down
1 change: 0 additions & 1 deletion lib/src/parsers/query-params-parser.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ describe("query params parser", () => {
},
optional: false
});

});

test("parses @queryParams as interface parameter", () => {
Expand Down

0 comments on commit 359fc9f

Please sign in to comment.