Ask a Question

ReadyApi integration with Swagger

SOLVED
Behdad
Occasional Contributor

ReadyApi integration with Swagger

Hi 

I create Yaml file with Swagger as my Rest Api documentation and it works fine without any error and failure.

But when i want to load / import it into Readyapi i receive below error:

 attribute.components.schema.MyAPI.default is not of type 'array' 

I double check in Swagger and nothing wrong, and of course the type is object , So i don't have any clue on how to solve this issue !

Does any body have similar experience ? 

I would be happy to share your suggestion...

 

 

2 REPLIES 2
richie
Community Hero

Hey @Behdad 

 

I suspect you're getting this warning because somewhere else in your swagger/OpenAPI definition file there's a reference to your json object that "thinks" it is actually an array.

 

I haven't had this particular error response in ReadyAPI!, however I've had similar in SwaggerEditor and I had to find the reference before I could fix the issue

 

My suggestion is a bit of a chore depending on how large youre swagger/OpenAPI file is, but it's pretty much the only way to fix it as far as I'm aware.

 

Oh - I'd ensure you're swagger/OpenAPI version you've created in Swagger is supported by ReadyAPI!  I'm on my work laptop, not on my personal laptop (where my ReadyAPI! license is), so I'm going off memory here - but I remember the version of swagger and openAPI I could launch in my version (3.4.0) is swagger versions 1 and 2 and OpenAPI v3.01, I think.  I'd double check that, just to be sure.

 

Perhaps one of the other forum members has a better idea - but that's all I got I'm afraid!

 

ta

 

rich

if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
sonya_m
SmartBear Alumni (Retired)

Thank you richie! Great advice.

 

Hi @Behdad! Does this help?


Sonya Mihaljova
Community and Education Specialist

cancel
Showing results for 
Search instead for 
Did you mean: