master在使用Github作为源提供程序时,如何在AWS代码部署上指定不同的分支而不是分支?我看到没有选项可以在控制台中选择分支(可能是我错过了).
当我们处于pre_build阶段时,我试图结帐到不同的分支,但它在下载源阶段本身失败,因为master分支没有YAML文件.
version: 0.1
phases:
install:
commands:
- apt-get update -y
pre_build:
commands:
- git checkout testbranch
Run Code Online (Sandbox Code Playgroud) 假设我有一个包含路径/和/{pets}和的api /{pets}/pet。现在,我正在尝试验证path {pets}参数,以便仅验证长度为6的字母数字字符的路径并将其处理到后端lambda,所有其他路径将被拒绝。我尝试了下面的swagger模式,为参数指定了格式和类型。我什至尝试在模式中使用模式,但似乎无法正常工作。我可以知道我们如何仅限制某些ID的路径参数。
{
......
"/{pets}/pet": {
"get": {
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"parameters": [{
"name": "pets",
"in": "path",
"required": true,
"schema": {
"type": "string",
"pattern": "[A-Za-z0-9]{6}"
}
}],
"responses": {
"200": {
"description": "200 response",
"schema": {
"$ref": "#/definitions/Empty"
}
}
},
"x-amazon-apigateway-request-validator": "Validate query string parameters and headers",
"x-amazon-apigateway-integration": {
"responses": {
"default": {
"statusCode": "200"
}
},
"requestTemplates": {
"application/json": "## See ...."
},
"uri": "........",
"passthroughBehavior": …Run Code Online (Sandbox Code Playgroud)