-
Notifications
You must be signed in to change notification settings - Fork 164
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(fix): fixes trailing slash parsing in openapi-parser, updates tests (#…
- Loading branch information
1 parent
e10d2ea
commit 50374c9
Showing
8 changed files
with
230 additions
and
120 deletions.
There are no files selected for viewing
216 changes: 108 additions & 108 deletions
216
packages/cli/openapi-parser/src/__test__/__snapshots__/belvo.test.ts.snap
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
95 changes: 95 additions & 0 deletions
95
packages/cli/openapi-parser/src/__test__/__snapshots__/path.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`path parsing path parse open api 1`] = ` | ||
{ | ||
"channel": [], | ||
"description": null, | ||
"endpoints": [ | ||
{ | ||
"audiences": [], | ||
"authed": false, | ||
"availability": null, | ||
"description": null, | ||
"errorStatusCode": [], | ||
"examples": [ | ||
{ | ||
"codeSamples": [], | ||
"description": null, | ||
"headers": [], | ||
"name": null, | ||
"pathParameters": [], | ||
"queryParameters": [], | ||
"request": null, | ||
"response": null, | ||
"type": "full", | ||
}, | ||
], | ||
"generatedRequestName": "GetExampleWithoutTrailingSlashRequest", | ||
"headers": [], | ||
"internal": null, | ||
"method": "GET", | ||
"operationId": null, | ||
"path": "/example-without-trailing-slash", | ||
"pathParameters": [], | ||
"queryParameters": [], | ||
"request": null, | ||
"requestNameOverride": null, | ||
"response": null, | ||
"sdkName": null, | ||
"server": [], | ||
"summary": "Get Example", | ||
"tags": [], | ||
}, | ||
{ | ||
"audiences": [], | ||
"authed": false, | ||
"availability": null, | ||
"description": null, | ||
"errorStatusCode": [], | ||
"examples": [ | ||
{ | ||
"codeSamples": [], | ||
"description": null, | ||
"headers": [], | ||
"name": null, | ||
"pathParameters": [], | ||
"queryParameters": [], | ||
"request": null, | ||
"response": null, | ||
"type": "full", | ||
}, | ||
], | ||
"generatedRequestName": "GetExampleWithTrailingSlashRequest", | ||
"headers": [], | ||
"internal": null, | ||
"method": "GET", | ||
"operationId": null, | ||
"path": "/example-with-trailing-slash/", | ||
"pathParameters": [], | ||
"queryParameters": [], | ||
"request": null, | ||
"requestNameOverride": null, | ||
"response": null, | ||
"sdkName": null, | ||
"server": [], | ||
"summary": "Get Example with trailing", | ||
"tags": [], | ||
}, | ||
], | ||
"errors": {}, | ||
"globalHeaders": [], | ||
"groups": {}, | ||
"hasEndpointsMarkedInternal": false, | ||
"nonRequestReferencedSchemas": [], | ||
"schemas": {}, | ||
"securitySchemes": {}, | ||
"servers": [], | ||
"tags": { | ||
"orderedTagIds": null, | ||
"tagsById": {}, | ||
}, | ||
"title": "Sample Path Parsing API", | ||
"variables": {}, | ||
"webhooks": [], | ||
} | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
packages/cli/openapi-parser/src/__test__/fixtures/path/openapi.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
openapi: 3.0.0 | ||
info: | ||
title: Sample Path Parsing API | ||
version: 1.0.0 | ||
paths: | ||
/example-without-trailing-slash: | ||
get: | ||
summary: Get Example | ||
/example-with-trailing-slash/: | ||
get: | ||
summary: Get Example with trailing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { testParseOpenAPI } from "./testParseOpenApi"; | ||
|
||
describe("path parsing", () => { | ||
testParseOpenAPI("path", "openapi.yml"); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters