You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
It's easy to get a rudimentary variant of this functionality running using the API. I would be willing to assist with this feature, but I don't know all of the complexity involved in rolling it in to the CLI at this point.
If this is as straightforward as it seems to me, after doing my own implementation, then I'm happy to do a PR for it. As I envision it, the --validate flag would require either:
a valid redocly.yaml (in which case all defined apis will be validated and any failure would throw an error)
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
The text was updated successfully, but these errors were encountered: