OpenAPI specification #1780
Replies: 5 comments 4 replies
-
@Teyras this all sounds great, totally see the value here. Would you be willing to take this on? I'm going to add this to our roadmap as priority 3. We can help as needed here if you want to blaze the way forward. The first and third bullets seem very similar to me. And custom endpoints would have to be spec'd out by hand, so we'd likely need to expose some way of injecting this into the Payload config alongside the other specs. |
Beta Was this translation helpful? Give feedback.
-
Maybe if you use zod as wrapper and then zod openapi plugin we can get something nice |
Beta Was this translation helpful? Give feedback.
-
Related: #1921 |
Beta Was this translation helpful? Give feedback.
-
I've build a working plugin that does this: payload-swagger. |
Beta Was this translation helpful? Give feedback.
-
Here's my plugin, I'm happy for any feedback. https://github.com/Teyras/payload-oapi |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
It would be nice if Payload could generate an OpenAPI specification for its REST API. This could in turn be used to generate client skeletons for the likes of mobile apps and SPAs, or as documentation for external consumers of the API.
It is already possible to generate JSON schema for the collections (those are used by the type generator script). The missing parts are (to my best understanding):
The second and third part seem the most difficult to me. However, even having documentation for data fetching on collections and globals would be tremendously helpful for me.
I also think I could be able to help coding the first part if that's desirable.
Beta Was this translation helpful? Give feedback.
All reactions