Hi all,
I'm trying to use swagger-js and create a client in my node.js application.
but in Swagger-js README they only state that creating a new client is with :
var client = new Swagger({
  url: 'http://petstore.swagger.io/v2/swagger.json',
  success: function() {
    client.pet.getPetById({petId:7},{responseContentType: 
'application/json'},function(pet){
      console.log('pet', pet);
    });
  }
});

I'm trying to use a local definition file like './swagger.json' in the url (but 
of course it's not possible)

I was wondering if it's possible to do so? or what is the best practise to do 
this with local definition file?


I'll explain my app:
I'm building an API which servers clients (mobile/web)
and also my API consumes outside API's that are not available online but within 
the company (on premise)

the outside API's provide me the 'swagger.json' definition for each end point 
and I want to mock it as a client object on my node app and work with the 
object itself.


is it possible?

Thanks in advance.

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to