You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using zenstack with nextjs 15. I created a zmodel file and added the plugin to generate documentation for API.
plugin openapi { provider = '@zenstackhq/openapi' output = './openapi.yaml' title = 'My awesome API' version = '0.5.0' summary = 'Created with ZenStack' description = 'My awesome API created with ZenStack' prefix = '/api' }
Then I generated the file, it is about 1.4mb. I tried rendering that file to UI it is taking too much of RAM and crashes the site. Then I uploaded that file to online openapi viewer, it crashed that site too.
I am unaware of how to fix / use it. please help.
There are about 15 (mode) tables in my schema.
The text was updated successfully, but these errors were encountered:
Hi @atulraj85 , by default the openapi plugin emits a schema for each type PrismaClient generates. you can use the "omitInputDetails" to reduce the fidelity of the output and get a smaller result:
Thank you for replying @ymc9 . The thing is I am using RESTful API and in options it has mentioned, "Only valid for "rpc" flavor." So this is issue I'm facing.
Oh, got it, then the "omitInputDetails" option is irrelevant. Swagger UI is known to be inefficient when loading large docs, and I'm not aware of a way to work around.
Do you need all models in the generated doc? If not, you can use the "@@openapi.ignore" attribute to exclude those you don't need. Alternatively, you can also write a post-generation script to process the output file and prune non-essential information (either with JSON directly or with an OAPI parser).
I am using zenstack with nextjs 15. I created a zmodel file and added the plugin to generate documentation for API.
plugin openapi { provider = '@zenstackhq/openapi' output = './openapi.yaml' title = 'My awesome API' version = '0.5.0' summary = 'Created with ZenStack' description = 'My awesome API created with ZenStack' prefix = '/api' }
Then I generated the file, it is about 1.4mb. I tried rendering that file to UI it is taking too much of RAM and crashes the site. Then I uploaded that file to online openapi viewer, it crashed that site too.
I am unaware of how to fix / use it. please help.
There are about 15 (mode) tables in my schema.
The text was updated successfully, but these errors were encountered: