Skip to content

v1.3.2

Compare
Choose a tag to compare
@predetermined predetermined released this 12 Oct 18:06
· 22 commits to main since this release
57eb316

Requires at least Deno version 1.13

Updates

  • Support async schema validation functions
app.get("/", (_req) => "Hello, World!", {
  schema: {
    query: [
      async (query) => {
        return await isValidKey(query.key);
      },
    ],
  },
});
  • Use more explicit context type for schema validation functions
schema: {
  body: [
    (body) => { // Record<string, Json>
      return !!body.test;
    },
  ],
  query: [
    (query) => { // Record<string, string>
      return !!query.test;
    },
  ],
},