Forum Discussion

fmg's avatar
fmg
New Contributor
8 years ago

Body request parameters not being created after Swagger definition import

Hello,

 

I'm trying to import a Swagger 2.0 definition to SoapUI, but after doing so the request parameters aren't automatically generating, defeating the purpose of the import.

 

I have the following definition:

 

{
    "swagger":"2.0",
    "info":{
        "description":"The Application",
        "version":"1.0.0",
        "title":"Sample REST Application",
        "contact":{
            "name":"users@cxf.apache.org"
        },
        "license":{
            "name":"Apache 2.0 License",
            "url":"http://www.apache.org/licenses/LICENSE-2.0.html"
        }
    },
    "basePath":"/timeline",
    "paths":{
        "/":{
            "post":{
                "summary":"Retrieves records",
                "description":"",
                "operationId":"getTimelineRecords",
                "produces":[
                    "application/json"
                ],
                "parameters":[
                    {
                        "in":"body",
                        "name":"body",
                        "description":"The list of parameters",
                        "required":true,
                        "schema":{
                            "type":"array",
                            "items":{
                                "$ref":"#/definitions/TimelineParamDTO"
                            }
                        }
                    }
                ],
                "responses":{
                    "200":{
                        "description":"successful operation",
                        "schema":{
                            "$ref":"#/definitions/TimelineRecordDTO"
                        }
                    }
                }
            }
        }
    },
    "definitions":{
        "TimelineRecordDTO":{
            "type":"object",
            "properties":{
                "source":{
                    "type":"string",
                    "description":"The record source"
                },
                "type":{
                    "type":"string",
                    "description":"The record type"
                },
                "title":{
                    "type":"string",
                    "description":"The record title"
                },
                "status":{
                    "type":"string",
                    "description":"The record status"
                },
                "identifier":{
                    "type":"string",
                    "description":"The record identifier"
                },
                "itemDate":{
                    "type":"string",
                    "description":"The item date"
                },
                "direction":{
                    "type":"string",
                    "description":"The direction"
                },
                "body":{
                    "type":"string",
                    "description":"The record body"
                }
            },
            "description":"A single timeline record"
        },
        "TimelineParamDTO":{
            "type":"object",
            "properties":{
                "key":{
                    "type":"string",
                    "description":"The key"
                },
                "value":{
                    "type":"string",
                    "description":"The value"
                }
            },
            "description":"Key/value pair"
        }
    }
}

However, after importing to SoapUI, the request parameters aren't generated:

 

 

Am I doing something wrong, or miss understanding the import process?

 

Thanks.

  • nmrao's avatar
    nmrao
    Champion Level 3
    Which version of ReadyAPI are you using?
    • fmg's avatar
      fmg
      New Contributor

      Latest version, 2.1.0.