Skip to content
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

Angular Client is throwing an error when no configuration is provided #10090

Closed
Neospiro opened this issue Mar 10, 2020 · 1 comment
Closed

Comments

@Neospiro
Copy link

Hi,

I generate angular clients and since last release, there is a problem.

Before, this was the generated code for a request :
image

Now, it generate this :
image

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

@Neospiro 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 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
frantuma added a commit to swagger-api/swagger-codegen-generators that referenced this issue Mar 11, 2020
@HugoMario
Copy link
Contributor

fixed by swagger-codegen-generators#622

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants