-
Notifications
You must be signed in to change notification settings - Fork 151
Unrecognized property ‘documentation’ #166
Description
In my server.yml i am defining API documentation as per https://www.serverless.com/plugins/serverless-aws-documentation
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’
I am stuck at this problem for few days, any help will be appreciated
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