Nice, I'll find this useful. I reference OpenAPI specs frequently as I practice spec-driven development. The spec is my source of truth for the interface, and I use it to generate both my client and server code. It automates all the request handling boilerplate on both sides, including validation, and provides me a typed interface regardless of which language I'm using. OpenAPI of course limits the types of endpoints you can create, but I find those limits stop you doing things that are strange/surprising. I find that creating APIs that can be expressed nicely in OpenAPI leads to APIs that have a consistent feel with few gotchas and a satisfyingly predictable developer experience.
Yeah, the name is very short to be unique. I don't want to rename yet, as I am ok if there are other projects with the same name as long as there is no legal trademark or something. But yeah, don't install it from the Homebrew, btw I added binaries to releases page so we can just wget it.
Two things: folks care about Brew because its update story is nice; otherwise one needs to constantly revisit your /releases (or plug /releases.atom into their RSS reader) in order to know. It also offers very light "I got what I expected" behavior via their use of sha256, which your current setup won't participate in since you're only publishing .md5 anyway
That leads to the second thing which is that you said you "added binaries" but your release artifacts are .tar.gz which means that one now needs to `curl -fSL | tar -xzf - -C /whatever` and deal with whatever interior directory scheme you are using (I didn't check)
I suspect I may be throwing good commentary after bad, but if you did want to participate in Brew distribution, but don't want to go through their stupid PR process, you can retain control over your update schedule by creating a "Brew Tap" and then the consumer would (e.g.) `brew tap plutov/brew && brew install plutov/brew/oq` which also gets away from the naming collision
I also love Homebrew and use it daily, at the same time I don't want to go through the review process, but tap sounds good, will try it out, maybe goreleaser supports that too?
Honestly whilst the docs make the review process sound complicated, I went through it a few months ago and it ended up being super simple. Just follow the instructions to create the new formulae PR (and look at other recent ones) and then you’re all done. Updates are handled by a bot they run automatically when you make a new GitHub release, so you don’t even need to interact with the homebrew repo after setup.
You do have a naming conflict though unfortunately so I’m not sure how you would deal with that.
Hi Jamie, I've been a big fan of oapi-codegen and your work! I haven't fully tested the 3.1 support yet, but the tool doesn't do much, just list of routes and components, which I believe are similar between 3.0 and 3.1 OAS
Check out https://aep.dev, they have a CLI tool for doing that, _if_ you write your OpenAPI to follow their spec. We are adopting it, both because of the nice standard it provides and also for the guaranteed tooling (TF, MCP, CLI).
Nice, I'll find this useful. I reference OpenAPI specs frequently as I practice spec-driven development. The spec is my source of truth for the interface, and I use it to generate both my client and server code. It automates all the request handling boilerplate on both sides, including validation, and provides me a typed interface regardless of which language I'm using. OpenAPI of course limits the types of endpoints you can create, but I find those limits stop you doing things that are strange/surprising. I find that creating APIs that can be expressed nicely in OpenAPI leads to APIs that have a consistent feel with few gotchas and a satisfyingly predictable developer experience.
What’s in your toolkit for server and client generation?
My servers are Java, my clients are Python. I use the Spring & Python generators in https://github.com/swagger-api/swagger-codegen
100%, also openapi specs are usually huge yaml/json files and it's very hard to navigate them.
Nice! Just a quick heads up that there's already an 'oq' project
https://blacksmoke16.github.io/oq/ | https://github.com/Blacksmoke16/oq
(as I discovered when I installed oq via homebrew to find myself with a different app)
Yeah, the name is very short to be unique. I don't want to rename yet, as I am ok if there are other projects with the same name as long as there is no legal trademark or something. But yeah, don't install it from the Homebrew, btw I added binaries to releases page so we can just wget it.
Two things: folks care about Brew because its update story is nice; otherwise one needs to constantly revisit your /releases (or plug /releases.atom into their RSS reader) in order to know. It also offers very light "I got what I expected" behavior via their use of sha256, which your current setup won't participate in since you're only publishing .md5 anyway
That leads to the second thing which is that you said you "added binaries" but your release artifacts are .tar.gz which means that one now needs to `curl -fSL | tar -xzf - -C /whatever` and deal with whatever interior directory scheme you are using (I didn't check)
I suspect I may be throwing good commentary after bad, but if you did want to participate in Brew distribution, but don't want to go through their stupid PR process, you can retain control over your update schedule by creating a "Brew Tap" and then the consumer would (e.g.) `brew tap plutov/brew && brew install plutov/brew/oq` which also gets away from the naming collision
I also love Homebrew and use it daily, at the same time I don't want to go through the review process, but tap sounds good, will try it out, maybe goreleaser supports that too?
Honestly whilst the docs make the review process sound complicated, I went through it a few months ago and it ended up being super simple. Just follow the instructions to create the new formulae PR (and look at other recent ones) and then you’re all done. Updates are handled by a bot they run automatically when you make a new GitHub release, so you don’t even need to interact with the homebrew repo after setup.
You do have a naming conflict though unfortunately so I’m not sure how you would deal with that.
Looks great. Is it a terminal-based viewer for API specs (like Swagger UI) or a tool for defining APIs that OpenAI can call?
Ooh interesting!
I see it notes OpenAPI 3.1 support, but it's using kin-openapi which doesn't yet support OpenAPI - how have you managed that?
(speaking as someone building on top of kin-openapi, as a core maintainer for oapi-codegen)
Hi Jamie, I've been a big fan of oapi-codegen and your work! I haven't fully tested the 3.1 support yet, but the tool doesn't do much, just list of routes and components, which I believe are similar between 3.0 and 3.1 OAS
Really cool! would be cool to be able to do the actual call too :)
Check out https://aep.dev, they have a CLI tool for doing that, _if_ you write your OpenAPI to follow their spec. We are adopting it, both because of the nice standard it provides and also for the guaranteed tooling (TF, MCP, CLI).
I believe it will come to that too.
Love this.