Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/readmeio/api
🚀 Automatic SDK generation from an OpenAPI definition
https://github.com/readmeio/api
api openapi sdk swagger
Last synced: 2 days ago
JSON representation
🚀 Automatic SDK generation from an OpenAPI definition
- Host: GitHub
- URL: https://github.com/readmeio/api
- Owner: readmeio
- License: mit
- Created: 2017-02-06T22:31:07.000Z (almost 8 years ago)
- Default Branch: main
- Last Pushed: 2024-07-08T21:45:33.000Z (5 months ago)
- Last Synced: 2024-07-10T13:46:55.062Z (5 months ago)
- Topics: api, openapi, sdk, swagger
- Language: TypeScript
- Homepage: https://api.readme.dev
- Size: 13.3 MB
- Stars: 541
- Watchers: 22
- Forks: 25
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
- awesome-javascript - api-monorepo
- awesome-javascript - api-monorepo
README
Magical SDK generation from an OpenAPI definition 🪄- [Installation](https://api.readme.dev/docs/installation)
- [Usage](https://api.readme.dev/docs/usage)
- [Authentication](https://api.readme.dev/docs/authentication)
- [Parameters and Payloads](https://api.readme.dev/docs/parameters-and-payloads)
- [Making requests](https://api.readme.dev/docs/making-requests)
- [Server configurations](https://api.readme.dev/docs/server-configurations)
- [How does it work?](https://api.readme.dev/docs/how-it-works)
- [FAQ](https://api.readme.dev/docs/faq)`api` is a library that facilitates creating an SDK from an OpenAPI definition. You can use its codegen offering to create an opinionated SDK for TypeScript or JS (+ TypeScript types).
```sh
$ npx api install https://raw.githubusercontent.com/OAI/OpenAPI-Specification/main/examples/v3.0/petstore.json
``````js
const petstore = require('@api/petstore');petstore.listPets().then(({ data }) => {
console.log(`My pets name is ${data[0].name}!`);
});
```The ESM syntax is supported as well:
```js
import petstore from '@api/petstore';petstore.listPets().then(({ data }) => {
console.log(`My pets name is ${data[0].name}!`);
});
```