Apigateway REST getExport as Swagger
Currently the operation get_export is not covered in moto, this issue is just to formalize the request to cover this functionality.
https://docs.aws.amazon.com/apigateway/latest/developerguide/api-gateway-export-api.html
Thanks for raising this @calvernaz, will mark it as an enhancement.
In general, features like this are supplied by the community, so if this is something you want to contribute, a PR would be very welcome! See our docs if you want more info on how to get started: http://docs.getmoto.org/en/latest/docs/contributing/index.html
Thanks @bblommers, I might give it a whirl! Do you have any tips or similar work how this can be achieved?
The only similar work around this is the import_api function for APIGatewayV2, but that is a very crude and simplistic:
https://github.com/spulec/moto/blob/master/moto/apigatewayv2/models.py#L625:L627
Considering the scope of this method, my tip would be to keep it simple. If you only need 2% of the full OpenAPI spec, only implement that part - every bit helps.
If you ever get stuck, or can't figure out how to make it work, don't be afraid to open a draft PR with what you have so far - happy to have a look and help out!
Moto now also has this feature, although not all fields/options are supported yet. Please let us know if you run into any issues with our implementation.