Skip to content

Commit b37bd22

Browse files
committed
docs: add configuration section for open API schema in README
1 parent 339eebb commit b37bd22

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,5 +486,26 @@ const createItem = createEndpoint("/item/:id", {
486486
})
487487
```
488488

489+
#### Configuration
490+
491+
You can configure the open api schema by passing the `openAPI` option to the router.
492+
493+
```ts
494+
const router = createRouter({
495+
createItem
496+
}, {
497+
openAPI: {
498+
disabled: false, //default false
499+
path: "/api/reference", //default /api/reference
500+
scalar: {
501+
title: "My API",
502+
version: "1.0.0",
503+
description: "My API Description",
504+
theme: "dark" //default saturn
505+
}
506+
}
507+
})
508+
```
509+
489510
## License
490511
MIT

0 commit comments

Comments
 (0)