You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I generate angular clients and since last release, there is a problem.
Before, this was the generated code for a request :
Now, it generate this :
The problem is with this line : if (this.configuration.apiKeys["Authorization"]) {
throwing an error because this.configuration.apiKeys is never initialized as an array (no default value).
If I manually fix the generated code with if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) {
It works
The text was updated successfully, but these errors were encountered:
Neospiro
changed the title
Angular Client is not correctly initialized
Angular Client is throwing an error when no configuration is provided
Mar 10, 2020
webron
transferred this issue from swagger-api/swagger-editor
Mar 10, 2020
frantuma
added a commit
to swagger-api/swagger-codegen-generators
that referenced
this issue
Mar 11, 2020
Hi,
I generate angular clients and since last release, there is a problem.
Before, this was the generated code for a request :
Now, it generate this :
The problem is with this line :
if (this.configuration.apiKeys["Authorization"]) {
throwing an error because
this.configuration.apiKeys
is never initialized as an array (no default value).If I manually fix the generated code with
if (this.configuration.apiKeys && this.configuration.apiKeys["Authorization"]) {
It works
The text was updated successfully, but these errors were encountered: