<script src="/lib/swagger-client.js"></script>
<script type="text/javascript"> $(document).ready(function () {
// initialize swagger, point to a resource listing window.swagger = new client.SwaggerClient({ success: function () { // upon connect, fetch a pet and set contents to element "mydata" swagger.apis.pet.getPetById({ petId: 1 }, function (data) { document.getElementById("mydata").innerHTML = JSON.stringify(data.obj); }); } });
});</script><script src='browser/swagger-client.js' type='text/javascript'></script>
<script type="text/javascript">
// initialize swagger, point to a resource listing
window.swagger = new SwaggerClient({
url: "http://petstore.swagger.io/api/api-docs",
success: function() {
// upon connect, fetch a pet and set contents to element "mydata"
swagger.apis.pet.getPetById({petId:1}, function(data) {
document.getElementById("mydata").innerHTML = JSON.stringify(data.obj);
});
}
});
</script>
<body>
<div id="mydata"></div>
</body>--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.