-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Open
Labels
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
Description
openapi-generator create broken client for attached schema.
Errors:
- Types error:
> 75 | apiProblemCreate: async (tags: Array<ProblemTagRequest>, options: any = {}): Promise<RequestArgs> => {
| ^ // ProblemTagRequest does not exist
76 | // verify required parameter 'tags' is not null or undefined
77 | assertParamExists('apiProblemCreate', 'tags', tags)
78 | const localVarPath = `/api/problem/`;- DataForm usage error
92 | localVarFormParams.append(tags.join(COLLECTION_FORMATS.csv));
^ // here should be append('tags', tags...- wrong array usage
92 | localVarFormParams.append(tags.join(COLLECTION_FORMATS.csv));
^ // join returns [object Object],[object Object],openapi-generator version
5.0.1
latest dev version
OpenAPI declaration schema
https://gist.github.com/vmstarchenko/9671d45499a66d73b6746e69168c6cc5
Generation Details
java -jar ./openapi-generator-5.0.1/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -i ./api-spec.yaml -g typescript-axios --additional-properties=useSingleRequestParameter=true -o ./client/typescript-axiosGenerated client:
https://gist.github.com/vmstarchenko/5128a715559fcb065649b37b316f3be9
Steps to reproduce
Generate typescript-axios client with useSingleRequestParameter additional property and attached schema
Related issues/PRs
Suggest a fix
Reactions are currently unavailable