AnsweredAssumed Answered

swagger, json, data schema

Question asked by sdetweil2 on Jun 17, 2015
Latest reply on Jul 30, 2015 by JayantChatterjee62134974

I'm creating a service with swagger import on 8.1. almost all good.


the swagger file points to the json document schema, and the generated vsi response shows the url of the schema


how do I surface the schema in the service?


I can do JSON protocol filter, which converts it to xml and puts 'parms' on the virtual request, but I have to type the schema in manually.

I can see the 'parms' in the VSE console, transaction inspection view, but cannot access them in the vsi without manually adding them as transaction arguments.

it almost seems like a step was missed..


I don't see any other mechanism, and the Using Data protocols doc doesn't get into this level of detail.


I see I can use an assertion to verify the data matches a schema, but... the schema is in the swagger yaml file, not in a raw json document.

and using the content or a property as the truth of the schema is like having the fox watch the  chicken coop!..


again, I am not recording, as none of my service exist yet. so this may be an edge use case.