myoperator / swagman

A Postman to swagger api converter using openAPI v3
4 stars 1 forks source link

Nested array not documented #7

Closed codeasashu closed 5 years ago

codeasashu commented 5 years ago

Right now, if postman json contains nested array, the generated schema only parses it to one level, documenting it to string type. For instance, consider this response json:

{
    "key1": "val1",
    "item": [
        {
            "prop1": "some value",
        "nestedprop":  [{
          "nestedprop1": "some another value"
        }]
        }
    ]
}

The generated schema is:

components:
   schemas:
     ExampleResponseSchema:
       properties:
         key1:
           type: string
         item:
           items:
             nestedprop:
                type: string
           type: array

Which means the swagman isn't visiting internal nodes for nested props. Please fix