swagger-api / swagger-api/swagger-codegen
Typescript: Schema "Error" is renamed to ModelError and not referenced in the types
Nobody has claimed this yet.
- Dominant language
- Mustache
- Stars
- 17.8k
- Forks
- 6k
- PR merge metrics
- No merged PRs in 30d
Description
Description
In the schemas exists a type error:
/**
* The name of the error.
* @type {string}
* @memberof ModelError
*/
type?: string;
/**
* A human-readable description of the problem.
* @type {string}
* @memberof ModelError
*/
description?: string;
}
but renamed to
export interface ModelError {
/**
* The name of the error.
* @type {string}
* @memberof ModelError
*/
type?: string;
/**
* A human-readable description of the problem.
* @type {string}
* @memberof ModelError
*/
description?: string;
}
and never used instead Error stays at other schemas an referencing ES Error
Swagger-codegen version
3.0.44
Command line used for generation
Swagger online editor
Steps to reproduce
Use a swagger schema declaration name it error and generate a typescript axios client
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
No source file or test is named in the issue. Reproduce the case in the Swagger online editor by declaring a schema named Error and generating a TypeScript Axios client; inspect the generated type declarations and references. Done means the generated client consistently uses the intended error type without incorrectly resolving to the built-in Error type.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100