generateServices
Type: boolean | undefined
| Default: true
When set to false
, the generator skips generating Angular services, producing only TypeScript types and interfaces.
Usage
typescript
// openapi.config.ts
import { GeneratorConfig } from 'ng-openapi';
const config: GeneratorConfig = {
options: {
generateServices: false
},
... // other configurations
};
export default config;
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
After generation, you'll have:
src/client/
├── models/
│ └── index.ts # TypeScript interfaces
└── index.ts # Main exports
1
2
3
4
2
3
4
Notes
- If services are not generated, the related utilities and providers will also not be generated