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

RobinTail / express-zod-api / 9083807790
100%

Build:
DEFAULT BRANCH: master
Ran 14 May 2024 05:42PM UTC
Jobs 6
Files 40
Run time 1min
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

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%)

115 of 115 new or added lines in 5 files covered. (100.0%)

1121 of 1121 relevant lines covered (100.0%)

468.25 hits per line

Jobs
ID Job ID Ran Files Coverage
1 run-18.18.0 - 9083807790.1 14 May 2024 05:43PM UTC 40
100.0
GitHub Action Run
2 run-22.x - 9083807790.2 14 May 2024 05:43PM UTC 40
100.0
GitHub Action Run
3 run-18.x - 9083807790.3 14 May 2024 05:43PM UTC 40
100.0
GitHub Action Run
4 run-22.0.0 - 9083807790.4 14 May 2024 05:43PM UTC 40
100.0
GitHub Action Run
5 run-20.x - 9083807790.5 14 May 2024 05:42PM UTC 40
100.0
GitHub Action Run
6 run-20.9.0 - 9083807790.6 14 May 2024 05:43PM UTC 40
100.0
GitHub Action Run
Source Files on build 9083807790
  • 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 Repo
  • Github Actions Build #9083807790
  • a99939b8 on github
  • Prev Build on master (#9070188593)
  • Next Build on master (#9103414140)
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