0.1.0 • Published 3 years ago

amplify-openapi-client v0.1.0

Weekly downloads
3
License
MIT
Repository
github
Last release
3 years ago

License Dependencies Total alerts Language grade: JavaScript Sponsored Buy me a coffee

OpenAPI plugins / libraries for AWS Amplify

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

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!

0.1.0

3 years ago

0.0.10

4 years ago

0.0.11

4 years ago

0.0.12

4 years ago

0.0.13

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.6

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago