Open Try431 opened 2 months ago
Hi @Try431! The --raw
flag is only available on openapi
, not on openapi:validate
. Apologies for the confusion there.
Our validation errors may change without warning so we don't recommend relying on the validation output itself, which is why I'm a little hesitant to ship a --raw
flag for openapi:validate
.
As a safer alternative, I'd recommend using the exit code instead. For all rdme
commands, a zero exit code indicates a successful state and a non-zero exit code indicates an error. Would that work for your use case?
The docs specify that passing in a
--raw
flag to any of theopenapi
commands should yield the result in a JSON object, so that the commands can be used in a script. However, at least as of v8.6.6 (which is what I'm on), I only get an error:Is this a bug, or should the documentation be updated to clarify that
openapi:validate
can't be used programmatically? It'd be really helpful to be able to check the output before syncing a newly-generated swagger doc in our CI.Thanks!