James Messinger
James Messinger
Good idea! I had never thought of that use-case before, but it shouldn't be too hard to create a session-specific data store class. I'll add it to the to-do list....
Please see the [documentation for the Validate Request Middleware](https://github.com/BigstickCarpet/swagger-express-middleware/blob/master/docs/middleware/validateRequest.md#validate-request-middleware). The first code example on that page shows how to use [error handling middleware](http://expressjs.com/en/guide/error-handling.html) to handle errors however you want.
Here's an example app that renders a custom 404 error: https://runkit.com/bigstickcarpet/swagger-express-middleware-issue-60 Here's a successful response: https://swagger-express-middleware-issue-60-vaxoyoikjfqv.runkit.sh/John Here's the custom 404 response: https://swagger-express-middleware-issue-60-vaxoyoikjfqv.runkit.sh/Albert And here's the default Express.JS error page: https://swagger-express-middleware-issue-60-vaxoyoikjfqv.runkit.sh/fizz/buzz
@stv8 - Please look at the example app that I linked to above. The code does exactly that. It has a list of names, and it throws a custom 404...
Yeah, I've been trying to think of an elegant way to allow people to specify custom "ID" fields for their resources, specifically because of reasons like this. One idea is...
Of course, I'm open to other ideas/recommendations too. None of the above really seems very elegant to me, but I agree with you that there needs to be _some_ way...
Sorry for the delayed response. I've been away on holiday for a few weeks. This feature is definitely on the to-do list. It probably won't be in version 1.0, but...
There's a lot of work going on behind the scenes. Doing some big refactoring of the underlying projects that Swagger Express Middleware relies on. I have a day job too...
For security reasons, this GitHub Action does _not_ write your NPM auth token to the `~/.npmrc` file like some other GitHub Actions do. Instead, it writes an environment variable placeholder...
That seems like a do-able feature. Do you have time to submit a PR?