generate it from your server code like FastAPI makes it easy to do.design it with a convenient visual editor.If you don't have an OpenAPI definition and you want to start with one, you can: 2.) API definition formatsįern can run off its own DSL called the Fern Definition, which you can write and maintain by hand. Pop back to the terminal and when the command is done it will have created a directory of fern/ with some config, and an api/ directory (meaning you can have multiple APIs if you like). If you don't have a GitHub account it's worth making one as lots of developer tools use it as a login. That sends you off to GitHub to create an account. Pop into the directory of the API you want to build an SDK for, and generate the Fern config. It's written in Node, like all the best API tools seem to be. Fern can even release your code up to package repositories like NPM or Maven, so you don't have to. It will also generate a Postman Collection and OpenAPI definition, keeping them automatically in sync. Automated tooling can be brought in to help avoid this monotonous task, especially with the fantastic code generator Fern.įern can help us build SDKs in major programming languages, not just TypeScript, so we can set up one pipeline and get a bunch of SDKs out at once. The time a user spends this interaction code could be better used getting their product built and integrated, leading to more business for you.īuilding client code (also known as Software Development Kits) is not much fun, especially after you've made a few hundred. Why? It's slow and brittle, which often means they're not leveraging the full power of your API. In this tutorial, we're going to generate TypeScript client code for an existing API to help users of that API avoid writing their own HTTP-level interaction code. Avoid the slow and brittle manual process, and publish directly to package repositories like NPM. Generate TypeScript client code easily with Fern, an automated tool that builds SDKs for major languages, Postman Collections, and OpenAPI definitions.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |