Implement support for exporting Swagger/OpenAPI definitions, clean up backend lambda #350
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue #, if available: Closes #309.
Description of changes:
I added a second dropdown for exporting API definitions, where the modal gives the following options:
I reused the same modal and related logic as the SDK exports, as it was basically the same. I just added a couple new field types. I also added a new backend route (basically a clone of the existing SDK generation one) to get the API export and fixed a related bug I discovered where it was checking for the wrong ID (it should've checked the API ID, not the global ID). And of course, I rebuilt the assets.
I modularized and cleaned up the lambda backend so it's easier to look through - it got tiring having to Cmd+F every 2-3 minutes to jump around multiple locations in the file.
I also did a little bit of cleanup in the form of removing a bit of catalog code that really should've been removed when the comment was initially written.
I addressed
npm audit
issues and resolved them where applicable.Note: don't merge this yet - it's intentionally a draft so I can get some early feedback. It's also based on #347, and so I need to wait for that to get merged before this can be merged.Edit: Updated description.
Edit 2: Slipped another fix in. Also, it's now open for review.
Edit 3: Closes #332, closes #333, closes #335, closes #352
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.