-
Notifications
You must be signed in to change notification settings - Fork 52
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
YAML-Support #65
Comments
Hey @DenisSabo! Do you mean using YAML files for specifying the Swagger spec (similar to the current Swagger JSON file)? Thanks for the input! |
Hey @mtennoe, yes that's what I meant. The reason for the suggestion is that for me it would mean one less step in my toolchain. Thank you for the fast response! 👍 |
It would add some complexity to the whole pipeline, but if we do it correctly we can hide a lot of the complexity. I guess there are some nice tools out there for parsing and reading the YAML and convert it to the internal format in the codegen tool as well. Don't really have the time to look into that in the nearest future myself though. But you are free to give it a go if you want to :) |
Out of scope IMHO. @DenisSabo you could convert from YAML to JSON as a preprocessing step, e.g. https://stackoverflow.com/questions/34733253/converting-a-swagger-yaml-file-to-json-from-the-command-line |
with var swagger = JSON.parse(fs.readFileSync(file, "UTF-8")); by var yaml = require('js-yaml');
var swagger = yaml.safeLoad(fs.readFileSync(file, 'utf8')); IMHO, there is no need for adding the |
Hey there,
for libraries like https://www.npmjs.com/package/swagger-typescript-codegen it would be nice, if your tool could generate a Typescript file, out of a YAML file.
The text was updated successfully, but these errors were encountered: