-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Typescript-Angular2] Generation of POST parameter with "array" schema causes Error. #6098
Comments
We're seeing the same thing after switching to 2.2.3. However, it's not limited to TypeScript-Angular, we can reproduce for TypeScript-fetch and csharp. A similar gist for repo can be found - https://gist.github.com/rgmills/7dab54ab887adcf06968cb520cf4b2a9 |
+1 name: id_product code: 1 |
I have the same error parameters:
- name: body
in: body
schema:
type: array
items:
type: string i cannot generate nothing:
|
Is this issue fixed or workaround available? Thanks. |
Description
This problem appeared in v.2.2.3.
I'm trying to generate "typescript-angular2" client API with http://generator.swagger.io/#!/clients/generateClient service.
I cutted my configuration to make it more readable and it looks like this:
Such a description leads to an error:
That's because of the schema of my parameter:
If I change it to object or to constant, everything OK. For example:
The Swagger spec say's that such a schema for parameter is absoluty legal:
https://swagger.io/specification/#parameterIn (see example where body parameter is an array of string values)
Swagger-codegen version
2.2.3
The text was updated successfully, but these errors were encountered: