Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
omermecitoglu committed Sep 5, 2024
1 parent 09b5dd8 commit af39cc7
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,18 @@ export default Page;

The `generateOpenApiSpec` function takes an object with the following properties:

| Property | Type | Description |
| ------------------------ | ------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| models | Record<string, [ZodType](https://zod.dev)> | An object where keys are model names and values are Zod schemas |
| options | Object | `(Optional)` An object to customize the functionality of the route definer |
| options.include | string[] | `(Optional)` An array of strings which specifies the routes will be included to the JSON output |
| options.exclude | string[] | `(Optional)` An array of strings which specifies the routes will be excluded from the JSON output |
| options.routeDefinerName | string | `(Optional)` Name of the function that was exported from the [`Next OpenAPI Route Handler`](https://www.npmjs.com/package/@omer-x/next-openapi-route-handler) (Default: `defineRoute`) |
| Property | Type | Description |
| -------- | ------------------------------------------ | ---------------------------------------------------------------------------------- |
| models | Record<string, [ZodType](https://zod.dev)> | An object where keys are model names and values are Zod schemas |
| options | Object | `(Optional)` An object to customize the functionality of the generator (see below) |

#### Options

| Property | Type | Description |
| ---------------- | -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| include | string[] | `(Optional)` An array of strings which specifies the routes will be included to the JSON output |
| exclude | string[] | `(Optional)` An array of strings which specifies the routes will be excluded from the JSON output |
| routeDefinerName | string | `(Optional)` Name of the function that was exported from the [`Next OpenAPI Route Handler`](https://www.npmjs.com/package/@omer-x/next-openapi-route-handler) (Default: `defineRoute`) |

### Result

Expand Down

0 comments on commit af39cc7

Please sign in to comment.