Issue
When using @hey-api/openapi-ts the generated code does not follow sheriff encapsulation rules. This causes sheriff to report errors when having imports from the generated code
Ask
- Can we have a way to exclude modules/paths in the
sheriff.config.ts?
{
ignorePaths: ['src/client/**`]
}
Stackblitz Reproduction
https://stackblitz.com/edit/sheriff-openapit-ts?file=sheriff.config.ts
Report output
> sheriff verify
Verification Report
Issues found:
Total Invalid Files: 7
Total Encapsulation Violations: 12
Total Dependency Rule Violations: 0
----------------------------------
|-- src/app/app.component.ts
| |-- Encapsulation Violations
| | |-- ../client/sdk.gen
|-- src/client/sdk.gen.ts
| |-- Encapsulation Violations
| | |-- ./client.gen
|-- src/client/client/index.ts
| |-- Encapsulation Violations
| | |-- ../core/auth
| | |-- ../core/bodySerializer
| | |-- ../core/params
|-- src/client/client/types.ts
| |-- Encapsulation Violations
| | |-- ../core/auth
| | |-- ../core/types
|-- src/client/client/utils.ts
| |-- Encapsulation Violations
| | |-- ../core/auth
| | |-- ../core/bodySerializer
| | |-- ../core/pathSerializer
|-- src/client/client.gen.ts
| |-- Encapsulation Violations
| | |-- ./types.gen
|-- src/client/index.ts
| |-- Encapsulation Violations
| | |-- ./client.gen
Issue
When using
@hey-api/openapi-tsthe generated code does not follow sheriff encapsulation rules. This causessheriffto report errors when having imports from the generated codeAsk
sheriff.config.ts?Stackblitz Reproduction
https://stackblitz.com/edit/sheriff-openapit-ts?file=sheriff.config.ts
Report output