Hi All,
In my server.yml i am defining API documentation as per Serverless Framework: Plugins
I have documentation plugin installed and added like this
plugins:
- serverless-aws-documentation
I have function defined like this
create-company:
handler: bin/create-company
events:
- http:
path: v1/owner/{ownerId}/company
method: POST
documentation:
summary: Create a new Company
pathParams:
-
name: "ownerId"
description: "Owner ID"
required: true
type: string
requestHeaders:
-
name: "Authorization"
description: "Bearer token"
required: true
type: string
requestModels:
"application/json": CreateCompanyRequest
methodResponses:
-
statusCode: '200'
responseModels:
"application/json": "CreateCompanyResponse"
responseHeaders:
-
name: Content-Type
description: Content Type
type: string
package:
exclude:
- ./**
include:
- ./bin/create-company
also under custom i have Models defined properly.
Until Few days back it was working fine and suddenly it stopped working, from git i checkout my few days old version of project and tried it, thats also failing with following error
Serverless: at âfunctions[âcreate-companyâ].events[0].httpâ: unrecognized property âdocumentationâ
Only thing which has changed is i recently updated serverless version to latest.
My Current env looks like this
sls version
Framework Core: 2.8.0
Plugin: 4.1.1
SDK: 2.3.2
Components: 3.2.3
Not sure how to solve this issue. I have tried going back to previous version for serverless(2.7.0) as well as documentation plugin(1.0.0, 1.0.1). i have checked for typo errors but its happening in my 3 serverless projects