Convert Swagger JSON to RAML/YAML

后端 未结 5 1148
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-02-05 03:02

How do I convert Swagger JSON to RAML/YAML and validate it? I am not looking for a programmatic way, just a one off conversion.

5条回答
  •  猫巷女王i
    2021-02-05 03:32

    Its actually pretty simple

    Web version of swagger editor gives the flexibility to import your existing swagger file(JSON/YAML) and download the configuration file that is currently being shown. So just combine these two.

    Note: Converting JSON to YAML exists, but not JSON to RAML

    1. First import your swagger JSON at http://editor.swagger.io/#/ (File > Import File)
    2. Once you see your configurations, just download the corresponding YAML version (File > Download YAML).

    The YAML version of the JSON you just uploaded will be downloaded.

提交回复
热议问题