quicktype
openapi-generator
Our great sponsors
quicktype | openapi-generator | |
---|---|---|
96 | 232 | |
11,358 | 19,529 | |
2.2% | 3.1% | |
8.4 | 9.9 | |
8 days ago | 2 days ago | |
TypeScript | Java | |
Apache License 2.0 | Apache License 2.0 |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
quicktype
-
Tres herramientas para desarrolladores de software 👌
2. Quicktype
-
Show HN: A tool to Convert JSON schemas into TypeScript classes
I have the library demo linked from the homepage bookmarked: https://app.quicktype.io/ I use it every time I need to go from a pile of JSON to TypeScript types or zod declarations.
-
Sharing data types on a multi-language project
This is a very intriguing problem!
Not trying to steal thunder, but quicktype (https://github.com/quicktype/quicktype) does all of this–JSON schema or TypeScript definitions to de/serializers and types in nearly 30 languages at this point. Try it here: https://app.quicktype.io
- The Typescript ecosystem is exhausting
-
how to efficiently create structs to match the json response
I usually use https://app.quicktype.io/ , they also have a VSCode plugin and then fieldaligment to make sure it's as compact as possible.
-
Fastest Way to Auto Generate Types for Typescript and Input validation
Just paste your json inside app.quicktype.io or it's vscode
-
API Call to QuickBooks online
Maybe use https://app.quicktype.io/
-
How does one decode this JSON data?
Try pasting the raw result into https://app.quicktype.io and see what the structures look like.
-
Decode struct from JSON
Copy-paste into https://app.quicktype.io and then adapt
You can conform your struct model to Decodable protocol and you can decode it. If you want, you can use this to auto generate your struct: https://app.quicktype.io (there are an example to how to use JSONDecoder). If you have any question to how to use, just search in google how to use Codable
openapi-generator
-
Show HN: Manage on-prem servers from my smartphone
Of course you can compile the server from source if you have Go and the OpenAPI generator JAR (https://github.com/OpenAPITools/openapi-generator?tab=readme...)
Follow these steps : https://github.com/c100k/rebootx-on-prem/blob/master/.github...
And then :
(cd ./impl/http-server-go && GOARCH=amd64 GOOS=openbsd go build -o /app/rebootx-on-prem-http-server-go-openbsd-amd64 -v)
By adapting the arch if needed. Not tested, but it should work.
-
How to Automatically Consume RESTful APIs in Your Frontend
As an alternative, you can also use the official OpenAPI Generator, which is a more generic tool supporting a wide range of languages and frameworks.
-
Building a world-class suite of SDKs is easy with Speakeasy
I trialed generating SDKs using the OpenAPI Generator package, which was largely unsatisfactory.
-
Best way to implement base class for API calls?
If Swagger/OpenAPI is available, save yourself a lot of trouble and generate the client using OpenAPI Generator. If not, use a library like RestEase to make it significantly easier to create the client.
-
Created an API using Gin, want to create sdk for him
Then you can use oapi-codegen or openapi-generator to generate the Go (or other language) SDK for it.
-
.NET Blazor
Yep. For frontend use, I think https://www.npmjs.com/package/openapi-typescript is the most widely-used/well-regarded, though https://www.npmjs.com/package/orval seems to me to have some nicer features like react-query support.
There are other options too, I'd just stay away from "_the_ openapi generator" (https://openapi-generator.tech/) which does a pretty poor job IMO.
Disclaimer: I'm the founder of a company doing SDKs commercially, but we don't focus on the frontend right now, and our free plan is still in beta.
-
Using AI To Go From JSON to API in Seconds
Now that I have a solid way to make an Open API spec and get a functioning mock server, I'd like to take it a step further and generate an SDK to call it. Many developers use SDKs to communicate with their backend services, and tools like OpenAPI Generator enable them to do so without having to manually build them. OpenAPI Generator will take an API spec and compile it down into an SDK in the language of your choice, including front-end compatible languages like typescript-fetch.
-
10 quick tips to instantly improve API design
With the development of automatic code generation tools such OpenAPI generator (https://openapi-generator.tech/), the importance of API design rather than implementation is emphasized.
-
10+ API Documentation Tools For Super Busy Developers 👩💻
OpenAPI Generator (Free)
-
Learning Go by examples: part 11 - Generate a Go SDK (API client library) from your Go REST API
In short, OpenAPI Generator allows generation of API client librairies (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3).
What are some alternatives?
NSwag - The Swagger/OpenAPI toolchain for .NET, ASP.NET Core and TypeScript.
oapi-codegen - Generate Go client and server boilerplate from OpenAPI 3 specifications
SvelteKit - web development, streamlined
smithy - Smithy is a protocol-agnostic interface definition language and set of tools for generating clients, servers, and documentation for any programming language.
django-ninja - 💨 Fast, Async-ready, Openapi, type hints based framework for building APIs
autorest - OpenAPI (f.k.a Swagger) Specification code generator. Supports C#, PowerShell, Go, Java, Node.js, TypeScript, Python
json2dart - A CLI tool to help generate dart classes from json returned from API
smithy-go - Smithy code generators for Go (in development)
json_serializable.dart - Generates utilities to aid in serializing to/from JSON.
swagger-petstore - swagger-codegen contains a template-driven engine to generate documentation, API clients and server stubs in different languages by parsing your OpenAPI / Swagger definition.
Feign - Feign makes writing java http clients easier
swagger-typescript-api - TypeScript API generator via Swagger scheme