Skip to content

CLI option to validate existing file #1738

Open
@markedwards

Description

@markedwards

Description

There's no apparent way to validate that the existing generated types in the target file match the current schema. This is useful in a CI pipeline.

Proposal

A validation mode triggered by a --validate should do the trick. This would change the behavior from updating the file at the output path, to validating that its contents match the output that would be generated from the current schema. If the file doesn't exist, or if there is any difference, an error should be emitted.

Checklist

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or requestopenapi-tsRelevant to the openapi-typescript library

Type

No type

Projects

Status

No status

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions