Any framework or tool is available to achieve swagger definition as the auto generation process for AWS Chalice?

Viewed 940

I'm using AWS chalice for API development and deployed. Currently, I'm about to implement swagger definition for my API's and I don't want to do the swagger definition creation process as the manual. Is there any framework or tool available especially for the chalice to auto-generate the swagger definition using docstring or any other techniques? Actually I tried with the apispec-chalice framework, But it's not working as expected. Any information related to chalice with swagger creation will be great and helpful. Thanks in advance.

2 Answers

Its good to use native ApiSpec(https://apispec.readthedocs.io/en/latest/)

  1. First, Add following to your app.py
from apispec import APISpec

#Create an APISpec
spec = APISpec(
    title='AppName',
    version='1.0.0',
    openapi_version="3.0.2",
    plugins=[],
)
  1. Then run, chalice generate-models from terminal in your project repo.
Related