Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I write all of my openapi specs by hand. It's not hard.




I imagine you are very much in the minority. A simple hello world is like a screen full of yaml. The equivalent in graphql (or typespec which I always wanted to try as an authoring format for openapi https://typespec.io/) would be a few lines

I see your point, yet writing openapi specs by hand is pretty common.

There is the part where dealing with another tool isn't much worth it most of the time, and the other side where we're already reading/writing screens of yaml or yaml like docs all the time.

Taking time to properly think about and define an entry point is reasonable enough.


Being verbose doesn't make it difficult.

Not necessarily, no. But at a certain point, I believe it does. Difficult to read, is difficult to edit, is difficult to work with.

A sibling comment to your reply expressed the same sentiment as me, and also mentioned typespec as a possible solution


The standard pattern in go and some scala libs, is to define the spec and generate the code.

I think you're over fitting your own experiences.


Do you validate responses from client-side and server-side(Fastapi does this and prevents invalid responses from being sent) from spec?



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: