I'm looking for an efficient tool (if possible in Node JS) that could convert a YAML file extracted from swagger to a JSON SCHEMA or a typescript interface. Until now the only working way I found was:
YAML->RAML->JSON SCHEMA->TYPESCRIPT interface
STEP1: YAML to RAML
only via this website. No easy to use libraries found... https://apimatic.io/transformer
STEP2: RAML TO JSON SCHEMA
I found and tested this library https://github.com/raml-org/ramldt2jsonschema
STEP3: JSON SCHEMA TO TYPESCRIPT interface
I found and tested this library https://www.npmjs.com/package/json-schema-to-typescript
If you know a better tool for doing it, please let me know. Because it can work if you have two or three models you want to validate, but it could be boring in case of 500 different models.
Note: The goal here is not to take a simple JSON file nor a XML file but to be able to validate the correct received value format with JSON Schema or a Typescript interface