alibaba / alibaba/funcraft

Function Compute as Backend using Swagger

Open
#159 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
931
Forks
128
PR merge metrics
No merged PRs in 30d

Description

When I use a swagger file as `DefinitionUri` and following the documentation at https://www.alibabacloud.com/help/doc-detail/88956.htm, I get the following error:
```
TypeError: Cannot read property 'role' of undefined
at deployApigateway (/usr/lib/node_modules/@alicloud/fun/lib/deploy/deploy-by-tpl.js:386:28)
at
at process._tickDomainCallback (internal/process/next_tick.js:229:7)
```

That line of code is looking for `x-aliyun-apigateway-fc`, which is what Fun is looking for:
https://github.com/aliyun/fun/blob/fe2c8e1ed3901f494e1cab2d9cdca5e54aaeb7ad/lib/deploy/deploy-by-tpl.js#L383

Almost nothing from the documentation of how a Swagger file for API Gateway should look like works with `Fun`

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by comparing the Swagger guidance at the linked Alibaba Cloud documentation with the deployApigateway path in lib/deploy/deploy-by-tpl.js, especially around lines 383-386. Reproduce the DefinitionUri deployment and determine which documented Swagger fields Fun handles; done means the documented Function Compute API definition deploys without the reported role error.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
api, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.