When the client generator runs, it generates and inserts a types file into the client directory that defines the types based on the schema file. The types file that is generated currently contains no warning that it is generated code, and should not be edited.
We need to add to the generator code, to append the warning as a code comment to the top of any files that are generated via openapi-typescript when reading the inputted schema file.
The warning should be similar what is already present in the README:
🚨 Do not edit the files in the /generated folder after generating a client. These files are generated using the OpenAPI Schema and editing them may put you at risk of no longer conforming to the specifications of the API you are using! 🚨
When the client generator runs, it generates and inserts a types file into the client directory that defines the types based on the schema file. The types file that is generated currently contains no warning that it is generated code, and should not be edited.
We need to add to the generator code, to append the warning as a code comment to the top of any files that are generated via
openapi-typescriptwhen reading the inputted schema file.The warning should be similar what is already present in the README:
🚨 Do not edit the files in the
/generatedfolder after generating a client. These files are generated using the OpenAPI Schema and editing them may put you at risk of no longer conforming to the specifications of the API you are using! 🚨