fork of hey-api/openapi-ts because I need some additional things
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #3351 from beelarr/bryon/comments-doc

docs: add comments attribute to plugins section

authored by

Lubos and committed by
GitHub
060d27b2 3bb8ca2d

+36
+36
docs/openapi-ts/plugins/typescript.md
··· 130 130 131 131 We recommend exporting enums as plain JavaScript objects. [TypeScript enums](https://www.typescriptlang.org/docs/handbook/enums.html) are not a type-level extension of JavaScript and pose [typing challenges](https://dev.to/ivanzm123/dont-use-enums-in-typescript-they-are-very-dangerous-57bh). 132 132 133 + ## Comments 134 + 135 + By default, `@hey-api/typescript` will include comments in the generated code based on descriptions from your OpenAPI specification. If you want to reduce the size of your generated files or prefer cleaner output, you can disable comments. 136 + 137 + ::: code-group 138 + 139 + ```js [enabled] 140 + export default { 141 + input: 'hey-api/backend', // sign up at app.heyapi.dev 142 + output: 'src/client', 143 + plugins: [ 144 + // ...other plugins 145 + { 146 + comments: true, // default // [!code ++] 147 + name: '@hey-api/typescript', 148 + }, 149 + ], 150 + }; 151 + ``` 152 + 153 + ```js [disabled] 154 + export default { 155 + input: 'hey-api/backend', // sign up at app.heyapi.dev 156 + output: 'src/client', 157 + plugins: [ 158 + // ...other plugins 159 + { 160 + comments: false, // [!code ++] 161 + name: '@hey-api/typescript', 162 + }, 163 + ], 164 + }; 165 + ``` 166 + 167 + ::: 168 + 133 169 ## API 134 170 135 171 You can view the complete list of options in the [UserConfig](https://github.com/hey-api/openapi-ts/blob/main/packages/openapi-ts/src/plugins/@hey-api/typescript/types.ts) interface.