Skip to content
This repository has been archived by the owner on Jul 23, 2021. It is now read-only.

The serverless-aws-documentation plugin is not working #154

Open
AgnivDass opened this issue Jul 23, 2020 · 3 comments
Open

The serverless-aws-documentation plugin is not working #154

AgnivDass opened this issue Jul 23, 2020 · 3 comments

Comments

@AgnivDass
Copy link

Hi,

I have installed the plugin and then deployed my serverless project.

After that I have executed the serverless downloadDocumentation --outputFile=filename.ext command to download the documentation.
This gives an error :

Serverless command "downloadDocumentation" not found. Did you mean "tabcompletion"? Run "serverless help" for a list of all available commands.

I also checked the documentation tab under AWS Gateway API and there is no documentation created!!

This is the part under the function in the .yml file which I want documented :

UserManagementGetUsers:
  role: LambdaAdminRole
  handler: src/user-management/userManagementHandler.getUsers
  events:
    - http:
        path: /api/usrmgmt/user
        method: get
        operationId: getUsers
        cors: true
        authorizer:
          name: LambdaAuthorizer
          type: COGNITO_USER_POOLS
          arn:
            Fn::GetAtt:
              - WiredScoreUserPool
              - Arn
        documentation:
          summary: "Get a list of all the users!!"
          methodResponses:
              -
                statusCode: "200"
                responseBody:
                  description: "a list of all the users"
              -
                statusCode: "400"
                responseBody:
                  description: "Error 400! Bad request!!"  

Can anyone help me out with this?

@AgnivDass AgnivDass changed the title serverless-aws-documentation plugin not working The serverless-aws-documentation plugin is not working Jul 23, 2020
@benjefferies
Copy link

benjefferies commented Jul 29, 2020

Have you ran npm install serverless-aws-documentation

@AgnivDass
Copy link
Author

Yes, I did.

@harryhazza77
Copy link

  • i installed it via yarn
  • serverless.yml - added to in the plugins section
  • serverless.yml - add a custom section with some documentation
  • did a deploy

it appeared on AWS API Gateway as expected

> npx serverless --version
Framework Core: 1.79.0
Plugin: 3.7.1
SDK: 2.3.1
Components: 2.34.7

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants