AnsweredAssumed Answered

Swagger file with invalid structure?

Question asked by david.konatschnig on Jul 22, 2016
Latest reply on Jul 25, 2016 by 30389103


Hello

I want to use the swagger file that is generated for one of my RESTful services and convert it to YAML.

However, i get validation errors for Array Elements.

In my Boomi JSON Profile, i have some repeating Array Elements defined.

Like this:

array.jpg

 

 

In Swagger, it looks like this:

"nationalities" : {

     "type" : "array",

     "properties" : {

        "ArrayElement1" : {

           "type" : "string"

        }

     }

  }

 

When i now validate the Swagger File with editor.swagger.io, i get the following errors:

Swagger Error

Missing required property: items

 

So i have to change the swagger file manually to look like this:

"nationalities" : {

     "type" : "array",

     "items" : {

           "type" : "string"

        }

  }

 

Is this a bug? Or how can i get a valid Swagger file? Do i need to change something in my Boomi JSON Profile?

thanks

Outcomes