11import type { OpenAPILatest } from '../types/openapi' ;
22import type { OpenApiLatest_Media , OpenApiLatest_Operation , OpenApiLatest_Parameter , OpenApiLatest_PathItem , OpenApiLatest_Request , OpenApiLatest_Response , OpenApiLatest_Schema } from './helpers' ;
33import type { PrinterConfigs , PrinterOptions } from './types' ;
4+ import { pkgName , pkgVersion } from '../const' ;
45import { OpenAPIVersion } from '../types/openapi' ;
56import { toImportPath } from '../utils/path' ;
67import { isString , isUndefined } from '../utils/type-is' ;
@@ -272,6 +273,7 @@ export class Printer {
272273 hideHeaders,
273274 hideHelpers,
274275 hideFooters,
276+ hideAlert,
275277 hideInfo,
276278 hideComponents,
277279 hideImports,
@@ -282,6 +284,7 @@ export class Printer {
282284
283285 return [
284286 ! hideHeaders && header ,
287+ ! hideAlert && this . #printAlert( ) ,
285288 ! hideInfo && this . #printInfo( ) ,
286289 ! hideImports && this . #printImports( ) ,
287290 ! hideHelpers && Printer . helpersCode ,
@@ -293,6 +296,20 @@ export class Printer {
293296 . join ( '\n\n' ) ;
294297 }
295298
299+ #printAlert( ) {
300+ return [
301+ `/**` ,
302+ ` * This file is generated by ${ pkgName } @${ pkgVersion } .` ,
303+ ` * Please do not edit it manually.` ,
304+ ` * If you use the following tools, you can refer to the corresponding documentation` ,
305+ ` * and ignore the check of this file.` ,
306+ ` * - [ESLint](https://eslint.org/docs/latest/use/configure/ignore)` ,
307+ ` * - [Prettier](https://prettier.io/docs/en/ignore.html)` ,
308+ ` * - [Biome](https://biomejs.dev/guides/configure-biome/#ignore-files)` ,
309+ ` */` ,
310+ ] . join ( `\n` ) ;
311+ }
312+
296313 #printInfo( ) {
297314 const {
298315 contact,
0 commit comments