Ask HN: Which API IDLs would you use?

3 points by Existenceblinks ↗ HN
The state of competing standard problem seems to be here to stay so I have to pick one.

CADL from Microsoft: https://microsoft.github.io/cadl/language-basics/overview

Smithy from Amazon: https://smithy.io/2.0/index.html

JSON Schema IDL vocab (not a thing yet, and doesn't sound promising at all): https://github.com/json-schema-org/vocab-idl

And I know there are many IDL, but I only pick the ones based on their API related work.

OpenAPI's JSON Schema is definitely not designed for data modeling that's why the generator is a mess.

---

I'm personally inclined to Smithy which seems to be the most battle-tested with real and large use case. And there's a better chance to convince my boss "it's from AWS", and generating OpenAPI file from it is also aligned with "standard" vibe.

6 comments

[ 3.2 ms ] story [ 26.7 ms ] thread
CUE | https://cuelang.org https://cuetorials.com

It will be the standard language for schemas and configuration in time

That's the pain. This, Microsoft, AWS etc they should have something like https://bytecodealliance.org/ I found that their language semantics are pretty similar, probably deserve at least the same AST.
CUE has quite different semantics and is building the interoperability with other formats.
My point is the teams at Microsoft and AWS do not use CUE or any "one thing", that's the problem! If CUE doesn't solve their problem then it doesn't.
Have they or you heard of or tried CUE?

You're asking for standardization where there will never be any, where it is likely impossible

This is why I built https://github.com/hofstadter-io/hof, so that you can get some standardization and sharing for IDL & code gen, but also provide flexibility because the spectrum is too large and cannot afford a one-size fits all. Hof builds on CUE because CUE is the best language for writing declarative formats.

I've heard, investigated, but it's never passed my filter to a try state. I investigated a bunch of things in config space before and get bored because they are in dev bubbles. I was trying to find something viable for commercial purpose.

My topic is only API and list just 2 things specialized in API work. It's pretty narrow scope. And the other reason I list just the two is that I know the web industry is quite irrational they only pick what big players back it or just for sake of jobs market reason.

So honestly I'm not interested in CUE.