oneOf appears to not work correctly (Being treated like allOf)
まだ誰も着手していません。
評価
調査の方向性
まず、VpcLinkId と BaseURI を含む schema と payload で、報告された update validation failure を再現します。oneOf の分岐がちょうど 1 つ、両方、どちらもない場合の validation 結果を比較します。1 つの有効な分岐が受け入れられ、無効な組み合わせでは期待どおりのエラーが生成されれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Version 1.0.5 of the Java plugin
Schema:
{
"typeName": "OBFUSCATED::ApiGateway::RestApi",
"description": "An example resource schema demonstrating some basic constructs and validation rules.",
"sourceUrl": "https://github.com/aws-cloudformation/aws-cloudformation-rpdk.git",
"properties": {
"RestApiId": {
"type": "string"
},
"Name": {
"description": "Api Name",
"type": "string"
},
"AuthorizerLambdaArn": {
"type": "string"
},
"AuthorizerCredentials": {
"type": "string"
},
"Version": {
"type": "string"
},
"SwaggerS3Location": {
"description": "Swagger File S3 Location.",
"type": "object",
"properties": {
"Bucket": {
"type": "string"
},
"Key": {
"type": "string"
},
"Version" : {
"type": "string"
}
},
"required": [
"Bucket",
"Key"
]
},
"EndpointType": {
"description": "Gateway Endpoint Type",
"enum" : ["REGIONAL", "EDGE", "PRIVATE"],
"type": "string"
},
"ValidateRequests" : {
"type": "boolean",
"description" : "Use Api Gateway request validatoin"
}
},
"oneOf": [
{
"properties": {
"VpcLinkId": {
"type": "string"
},
"BaseURI": {
"type": "string"
}
},
"required": ["VpcLinkId", "BaseURI"]
},
{
"properties": {
"LambdaArn" : {
"type": "string"
}
},
"required" : ["LambdaArn"]
}
],
"additionalProperties": false,
"required": [
"Name",
"SwaggerS3Location",
"EndpointType",
"AuthorizerLambdaArn",
"AuthorizerCredentials"
],
"writeOnlyProperties": [
"/properties/VpcLinkId",
"/properties/BaseURI",
"/properties/LambdaArn",
"/properties/SwaggerS3Location",
"/properties/ValidateRequests"
],
"readOnlyProperties": [
"/properties/RestApiId",
"/properties/Version"
],
"primaryIdentifier": [
"/properties/RestApiId"
],
"handlers": {
"create": {
"permissions": [
"iam:PassRole",
"s3:GetObject",
"s3:GetBucketLocation",
"apigateway:PATCH",
"apigateway:POST",
"apigateway:PUT"
]
},
"read": {
"permissions": [
"apigateway:GET"
]
},
"update": {
"permissions": [
"iam:PassRole",
"s3:GetObject",
"s3:GetBucketLocation",
"apigateway:PATCH",
"apigateway:POST",
"apigateway:PUT"
]
},
"delete": {
"permissions": [
"apigateway:DELETE"
]
}
}
}
Error when using only VpcLinkId and BaseURI in an update operation:
Model validation failed (#: #: only 1 subschema matches out of 2)\n#: 2 schema violations found (#)
- 主要言語
- Java
- スター
- 30
- フォーク
- 48
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
aws-cloudformation/cloudformation-cli-java-plugin のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
aws-cloudformation/cloudformation-cli-java-plugin#415 · コメント 1 件 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 42/100
-
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 20/100
-
injectCredentialsAndInvokeV2 method in proxy class doesn't support API's like PutObject from S3. オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
aws-cloudformation/cloudformation-cli-java-plugin の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
elastic/gradle-plugins#157 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
cryptomator/hub#497 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
johanhaleby/occurrent#1120 ·