-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
[BUG][typescript-fetch] HTTPHeaders and RequestCredentials type errors #3604
Labels
Comments
👍 Thanks for opening this issue! The team will review the labels and make any necessary changes. |
gbark
pushed a commit
to gbark/openapi-generator
that referenced
this issue
Aug 9, 2019
…nd credentials methods in runtime.ts
4 tasks
jimschubert
added a commit
that referenced
this issue
Aug 11, 2019
* master: (122 commits) Fix #3604 by adding undefined as return type to headers and credentials methods in runtime.ts (#3605) Prepare 4.1.1-SNAPSHOT (#3603) Prepare 4.1.0 release (#3597) [java][client][jax-rs] Add a constant for Jackson @JsonProperty (#3560) restore openapi3 petstore.yaml (#3590) Add a new NodeJS Express server generator (#3567) [C#][client][csharp-netcore] Fix csharp netcore defaultheaders (#3562) Fix issue deserializing to nullptr (#3572) [OCaml] Add file post-processing (#3583) [dart2] Fix up test code generation, double deserialization, 'new' keyword deprecation (#3576) Run Qt5 client sample test (#3415) typescript-fetch: allow configuration of headers and credentials (#3586) using partials in ruby api_client (#3564) [OCaml] Added optional params support in API operations (#3568) [Rust Server] Generate valid Rustdocs for lazy_static items (#3556) Fix NPM build for Typescript-fetch (#3403) Expand path templates via resttemplate's uriTemplateHandler (#3500) Readme updated with a new tutorial and company using OpenAPI Generator (#3566) Fix logic of `getNullableType` of csharp server and client. (#3537) [Ruby] clean up Ruby dev dependencies (#3551) ...
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report Checklist
4.1.0
Expected:
No type errors in TypeScript output.
Actual:
Description
A type error regression was introduced with this PR. The return types of
get headers()
andget credentials()
inruntime.ts
doesn't reflect that the return value might be undefined.openapi-generator version
4.1.0
OpenAPI declaration file content or url
https://github.com/OAI/OpenAPI-Specification/blob/master/examples/v3.0/petstore.yaml
Steps to reproduce
openapi-generator generate -g typescript-fetch -i ./PATH_TO_PETSTORE.yml -o ./petstore
tsc ./petstore --noEmit
OR:
Clone this repo and run
npm install && npm run typecheck
:https://github.com/gbark/openapi-petstore
Suggest a fix
Adding
undefined
as a return type toget headers()
andget credentials()
inruntime.ts
should do it.I've created a small PR which fixes it. #3605
The text was updated successfully, but these errors were encountered: