Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/niraj-khatiwada/openapi-codegen

Using automatically generated API schema and query from OpenAPI json that generates React Query code in Next.js
https://github.com/niraj-khatiwada/openapi-codegen

Last synced: about 1 month ago
JSON representation

Using automatically generated API schema and query from OpenAPI json that generates React Query code in Next.js

Awesome Lists containing this project

README

        

# Autogenerated API's from OpenAPI schema

See [this](https://github.com/niraj-khatiwada/nestjs-starter-template) repo for backend setup.

### Steps

1. Point your OpenAPI schema.json file in `.env`

```
NEXT_PUBLIC_API_URL=http://localhost:8000/swagger/json
```

2. Generate the queries and schema

```
pnpm codegen
```

3. Start your server

```
pnpm dev
```