HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
swagger-api
swagger-codegen
Mustache2012–2025
swagger-api / swagger-codegen

swagger-codegen

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.

24Distinct people
55Mentions
1Explicit recommenders
17.8KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

> Should they do the same thing as you did? They can, I recommend they look at the swagger-codegen[0] api stub templates. There clients as well. [0]:…

oneweekwonder used a recommendation phrase. One indexed comment matches. This is a phrase match, not a verdict.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 11:56:56 AM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year55 dated mentions

Observed mentions: 2012-08-28 17:24:27 UTC to 2025-09-13 06:12:23 UTC.

051015202012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments20122013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 19 mentions; 4 submissions, 15 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 16 mentions; 5 submissions, 11 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 8 mentions; 0 submissions, 8 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC110
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC101
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC303
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC211
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC19415
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC16511
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC808
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC211
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC101
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC101
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC000
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC000
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC000
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101

What Hacker News says

55 sources
Does apimatic use the following open-source code generators or it builds a proprietary code generator from scratch? Swagger Codegen: https://github.com/swagger-api/swagger-codegen OpenAPI Generator: https://github.com/OpenAPITools/openapi-generator AutoRest: https://github.com/Azure/AutoRest NSwag: https://github.com/RicoSuter/NSwag oapi-codegen: https://github.com/deepmap/oapi-codegen go-swagger: https://github.com/go-swagger/go-swagger
In Adopting the OpenAPI schema to generate Plaid’s SDKs

Ask HN: Is anyone using REST API code generator in production?

I'm aware of some comparisons conducted a while ago on some API code generators listed below but these comparisons seem to be outdated: - apimatic.io: https://apimatic.io - AutoRest: https://github.com/Azure/AutoRest - Swagger Codegen: https://github.com/swagger-api/swagger-codegen - OpenAPI-CodeGen: https://github.com/Mermade/openapi-codegen - OpenAPI Generator: https://github.com/OpenAPITools/openapi-generator - go-swagger: https://github.com/go-swagger/go-swagger Is anyone using these tools in their environment? Any caveat?
20 points · Open discussion
For early stage and hackathon-style API mocking, JSON Server is pretty cool. You implement a JSON file of objects that gets inferred as endpoints and served up as an API. https://github.com/typicode/json-server For a fancier solution, Swagger / OpenAPI spec is useful. It has a feature called API Auto Mocking which you can serve with SwaggerHub. [The free tier includes this feature by the way.] https://app.swaggerhub.com/help/integrations/api-auto-mockin... https://swagger.io/tools/swaggerhub/ You can also use Swagger Codegen to generate server stubs and API clients as code in various languages once you're ready to break out of the mock API. https://github.com/swagger-api/swagger-codegen That's the route I'd go personally as this tooling is available for free, is fairly mature, and has a strong community behind it at this point. There a
Read the rest
re a few other similar alternatives that I know less about such as WireMock (http://wiremock.org/) and Stoplight (https://stoplight.io/). Postman also has a mock server feature if you happen to already use that.
In Mock API?
I have made negative experience with using a custom swagger-codegen [0] template - the library is quite diffuse with no clear direction in which PRs are merged and which aren't, making it a mess to read and extend. I have however, managed to generate the exact Typescript bindings I wanted using it. In contrast, I have been using NSwag [1] to generate C# client code with far greater comfort, and it seems to support multiple Typescript clients already. [0] https://github.com/swagger-api/swagger-codegen [1] https://github.com/RSuter/NSwag
In gRPC-Web is going GA
In my particular case, I want to use aiohttp on Python, which swagger codegen supports client generation for but not yet server generation (but see https://github.com/swagger-api/swagger-codegen/issues/7451). Admittedly, gRPC doesn't support asyncio either (https://github.com/grpc/grpc/issues/6046), but gRPC has its own server frameworks already, and is not as well suited for the kinds of applications where you'd want a Python server anyway. But Swagger Codegen is.
In gRPC-Web is going GA
That is in no way different than REST: 1. (same) 2. Based on the screen designs and workflows, front end dev team writes the REST contract that they want. They mock the endpoints (i.e. using nock [0] or Angular's MockBackend) for the contracts and come up with the DTO definitions. 3. Backend folks start implementing the REST endpoints by orchestrating microservices (or by creating a REST service facade for an existing REST API). 4. Once the backend REST endpoints are done, switch out the mock endpoints for the real ones There is no need or benefit for using GraphQL here, all this can be done with REST already. Tooling around REST is great, i.e. you could use TypeScript to generate .d.ts files for your REST Dtos based on the swagger API schema [1]. Or with plain JS, use a JS runtime library that validates the DTO schematics/REST contracts
Read the rest
(both your mocked ones and the real ones returned by the backend) with i.e. joi [2]. [0]: https://github.com/nock/nock [1]: https://github.com/swagger-api/swagger-codegen [2]: https://github.com/hapijs/joi
In Why use GraphQL, good and bad reasons
oneweekwonder·Apr 27, 2018Recommendation phrase
> Should they do the same thing as you did? They can, I recommend they look at the swagger-codegen[0] api stub templates. There clients as well. [0]: https://github.com/swagger-api/swagger-codegen/tree/master/m... > At some point, you write a library right? Normally a flask-ext forms around a established python library. Yes now we are back at the tight integration problem, but at-least your knowledge of the py library will not be lost in another eco-system. > I wish the Django ORM were ripped out of Django so we could have libraries that depend on Django's ORM without them depending on the entire Django stack... Django ORM support SQLAlchemy's model declarations... Then we live in a world where you can swap out the ORM API at the application layer, but have libraries that are compatible with both and don't need to be reimplemented for bot
Read the rest
h Django and SQLAlchemy. Amen Brother!
In Flask 1.0 Released
Have you looked at dumping json-schema? Because then something like json-editor[0] will just work out of the box. Got extensively tested with swagger v2(openapi)[1]. After the json-schema you write a quick swagger spec and modify a couple of mustache templates[3] to generate a crud interface for server and client. In your language of choice. All with one magic yaml file; but file format agnostic as well; Personally I struggle to read the json format. [0]: https://github.com/json-editor/json-editor [1]: https://github.com/swagger-api/swagger-editor/tree/2.x [3]: https://github.com/swagger-api/swagger-codegen/
In EdgeDB: A New Beginning
If you're defining your APIs using Swagger/OpenAPI (https://swagger.io/specification/), you can autogenerate Rust client and server stubs using the standard Swagger code generators (https://github.com/swagger-api/swagger-codegen/). In case you're not familiar with Swagger/OpenAPI, it's a format for specifying (generally REST-ful) HTTP APIs. The key benefit over just writing your API directly in Rocket is that you specify your API once and then generate client and server implementations that join up - even if they're in different languages. (I did a lot of the development work on the "rust-server" Swagger codegen, and blogged on it at https://www.metaswitch.com/blog/metaswitch-swagger-codegen-f...)
In Writing a Microservice in Rust

Showing the 15 most recent of 55 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.