sveltekit-api icon indicating copy to clipboard operation
sveltekit-api copied to clipboard

Summary & Description for each path in OpenAPI

Open Romain-rd opened this issue 1 year ago • 1 comments
trafficstars

Hello,

Bravo for your idea and your implementation. I will adopt sveltekit-api.

I have a suggestion: Be able to enter a summary and a description in each path. This will allow for more explanation in Swagger or PostMan.

I made an implementation, but I'm not up to the standard with TypeScript to publish it. Sorry for the quality of the code, it's just to give an idea of possible implementation. If someone better at TypeScrip than me could finish the job, that would be great.

Good day. Archive.zip

Romain-rd avatar Mar 12 '24 10:03 Romain-rd

I think your suggestion is clearer than the current solution. Currently, users can only use a modifier to add a summary and description, but I don't have time to implement it at the moment.

One idea to share: I am not sure whether using export const ..., chaining with Endpoint({ ... }).describe(...), or directly adding it in Endpoint({ ..., Description: ... }) is better. The caveat of the first solution is that IntelliSense cannot provide good help, or some dynamic type definition generation is needed.

PRs are welcomed. Don't worry about TypeScript; maybe I can help before publishing a new version.

JacobLinCool avatar Mar 19 '24 08:03 JacobLinCool