• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

RobinTail / express-zod-api / 9083807790 / 1
100%
master: 100%

Build:
DEFAULT BRANCH: master
Ran 14 May 2024 05:44PM UTC
Files 40
Run time 1s
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

14 May 2024 05:41PM UTC coverage: 100.0%. Remained the same
9083807790.1

push

github

web-flow
Feat: support custom brands handling in Documentation and Integration (#1750)

Based on #1470  and thanks to #1730 

This will be a feature in v19.
I'd like to keep changes of 19.0.0 smaller, making it easier to migrate.
Thus, I'm going to separate breaking changes from features and release
this as 19.1.0.

This will be the interface:

```ts
import { z } from "zod";
import { Documentation, Integration } from "express-zod-api";

const myBrand = Symbol("MamaToldMeImSpecial"); // I highly recommend using symbols for this purpose
const myBrandedSchema = z.string().brand(myBrand);

new Documentation({
  /* config, routing, title, version */
  brandHandling: {
    [myBrand]: (
      schema: typeof myBrandedSchema, // you should assign type yourself
      { next, path, method, isResponse }, // handle a nested schema using next()
    ) => {
      const defaultResult = next(schema.unwrap()); // { type: string }
      return { summary: "Special type of data" };
    },
  },
});

import ts from "typescript";
const { factory: f } = ts;

new Integration({
  /* routing */
  brandHandling: {
    [myBrand]: (
      schema: typeof myBrandedSchema, // you should assign type yourself
      { next, isResponse, serializer }, // handle a nested schema using next()
    ) => f.createKeywordTypeNode(ts.SyntaxKind.BooleanKeyword),
  },
});
```

692 of 726 branches covered (95.32%)

1121 of 1121 relevant lines covered (100.0%)

78.04 hits per line

Source Files on job run-18.18.0 - 9083807790.1
  • Tree
  • List 40
  • Changed 20
  • Source Changed 7
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Build 9083807790
  • a99939b8 on github
  • Prev Job for on master (#9070188593.2)
  • Next Job for on master (#9103414140.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc