-
-
Notifications
You must be signed in to change notification settings - Fork 543
Add paths support #328
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add paths support #328
Conversation
> = {}; | ||
responses.parameters.forEach((p) => { | ||
if (!allParameters[p.in]) allParameters[p.in] = {}; | ||
// TODO: handle $ref parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
parameters
can be a $ref
rather than an object. The first cut doesn’t handle that (yet)
|
||
finalOutput += "export interface components {\n"; | ||
|
||
// TODO: handle components.parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also don’t yet handle components.parameters
, which would be needed for $ref
parameters (above)
Codecov Report
@@ Coverage Diff @@
## master #328 +/- ##
==========================================
+ Coverage 86.40% 88.93% +2.53%
==========================================
Files 5 5
Lines 250 226 -24
Branches 88 77 -11
==========================================
- Hits 216 201 -15
+ Misses 22 18 -4
+ Partials 12 7 -5
Continue to review full report at Codecov.
|
using currently unreleased version of `swagger-to-ts`, see openapi-ts/openapi-typescript#328
fyi I'm currently exploring generating types from GitHub's OpenAPI spec and will send pull requests to address the bugs I've found. See octokit/openapi-types.ts#1 |
Satisfies #236. Though this doesn’t have 100% of all paths features, it’s at least a start 🙂
cc @gr2m (wanted to tag you to let you know this is done, and will be ready for testing in the next release!)