aws-doc-sdk-examples icon indicating copy to clipboard operation
aws-doc-sdk-examples copied to clipboard

Adding an example for importing from swagger/open API definition file and creating an API gateway.

Open raghuraman1 opened this issue 3 years ago • 0 comments

aws-doc-sdk-examples Pull Request

Adding an example for importing from swagger/open API definition file and creating an API gateway.

New SDK Code Example

The submitter has:

  • [x] Added the default copyright notice to all files.
  • [x] Created unit tests for all paths through the code and they all pass.
  • [x] Run a linter against all code and implemented the resulting suggestions.
  • [x] Added minimum usage documentation as comments in the code.
  • [ ] Had comments and strings reviewed and incorporated suggested changes.
  • [ ] Had the code reviewed and implemented the reviewer's suggested changes.

Existing Example Update

The submitter has:

  • [x] Confirmed that the correct copyright is included in all files.
  • [ ] Major code changes have been reviewed, and the submitter has incorporated review comments.
  • [ ] Changed or added comments and strings have been reviewed, and the submitter has incorporated any and all suggested edits.

Description of Changes

Please describe the changes you have made here.

  • [x] I have tested my changes and created unit tests for new code paths.
  • [ ] Changes have been reviewed, and all reviewer comments have been incorporated.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

I have added the 2 files javav2\example_code\apigateway\src\main\java\com\example\gateway\ImportRestApi.java and javav2\example_code\apigateway\example-api.json. I have run this code verified it works. I had a look at the provided test case. I figured out how to make the test case work using config.properties. I updated config.properties and APIGatewayTest.java

I have some tests to verify the creation of the api gateway when it was created using the import swagger definition approach. I also in the tests delete the api gateway. Keeping my tests simple and on same lines as existing tests.

@beqqrry-aws @scmacdon @Laren-AWS Please review. I have also incorporated sections of the PR template. Hope my formatting is good enough. Code and test cases work. Please excuse the multiple PR edits. It is my first PR here. Thanks.

raghuraman1 avatar Aug 03 '22 15:08 raghuraman1