https://github.com/anttiviljami/amplify-openapi
Amplify plugins for OpenAPI tooling
https://github.com/anttiviljami/amplify-openapi
amplify amplify-openapi-backend amplify-openapi-client openapi openapi-backend
Last synced: 4 months ago
JSON representation
Amplify plugins for OpenAPI tooling
- Host: GitHub
- URL: https://github.com/anttiviljami/amplify-openapi
- Owner: anttiviljami
- License: mit
- Created: 2020-06-13T11:28:07.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-12-11T09:54:54.000Z (about 3 years ago)
- Last Synced: 2025-09-26T16:18:12.114Z (4 months ago)
- Topics: amplify, amplify-openapi-backend, amplify-openapi-client, openapi, openapi-backend
- Language: TypeScript
- Homepage:
- Size: 698 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Amplify OpenAPI Monorepo
[](https://github.com/anttiviljami/amplify-openapi/blob/master/LICENSE)
[](https://david-dm.org/anttiviljami/amplify-openapi)
[](https://lgtm.com/projects/g/anttiviljami/amplify-openapi/alerts/)
[](https://lgtm.com/projects/g/anttiviljami/amplify-openapi/context:javascript)
[](http://spiceprogram.org/oss-sponsorship)
[](https://buymeacoff.ee/anttiviljami)
OpenAPI plugins / libraries for AWS Amplify
- [amplify-openapi-backend](https://github.com/anttiviljami/amplify-openapi/tree/master/packages/amplify-openapi-backend)
- [amplify-openapi-client](https://github.com/anttiviljami/amplify-openapi/tree/master/packages/amplify-openapi-client)
## Usage
Install `amplify-openapi-backend` plugin
```
npm install -g amplify-openapi-backend
amplify plugin scan
```
Create a new API resource with OpenAPI Backend (Integration with API Gateway) template
```
amplify api add
# ? Please select from one of the below mentioned services: REST
# ? Provide a friendly name for your resource to be used as a label for this category in the project: myopenapi
# ? Provide a path (e.g., /book/{isbn}): /api
# ? Choose a Lambda source Create a new Lambda function
# ? Provide a friendly name for your resource to be used as a label for this category in the project: openapibackend
# ? Provide the AWS Lambda function name: openapibackend
# ? Choose the function runtime that you want to use: NodeJS
# ? Choose the function template that you want to use: OpenAPI Backend (Integration with API Gateway)
# ...
amplify push
```
Install `amplify-openapi-client` frontend library
```
npm install --save amplify-openapi-client
```
Configure the library to use with Amplify
```javascript
import OpenAPI from "amplify-openapi-client";
import awsconfig from "./aws-exports";
const api = new OpenAPI();
api.configure(awsconfig);
api.getClient({ name: "myopenapi", path: "/api" }).then(async client => {
const pets = await client.getPets();
});
```
## Development
```
npm install
npm run watch-build
```
## Contributing
Amplify OpenAPI Monorepo is Free and Open Source Software. Issues and pull requests are more than welcome!
[
](https://spiceprogram.org/oss-sponsorship)