Skip to content

[nx-openapi] Add generated code warning to generated types file #18

Description

@ryanrixxh

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! 🚨

Metadata

Metadata

Assignees

No one assigned

    Labels

    No fields configured for Feature.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions