Skip to content
This repository has been archived by the owner on Aug 29, 2024. It is now read-only.

not validating properties #55

Open
ghost opened this issue Aug 9, 2017 · 1 comment
Open

not validating properties #55

ghost opened this issue Aug 9, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 9, 2017

relevant part of the spec:

   properties:
      ...
      artifactBucket:
        type: string
        minLength: 5
        pattern: "arn:aws:([a-zA-Z0-9-])+:([a-z]{2}-[a-z]+-d{1})?:(d{12})?:(.*)"
        example: bla

this is how I use validate_request:

my_config = {
    "stack": {
        "StackName": "infra-dev-kumo-sample-stack",
        "RoleARN": "arn:aws:iam::<AccountID>:role/<CloudFormationRoleName>",
        "artifactBucket": "bla",
        "NotificationARNs": [
            "arn:aws:sns:eu-west-1:123456789012:mytopic2"
        ]
    }
}

print(parser.validate_request('/kumo', 'get', body=my_config))

if I run this I get:

$ python config_validate_kumo.py
True

I would expect False with an error message that explains the problem with artifactBucket.

@cyprieng
Copy link
Owner

Indeed, minLength and pattern are not supported yet

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant