oneOf appears to not work correctly (Being treated like allOf)
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện lỗi xác thực update đã được báo cáo với schema và payload chứa VpcLinkId và BaseURI. So sánh kết quả xác thực khi có chính xác một, cả hai và không có branch nào của oneOf; hoàn tất khi một branch hợp lệ được chấp nhận, trong khi các tổ hợp không hợp lệ tạo ra những lỗi như mong đợi.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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 (#)
- Ngôn ngữ chính
- Java
- Star
- 30
- Fork
- 48
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của aws-cloudformation/cloudformation-cli-java-plugin
-
Runtime compatibility issue Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
aws-cloudformation/cloudformation-cli-java-plugin#415 · 1 bình luận ·
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 42/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 20/100
-
injectCredentialsAndInvokeV2 method in proxy class doesn't support API's like PutObject from S3. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
Tất cả issue của aws-cloudformation/cloudformation-cli-java-plugin
Issue tương tự
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
infinispan/infinispan#18150 ·
-
area/frontend
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 84/100
-
untriaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
opensearch-project/k-NN#3597 ·
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100