Service Virtualization

 View Only
  • 1.  Swagger import error

    Posted Jun 30, 2020 03:50 PM
      |   view attached
    Hi
    I get the below error while trying to import  Swagger 2.0 file, to create aservice image.



  • 2.  RE: Swagger import error

    Broadcom Employee
    Posted Jun 30, 2020 04:34 PM
    Hi Vamsi,

    Did you validate the Swagger doc using any online editors to make sure it has any errors?

    Are you creating VS in DevTest Portal or in Workstation? Can you share the Swagger file? 

    Prema



  • 3.  RE: Swagger import error

    Posted Jul 03, 2020 08:30 AM
    From the workstation,
    There was swagger issue


  • 4.  RE: Swagger import error

    Broadcom Employee
    Posted Jul 01, 2020 01:09 AM
    What version of SV are you seeing this in?


    ------------------------------
    Head of Service Virtualization Product Management
    CA Technologies - A Broadcom Company
    ------------------------------



  • 5.  RE: Swagger import error

    Posted Jul 03, 2020 08:31 AM
    10.4 
    There was swagger issue,

    Thank you


  • 6.  RE: Swagger import error
    Best Answer

    Posted Jul 01, 2020 12:19 PM
    Hi Vamsi,

    Are you able to get  the list of operations from the swagger in workstation? If not, then some issue with the .json file.

    Refer to below screenshot

    Thanks



    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------



  • 7.  RE: Swagger import error

    Posted Jul 03, 2020 08:29 AM
    Thank you Vaibhav.
    There was an issue with the swagger file.
    I have imported it and virtualized the service. But now i get a new error. The file has only post method in it.
    When I test the service using postman, it gives the two different responses. 
    My scenario is
    I'm using the url in the format http://localhost:8000/rest/example.
    When I hit the service using postman with post method, irrespective of the input given, for the first hit it gives 404 not found response and the next hit, it gives the 200 ok response which is
    My expected output is : I should get my response as 200 only when I pass the raw recorded request in the body in postman. Else, it should give 404.
    Note: I have checked don't use matching script in the transactions tab


  • 8.  RE: Swagger import error

    Broadcom Employee
    Posted Jul 03, 2020 08:49 AM
    HI Vamsi
            Can you please share the swagger spec file.

    --
    regards
    Sankar Natarajan





  • 9.  RE: Swagger import error

    Posted Jul 03, 2020 09:02 AM
    Hi Vamsi,

    Replied to the other thread, please try the those options.

    Thanks

    ------------------------------
    Regards,
    Vaibhav Jain
    Capgemini
    ------------------------------