Forum Discussion

gh0stwr1ter's avatar
gh0stwr1ter
New Contributor
3 years ago

Error while importing openapi .json file

I am new to ReadyAPI, however, I am unable to get any of my openapi .json (3.0.0) files to import successfully.  I have attached a sample .json file I am trying to import as well as a screen shot of the error I am getting.  We are currently using ReadyAPI version 3.20.0.

 

Additionally, I have also tried using SoapUI version 5.7.0 and am getting the same result, just a different error with the same .json file attached.  I have included a screen shot of that error as well. 

 

Thanks!

  • joejoyce's avatar
    joejoyce
    3 years ago

    I'm not sure what the granular differences are between Postman's import mechanism and our import mechanism, but I can say that a completely valid and resolved API definition file ideally shouldn't have any references to inaccessible external components. You could consider them like external dependencies that the file doesn't have access to, which could potentially cause issues depending on the use case for the API definition. I think reaching out to the API provider would be a good step, as they could have a separate file where these components are stored, or potentially a fully-resolved version of the API definition file that contains the referenced components. Let me know how that goes! I hope this helps. 

  • Hey gh0stwr1ter. ReadyAPI is rejecting the definition file because it isn't a completely valid OpenAPI file, due to the missing components that are being referenced in the error message, e.g. "create_alert_policy_input" and "get_alert_policy_resp". I'm pretty sure that once you find  those components and add them to the file, the import will be successful. Could they be stored in some other location, locally or in the cloud? 

  • gh0stwr1ter's avatar
    gh0stwr1ter
    New Contributor

    Thanks for the quick reply.  This is odd because I can import the same file into Postman just fine without issue.  Does Postman do something different from ReadyAPI when it imports? These are the official definition files from IBM Cloud for their APIs so it is odd that they would be missing those for each one of them.  I can reach out to their support on that though if needed. 

    • joejoyce's avatar
      joejoyce
      Staff

      I'm not sure what the granular differences are between Postman's import mechanism and our import mechanism, but I can say that a completely valid and resolved API definition file ideally shouldn't have any references to inaccessible external components. You could consider them like external dependencies that the file doesn't have access to, which could potentially cause issues depending on the use case for the API definition. I think reaching out to the API provider would be a good step, as they could have a separate file where these components are stored, or potentially a fully-resolved version of the API definition file that contains the referenced components. Let me know how that goes! I hope this helps. 

      • gh0stwr1ter's avatar
        gh0stwr1ter
        New Contributor

        Thanks a ton for the guidance!  Ill reach out them to see what the deal is with the external dependencies as you suggested.