OpenAPI Code Generation

Commenters recommend and compare OpenAPI (Swagger) specifications and tools like swagger-codegen, openapi-generator, and Fern for API documentation, client/server code generation, and as alternatives to the discussed tool.

📉 Falling 0.5x Web Development
3,108
Comments
17
Years Active
5
Top Authors
#9879
Topic ID

Activity Over Time

2009
2
2011
4
2012
31
2013
62
2014
79
2015
131
2016
165
2017
237
2018
114
2019
168
2020
253
2021
270
2022
340
2023
478
2024
389
2025
371
2026
14

Keywords

CLI openapis.org IDE EDIT UI AI XML DSL dredd.org SOAP api schema spec xml generate code code generation generation client documentation

Sample Comments

lyjackal • Apr 16, 2023 • View on HN

I see this is an alternative to open api, but reading through the site docs, I’m not clear on what it’s adding. There’s a number is code gen tools already for open api.

ezekg • Sep 12, 2022 • View on HN

Seems to only work for APIs with an OpenAPI spec. Anybody know of a service that can generate an OpenAPI spec for an API that doesn't have one? And keep it up to date. :)

Dystopian • Jun 23, 2021 • View on HN

Yep they also publish an OpenAPI spec (what tools like Swagger use for auto-docs) - you should be able to use something like: https://www.npmjs.com/package/openapi-typescript-codegen to create your codegen

ushakov • Aug 12, 2023 • View on HN

For cross-language, I can recommend Fern, which works with OpenAPIhttp://buildwithfern.com

mooreds • May 29, 2023 • View on HN

Why not something standard like OpenAPI?

simonpantzare • Feb 19, 2018 • View on HN

Not sure if it helps, but have a look at Swagger/OpenAPI if you haven't already.

treis • Mar 16, 2021 • View on HN

Don't you get the same benefit by writing a Swagger spec?

BerislavLopac • Jan 22, 2022 • View on HN

OpenAPI generation is cool, but using the OpenAPI as the specification of even better. ;)

10000truths • Aug 14, 2024 • View on HN

What does this offer that openapi-generator and swagger-codegen don't already do?

israrkhan • Mar 10, 2024 • View on HN

I think you may want to look at OpenAPI specs. It is yaml description of API and can be consumed by many tools.