title: How to generate a Swagger #definition from sample JSON
body: <p>Take the following #definition from the pet store example. Given a #definition section a JSON structure can be generated</p>
  
  <p>e.g.
  <a href="https://i.stack.imgur.com/6KRwn.png" rel="noreferrer"><img src="https://i.stack.imgur.com/6KRwn.png" alt="Coversion of definition to JSON"></a></p>
  
  <p>Is there something that can do the reverse given a largeish complex JSON file?</p>
  
  <p>Given the below JSON Structure can I get the #defintion section of a swagger file generated to save some typing</p>
  
  <pre><code>{
    "variable": "sample",
    "object1": {
      "obj-field1": "field 1 of object",
      "obj-field2": "field 2 of object",
      "anArray": [
        "Value 1",
        {
          "anArrayObj1": "obj1fieldinarray",
          "anArrayObj2": "obj2fieldinarray"
        }
      ]
    }
  }
  </code></pre>