OpenAPITools / OpenAPITools/openapi-generator
[BUG] invalid types generated (Array & Array<T>;)
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
@openapitools/openapi-generator-cli: ^1.0.18-4.3.1
openapi: https://solver.314ecorp.tech/openapi?format=json
command: node node_modules/@openapitools/openapi-generator-cli/bin/openapi-generator generate -i https://solver.314ecorp.tech/openapi?format=json -g typescript-axios --skip-validate-spec -o ./src/client/generatedApis
Types generated Array & Array<T> for some schema.
Here for the 1st type Array there is no generic making problem
/**
*
* @export
* @interface Unit
*/
export interface Unit {
/**
*
* @type {string}
* @memberof Unit
*/
id?: string;
/**
*
* @type {string}
* @memberof Unit
*/
name?: string;
/**
*
* @type {number}
* @memberof Unit
*/
physiciansToSmeRatioCeiling?: number;
/**
*
* @type {Array & Array<ApplicationSkill>}
* @memberof Unit
*/
requiredApplicationSkillSet: Array & Array<ApplicationSkill>;
/**
*
* @type {number}
* @memberof Unit
*/
usersToSmeRatioCeiling?: number;
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue with the provided openapi-generator-cli command and the typescript-axios generator, then inspect the generator's TypeScript type generation and templates. Confirm how the schema produces Array \u0026 Array<T> and ensure the generated interface uses valid TypeScript array syntax; the generated client should compile without the invalid intersection type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100