Skip to content

Commit 1cafeb9

Browse files
committed
add next-openapi-json-generator
1 parent d1eaed7 commit 1cafeb9

File tree

9 files changed

+163
-258
lines changed

9 files changed

+163
-258
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# Next OpenAPI Interface Generator
22

3-
![GitHub](https://img.shields.io/github/license/omermecitoglu/next-openapi-interface-generator)
4-
![GitHub package.json version](https://img.shields.io/github/package-json/v/omermecitoglu/next-openapi-interface-generator)
3+
[![NPM](https://img.shields.io/npm/v/@omer-x/next-openapi-interface-generator?logo=npm)](https://www.npmjs.com/package/@omer-x/next-openapi-interface-generator)
4+
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
5+
56

67
This script automates the generation of documentation and TypeScript interfaces for a service, making it easier to maintain and interact with the service in a TypeScript environment.
78

@@ -14,19 +15,20 @@ npm install @omer-x/next-openapi-interface-generator
1415
## Usage
1516

1617
```bash
17-
generate-service-interface --source <source_directory> --output <output_directory>
18+
generate-service-interface --output <output_directory> --framework <framework_name> --schemas <schemas_directory>
1819
```
1920

2021
### Options
2122

22-
- `--source`, `-s`: Specify the source directory. Default: `src`
2323
- `--output`, `-o`: Specify the output directory. Default: `dist`
24-
- `--framework`, `-f`: Specify the target framework. Options: `next` (Optional)
24+
- `--framework`, `-f`: (Optional) Specify the target framework. Options: `next`
25+
- `--schemas`, `-s`: (Optional) Specify the path for predefined zod schemas. Multiple paths can be provided, separated by commas.
2526

2627
## Example
2728

2829
```bash
29-
generate-service-interface --source src/app --output dist
30+
generate-service-interface -o dist -f next -s src/models
31+
generate-service-interface -o dist -f next -s src/models/user,src/models/message
3032
```
3133

3234
## Contributing

0 commit comments

Comments
 (0)