oneOf appears to not work correctly (Being treated like allOf)
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the reported update validation failure with the schema and payload containing VpcLinkId and BaseURI. Compare validation results for exactly one, both, and neither oneOf branches; done means one valid branch is accepted while invalid combinations produce the expected errors.
Written by the indexing model from the issue text.
Description
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 (#)
- Dominant language
- Java
- Stars
- 30
- Forks
- 48
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from aws-cloudformation/cloudformation-cli-java-plugin
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
aws-cloudformation/cloudformation-cli-java-plugin#415 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
injectCredentialsAndInvokeV2 method in proxy class doesn't support API's like PutObject from S3. Open
Difficulty 5/5 Over a week Newbie friendliness 25/100
All issues in aws-cloudformation/cloudformation-cli-java-plugin
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Two open-case totals on one screen: the Programs tile says 15,858 and the nav badge says 15,868 Openbug frontend maui-pilot
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
objectionary/eo-graphs#74 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100