Skip to content

.redocly.lint-ignore.yaml file not respected when generating types #2189

Open
@riverajo

Description

@riverajo

openapi-typescript version

7.6.1

Node.js version

v22.12.0

OS + version

Linux

Description

We've recently started to try to improve our API specs. We are using redcoly for linting. It appears that openapi-typescript also lints internally when generating types using redocly. After adding a redocly.yaml and setting the - recommended, type generation is failing. We've created an ignore file per: https://redocly.com/docs/cli/commands/lint, but openapi-typescript does not appears to be respecting the file and lint failures stop type generation. perhaps they need to be filtered out here: https://github.com/openapi-ts/openapi-typescript/blob/main/packages/openapi-typescript/src/lib/redoc.ts#L85-L102

My spec technically passes, however you do get a warning

Woohoo! Your API description is valid. 🎉
5 problems are explicitly ignored.

Reproduction

  • Create a simple spec with lint errors, but is valid
  • generate an ignore file using redocly cli
  • attempt to generate types

Expected result

openapi-typescript internal linting would also respect the redocly's .redocly.lint-ignore.yaml

Required

  • My OpenAPI schema is valid and passes the Redocly validator (npx @redocly/cli@latest lint)

Extra

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingopenapi-tsRelevant to the openapi-typescript library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions