Skip to content

Commit

Permalink
Allow consecutive hyphens in the JobSpec id (#391)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Harper authored Dec 17, 2020
1 parent 4834744 commit de4174d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"definitions": {
"pathType": {
"type": "string",
"pattern": "^([a-z0-9]+(\\-[a-z0-9]+)*)(\\.([a-z0-9]+(\\-[a-z0-9]+)*))*$",
"pattern": "^([a-z0-9]+(\\-+[a-z0-9]+)*)(\\.([a-z0-9]+(\\-+[a-z0-9]+)*))*$",
"minLength": 1
}
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"definitions": {
"pathType": {
"type": "string",
"pattern": "^([a-z0-9]+(\\-[a-z0-9]+)*)(\\.([a-z0-9]+(\\-[a-z0-9]+)*))*$",
"pattern": "^([a-z0-9]+(\\-+[a-z0-9]+)*)(\\.([a-z0-9]+(\\-+[a-z0-9]+)*))*$",
"minLength": 1
},
"schedule": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ class JobSpecJsonSchemaTest extends UnitTest with Mockito with TableDrivenProper
("id", "valid"),
("a", true),
("a-a", true),
("a--a", true),
("a-a.a-a", true),
("a--a.a--a", true),
("a.a.a", true),
("a1a.a1.a1", true),
("a1234567890-a1234567890.a1234567890-a1234567890.a", true),
Expand Down

0 comments on commit de4174d

Please sign in to comment.