how to generate swagger definition file using json/json schema

jhansi_lakshmik 11-07-2019

Hi,

Do we have any procedure to convert simple json file example in to swagger definition file ,if so could any one suggest the way

Example :simple json

{

  "Level1": [

    {

      "level2": "AB",

      "level3": {

        "ABS1": [ABSC1","ABSC2" ],

        "ABS2": ["ABS2C1" ]     }

    },

    {

      "level2": "AD",

      "level3": {"ADS1": ["ADSC1",  "ADSC2"],

        "ADS2": [ "ADS2C1","ADS2C2","ADS2C3" ]}

    }

  ]

}

Thanks in advance,

Jhansi.

Accepted Solutions (1)

Accepted Solutions (1)

Answers (5)

Answers (5)

jhansi_lakshmik 12-07-2019

Thanks for the prompt response , do we have any documentation on how to use YAML file to create a datasource, if documentation is not available  any insights  of this scenario would be great.

jhansi_lakshmik 12-07-2019

Hi Mayank Gandhi,

Thanks for the response, i have converted the sample JSON to JSON schema and to YAML, i believe its needed to convert this YAML file to swagger definition file  so that i can create data source to use the sample json , any insights post conversion of json to YAML and how to make swagger from YAML would be great.

Thanks in advance,

Jhansi