-
-
Notifications
You must be signed in to change notification settings - Fork 226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhancement: Include a command-line version to use json-schema-ref-parser via CLI #65
Comments
Apparently, albeit a bit buggy with YAML, there is already a CLI version that can dereference and utilizes However, as the name implies, it's functionality is limited to just dereferencing, it would be nice if it also had support for bundle as well as perhaps provide a list of all external references (i.e. $Refs.paths). |
Yeah, I do have plans to create a CLI for this project eventually. I currently have a CLI that uses this project under the hood to do bundling, but it's tailored for Swagger, rather than any JSON Schema document |
Thank you very much for providing us with swagger-cli. In terms of features, it is precisely what I need and I was already using it for dereferencing a swagger definition prior to having the need to inline the aforementioned into an AWS SAM file however, swagger-cli performs validation prior to deferencing and, I haven't seen an option of skipping that validation, therefore cannot be used to deference anything other than Swagger files. |
Yeah, Swagger-CLI will throw an error for anything other than Swagger 2.0 files. So I definitely need to create a more generic JSON Schema CLI that isn't specific to Swagger files. |
Despite my limited experience with NodeJS, I would love to give you a hand with that, that is if you're willing and can provide some insight into how you'd envision it done; perhaps similar to swagger-cli without support for validation or with support for validation via JSON-Schema (e.g. ajv) and I believe it might be useful to provide a list of all external references (i.e. $Refs.paths). |
Although not using |
Between swagger-cli and openapi-cli most people should have a solution for their needs. |
Both swagger-cli and opeapi-cli are swagger specific |
@dtheodor despite the name so is this tool. It's not actually conforming to the JSON Schema $ref usage, its "JSON Schema as in OpenAPI Schema" so might as well have OpenAPI in the name. If you'd like to contribute a CLI it would not be a huge amount of work, but in general new functionality is not being worked on so you'd need to code that up, or wrap this up in your own CLI code locally, or use something else. |
Include a command-line version with the npm package so that
json-schema-ref-parser
can be simply used via CLI. This will make it easier to use this tool via CICD/build systems and also eliminate the need for writing a wrapper js script to consume this functionality.Something like:
The text was updated successfully, but these errors were encountered: