Forum Discussion

LunaLJG's avatar
LunaLJG
Occasional Contributor
4 years ago
Solved

SOAPUI PRO: Using Add API throws "unable to read location" error

I am attempting to add an api through a json file into readyapi 3.2.5 so I can use it for test cases in soapui pro.  But I keep getting this error below in the logs and the api doesn't get added.  I'...
  • LunaLJG's avatar
    LunaLJG
    4 years ago

    For reference, I sent the file to support and they could recreate the error.  The problem is that the specification needs to be fixed before I can import it.   Seems that the .net framework version we're using has an older swagger version than the .net core version.

     

    Another point worth noting is that I could get more details on the errors if I changed the securityDefinition in the json file from this:

     

    "securityDefinitions":{
    "Token":{
    "type":"apiKey",
    "description":"Token Authentication",
    "name":"Token",
    "in":"Authentication"
    } }

     

    TO:

    "securityDefinitions":{
    "Token":{
    "type":"apiKey",
    "description":"Token Authentication",
    "name":"Token",
    "in":"header"
    }}

     

    So I would at least see a popup in soapUI with errors like the following instead of just the file location error:

     

    attribute paths.'/Health/Status'(get).responses.200.schema is unexpected

    attribute paths.'/Health/Status'(get).consumes is unexpected

    attribute paths.'/Health/Status'(get).produces is unexpected attribute