Service Virtualization

Expand all | Collapse all

Swagger based service does not give expected response

Jump to Best Answer
  • 1.  Swagger based service does not give expected response

    Posted 06-28-2017 11:13 AM

    Hello!

     

    In DevTest v10.0.0, the JSON responses displayed after creating a virtual service do not match my expected responses.

     

    I have created a sample Swagger specification that contains the following object definitions:

     

    Swagger object definitions

     

    The URI for this specification is as follows: 

     

    URI for Swagger specification

     

    As you can see, the API has a /contacts/ URI that allows a GET. The response of this GET method should be the ContactList definition from the first image. This is where my issue is. Below is an example of the JSON (this example is generated by the Swagger Editor) I expect from a response:

    JSON correct response

     

     

    Now here is the response to my virtual service in DevTest:

    DevTest Swagger JSON response

     

     

    Would anyone be able to point me in the direction of what my issue is? Is my Swagger spec incorrect?

     

    Thanks



  • 2.  Re: Swagger based service does not give expected response
    Best Answer

    Broadcom Employee
    Posted 06-29-2017 02:05 PM

    Looks like it is the same issue we have in support ticket 00782829.