James Messinger
James Messinger
That's a great idea! Currently, Swagger Server abstracts the middleware away, so there's no way for you to directly access it. But I like the idea of providing a way...
See [Issue #19](https://github.com/BigstickCarpet/swagger-server/issues/19). The short answer is, yes, it's possible. The longer answer is that it's not quite as straightforward or easy as it should be, so I plan to...
I'm not sure what you mean. Mock data isn't for a particular kind of request (get, post, put, etc.). It's just data. A GET request retrieves that data. A POST...
If you want to return a different response than the default behavior, then you can add your own middleware to do so. ``` javascript server.post('/pets/{petName}', function(req, res, next) { res.json({status:...
@feikiss - Glad to hear that it's working for you now. And yes, Swagger Server has built-in support for `default` and `example` responses. If you define a `default` or `example`...
There are two ways that you can do this. The first, is to add the default to your schema: ``` json "definitions" : { "ActionVO" : { "type" : "object",...
You mean like an endpoint that you'd go to that would return a list of all the routes as plain-text?
Ah, I see what you mean. You want to be able to dynamically add your own middleware based on the endpoints that are in the Swagger definition. Swagger Server doesn't...
Yeah, this is a big item on the "to-do" list for Swagger Express Middleware. I just don't have the time to implement it right now. Busy as hell at work...
@dareid - Thanks for opening this issue! Just curious - How did you find out about my talk? For others who are viewing this issue, here are the relevant parts...