-
Notifications
You must be signed in to change notification settings - Fork 166
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(cli): add a mode to support parsing deep object query parameters (#…
- Loading branch information
Showing
21 changed files
with
943 additions
and
29 deletions.
There are no files selected for viewing
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
12 changes: 3 additions & 9 deletions
12
packages/cli/api-importers/openapi/openapi-ir-parser/.depcheckrc.json
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 |
---|---|---|
@@ -1,10 +1,4 @@ | ||
{ | ||
"ignores": [ | ||
"@types/jest", | ||
"globals", | ||
"@types/node" | ||
], | ||
"ignore-patterns": [ | ||
"lib" | ||
] | ||
} | ||
"ignores": ["@types/jest", "globals", "@types/node"], | ||
"ignore-patterns": ["lib"] | ||
} |
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 |
---|---|---|
|
@@ -52,4 +52,4 @@ | |
"typescript": "4.6.4", | ||
"vitest": "^2.0.5" | ||
} | ||
} | ||
} |
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
187 changes: 187 additions & 0 deletions
187
...penapi/openapi-ir-to-fern-tests/src/__test__/__snapshots__/openapi-docs/query-params.json
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,187 @@ | ||
{ | ||
"absoluteFilePath": "/DUMMY_PATH", | ||
"importedDefinitions": {}, | ||
"namedDefinitionFiles": { | ||
"__package__.yml": { | ||
"absoluteFilepath": "/DUMMY_PATH", | ||
"contents": { | ||
"service": { | ||
"auth": false, | ||
"base-path": "", | ||
"endpoints": { | ||
"search": { | ||
"auth": false, | ||
"docs": undefined, | ||
"examples": [ | ||
{ | ||
"response": { | ||
"body": { | ||
"results": [ | ||
"results", | ||
], | ||
}, | ||
}, | ||
}, | ||
], | ||
"method": "GET", | ||
"pagination": undefined, | ||
"path": "/search", | ||
"request": { | ||
"name": "SearchRequest", | ||
"query-parameters": { | ||
"filter": "optional<SearchRequestFilter>", | ||
"limit": "optional<integer>", | ||
"sort": "optional<SearchRequestSort>", | ||
"tags": { | ||
"allow-multiple": true, | ||
"type": "optional<string>", | ||
}, | ||
}, | ||
}, | ||
"response": { | ||
"docs": "Successful response", | ||
"type": "SearchResponse", | ||
}, | ||
"source": { | ||
"openapi": "../openapi.yml", | ||
}, | ||
}, | ||
}, | ||
"source": { | ||
"openapi": "../openapi.yml", | ||
}, | ||
}, | ||
"types": { | ||
"SearchRequestFilter": { | ||
"docs": undefined, | ||
"properties": { | ||
"age": "optional<integer>", | ||
"location": "optional<SearchRequestFilterLocation>", | ||
"name": "optional<string>", | ||
}, | ||
"source": { | ||
"openapi": "../openapi.yml", | ||
}, | ||
}, | ||
"SearchRequestFilterLocation": { | ||
"docs": undefined, | ||
"properties": { | ||
"city": "optional<string>", | ||
"coordinates": "optional<SearchRequestFilterLocationCoordinates>", | ||
"country": "optional<string>", | ||
}, | ||
"source": { | ||
"openapi": "../openapi.yml", | ||
}, | ||
}, | ||
"SearchRequestFilterLocationCoordinates": { | ||
"docs": undefined, | ||
"properties": { | ||
"latitude": "optional<double>", | ||
"longitude": "optional<double>", | ||
}, | ||
"source": { | ||
"openapi": "../openapi.yml", | ||
}, | ||
}, | ||
"SearchRequestSort": { | ||
"enum": [ | ||
"asc", | ||
"desc", | ||
], | ||
"source": { | ||
"openapi": "../openapi.yml", | ||
}, | ||
}, | ||
"SearchResponse": { | ||
"docs": undefined, | ||
"properties": { | ||
"results": "optional<list<string>>", | ||
}, | ||
"source": { | ||
"openapi": "../openapi.yml", | ||
}, | ||
}, | ||
}, | ||
}, | ||
"rawContents": "types: | ||
SearchRequestFilterLocationCoordinates: | ||
properties: | ||
latitude: optional<double> | ||
longitude: optional<double> | ||
source: | ||
openapi: ../openapi.yml | ||
SearchRequestFilterLocation: | ||
properties: | ||
city: optional<string> | ||
country: optional<string> | ||
coordinates: optional<SearchRequestFilterLocationCoordinates> | ||
source: | ||
openapi: ../openapi.yml | ||
SearchRequestFilter: | ||
properties: | ||
name: optional<string> | ||
age: optional<integer> | ||
location: optional<SearchRequestFilterLocation> | ||
source: | ||
openapi: ../openapi.yml | ||
SearchRequestSort: | ||
enum: | ||
- asc | ||
- desc | ||
source: | ||
openapi: ../openapi.yml | ||
SearchResponse: | ||
properties: | ||
results: optional<list<string>> | ||
source: | ||
openapi: ../openapi.yml | ||
service: | ||
auth: false | ||
base-path: '' | ||
endpoints: | ||
search: | ||
path: /search | ||
method: GET | ||
auth: false | ||
source: | ||
openapi: ../openapi.yml | ||
request: | ||
name: SearchRequest | ||
query-parameters: | ||
filter: optional<SearchRequestFilter> | ||
sort: optional<SearchRequestSort> | ||
limit: optional<integer> | ||
tags: | ||
type: optional<string> | ||
allow-multiple: true | ||
response: | ||
docs: Successful response | ||
type: SearchResponse | ||
examples: | ||
- response: | ||
body: | ||
results: | ||
- results | ||
source: | ||
openapi: ../openapi.yml | ||
", | ||
}, | ||
}, | ||
"packageMarkers": {}, | ||
"rootApiFile": { | ||
"contents": { | ||
"display-name": "Query Parameters API", | ||
"error-discrimination": { | ||
"strategy": "status-code", | ||
}, | ||
"name": "api", | ||
}, | ||
"defaultUrl": undefined, | ||
"rawContents": "name: api | ||
error-discrimination: | ||
strategy: status-code | ||
display-name: Query Parameters API | ||
", | ||
}, | ||
} |
Oops, something went wrong.