Forum Discussion

kalmangt's avatar
kalmangt
Occasional Contributor
2 years ago

ReadyAPI Error: Could not import a definition from the specified file.

Hello I am trying to evaluate to see if we can use ReadyAPI for testing.  I am creating a new project and attempting to import out API definition, I have the protocol set to "Determine Automatically"...
  • richie's avatar
    richie
    2 years ago

    Hey kalmangt 

     

    Ok - so you're using OAS v3.0.1 - ReadyAPI consumes this version no problem

     

    You've got some mistakes in the content of your file making it invalid - you need to fix the file before ReadyAPI will process the file successfully.

     

    Easiest way to see the mistakes in the file - go here -->  https://editor.swagger.io/ then select File, Import File to open the .json file in the editor.  Top of the right hand frame shows you some principal issues that make the file invalid.

     

    As you fix them others are likely to pop up  (it doesnt report EVERY single error) - but essentially you need to fix these errors so the file is valid relative to the open API Specification, before the file will work in ReadyAPI.

     

    I can see what the problem with a couple of the issues already, and I could attempt to fix - but some of the issues I'd need to know your system to determine how to fix.

     

    To resolve:  Send the open API Spec back to the developers, show them all the failures reported in Swagger Editor and tell them you need the file to be schema valid relative to OAS rules before you can use it.

     

    Cheers,

     

    Rich