Closed
Description
We want to check the regex of a request parameter, but "pattern" doesn't seem to have any affect.
Example:
"parameters": [{
"name": "name",
"in": "query",
"description": "Assign the specified name to the container. Must match /?[a-zA-Z0-9_-]+.",
"type": "string",
"pattern": "/?[a-zA-Z0-9_-]+"
}, {
query:
- curl -i -X POST http://127.0.0.1:49000/v1.22/containers/create?name=@#!
- curl -i -X POST http://127.0.0.1:49000/v1.22/containers/create?name=%^@
- curl -i -X POST http://127.0.0.1:49000/v1.22/containers/create?name=abc123
results:
- {"code":422,"message":"name in query should match '/?[a-zA-Z0-9_-]+'"}
- HTTP/1.1 501 Not Implemented
Content-Type: application/json
Date: Fri, 04 Mar 2016 22:26:35 GMT
Content-Length: 53
"operation container.Create has not yet implemented"
- HTTP/1.1 501 Not Implemented
Content-Type: application/json
Date: Fri, 04 Mar 2016 22:26:35 GMT
Content-Length: 53
"operation container.Create has not yet implemented"
Comments:
query 1 and 3 are correct but query 2 is not.
Metadata
Metadata
Assignees
Labels
No labels