divmain/drydock

Route name should allow 0-9

Closed this issue · 1 comments

baer commented

Right now name only accepts [A-Za-z\-] but I'm trying to use it with a customer ID which has 0-9. Happy to PR this if you're interested.

https://github.com/TestArmada/drydock/blob/0b5923816a4951a7db6de1a3f6bf383819449cfe/lib/schemas.js#L25

drydock.jsonRoute({
  name: "ABC0001",
  method: "GET",
  path: "/customers/ABC0001",
  handlers: {
    "success": {
      description: "Return customer ABC0001",
      handler: function () {
        return require("./data/customers-ABC0001.json");
      }
    }
  }
});

PR welcome for this also. Thanks!