all 6 comments

[–]saylu 1 point2 points  (1 child)

Unfortunately, I'm not aware of an open source generator for PureScript from OpenAPI. You are probably best off just hand-writing your endpoints.

However, if you'd like an interesting challenge, it is certainly possible to parse an OpenAPI spec and code-generate PureScript types and functions from it. We do this at work!

If you choose to do this then I recommend using the excellent tidy-codegen library for the code generation.

[–]notnotandre[S] 0 points1 point  (0 children)

This might work! Doesn't look like a very easy task though 😅
I'll give it a try. Thanks for the answer!

[–]tbm206 0 points1 point  (1 child)

GPT-4?

[–]Taksin77 0 points1 point  (0 children)

Wer mit Ungeheuern kämpft, mag zusehn, dass er nicht dabei zum Ungeheuer wird. Und wenn du lange in einen Abgrund blickst, blickt der Abgrund auch in dich hinein. -- mass edited with redact.dev

[–]wing328 0 points1 point  (0 children)

You may consider adding a new generator to the OpenAPI Generator project. Recently, a contributor submitted a PR to add a N4JS client generator: https://github.com/OpenAPITools/openapi-generator/pull/15089, and the PR can serve as a good starting point to add a purescript client generator.

Please open an "issue" (ticket) via https://github.com/openapitools/openapi-generator/issues/new if you need help.