Elm-open-api v4.1

I’ve been busy the past few weeks with new releases of my elm-open-api SDK gen tool. There have been a lot of bug fixes and lot of new features, like

  • custom error handling
  • much improved success message after generation
  • generates risky variants of http requests
  • support for converting Swagger docs to Open API specs

and more!

13 Likes

Hey Wolfgang! Just want to say thank you for writing this tool.

I use it to write a fake OpenAPI spec for Socket.IO events and then use the decoder & encoders it generates for my manually written socket adapters in Elm code. Super smooth experience thanks to your package!

5 Likes

@timinou are you using it for the JSON Schema encoders/decoders or are you using other parts of the OpenAPI spec as well?

Nope, only the Json schema part. Basically I use msgspec to specify the structure of my Jsons on the backend, and then I have a (really, really dirty) script that parses through all the namespaces on the ASGI app, fetches their input and output types, and outputs the Json schemas as list.

The resulting file does not have any http endpoints actually, just the schema components.

It works well enough for my needs (a couple limitations on enum types and lists containing several types, I’ll get to filing issues at some point)

My project has a lot of Json record types (maybe 30 types and it’s still in alpha…), so being able to have one source of truth for their shape is a great DX experience :pray:t3:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.