Fullstack TypeScript toolkit that enhances Prisma ORM with flexible Authorization layer for RBAC/ABAC/PBAC/ReBAC, offering auto-generated type-safe APIs and frontend hooks.
Description and expected behavior
The plugin should generate the proper spec for meta response data key.
Currently, I'm using npx openapi-typescript prisma/schema.json -o prisma/schema.d.ts to auto generate typings from Open API spec which will be later used to create API client using openapi-fetch. The problem is that "meta" key in response data has a wrong spec to begin with, hence the generated type is also wrong.
The expected type is:
ResponseData = {
...,
meta?: {...}
}
and not
ResponseData = {
...,
meta?: {
meta?: {}
}
}
Screenshots
(schema.zmodel)
(_Meta section of schema.json)
(_Meta section of schema.d.ts)
(response from api call)
Environment (please complete the following information):
Description and expected behavior The plugin should generate the proper spec for
meta
response data key.Currently, I'm using
npx openapi-typescript prisma/schema.json -o prisma/schema.d.ts
to auto generate typings from Open API spec which will be later used to create API client usingopenapi-fetch
. The problem is that "meta" key in response data has a wrong spec to begin with, hence the generated type is also wrong.The expected type is:
and not
Screenshots (schema.zmodel)
(_Meta section of schema.json)
(_Meta section of schema.d.ts)
(response from api call)
Environment (please complete the following information):
Additional context None