Skip to content

Commit

Permalink
doc(next-trpc-openapi): Fix documentation (#36)
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 committed Apr 14, 2024
1 parent 868dbfe commit d302891
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions packages/next-trpc-openapi/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# next-trpc-openapi

## 0.1.2

### Patch Changes

- 3f777e9: Fix document

## 0.1.1

### Patch Changes
Expand Down
5 changes: 4 additions & 1 deletion packages/next-trpc-openapi/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,14 +87,17 @@ export {
`app/api/[...trpc]/route.ts`:

```ts
import { NextApiRequest, NextApiResponse } from "next";
import { createContext } from "@api/cloud-core-client";
import { cliPushRouter } from "index";
import { createOpenApiNextAppHandler } from "next-trpc-openapi";

const handler = createOpenApiNextAppHandler({
// Your trpc router
router: appRouter,
// Your trpc createContext
createContext,
responseMeta: undefined,
onError: undefined,
});

export default handler;
Expand Down
2 changes: 1 addition & 1 deletion packages/next-trpc-openapi/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next-trpc-openapi",
"version": "0.1.1",
"version": "0.1.2",
"description": "Expose your trpc endpoints as openapi API endpoints",
"scripts": {
"build:tsc": "tsc",
Expand Down

0 comments on commit d302891

Please sign in to comment.