Skip to content

Commit 5d9660b

Browse files
author
malpaniHMC
authored
updating pattern to avoid partial matches (#24081)
1 parent 280a956 commit 5d9660b

File tree

1 file changed

+44
-44
lines changed
  • specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2023-05-01-preview

1 file changed

+44
-44
lines changed

specification/servicenetworking/resource-manager/Microsoft.ServiceNetworking/preview/2023-05-01-preview/TrafficController.json

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -192,8 +192,8 @@
192192
"in": "path",
193193
"required": true,
194194
"description": "traffic controller name for path",
195-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
196-
"type": "string"
195+
"type": "string",
196+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
197197
}
198198
],
199199
"responses": {
@@ -237,8 +237,8 @@
237237
"in": "path",
238238
"required": true,
239239
"description": "traffic controller name for path",
240-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
241-
"type": "string"
240+
"type": "string",
241+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
242242
},
243243
{
244244
"name": "resource",
@@ -308,8 +308,8 @@
308308
"in": "path",
309309
"required": true,
310310
"description": "traffic controller name for path",
311-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
312-
"type": "string"
311+
"type": "string",
312+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
313313
},
314314
{
315315
"name": "properties",
@@ -362,8 +362,8 @@
362362
"in": "path",
363363
"required": true,
364364
"description": "traffic controller name for path",
365-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
366-
"type": "string"
365+
"type": "string",
366+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
367367
}
368368
],
369369
"responses": {
@@ -427,8 +427,8 @@
427427
"in": "path",
428428
"required": true,
429429
"description": "traffic controller name for path",
430-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
431-
"type": "string"
430+
"type": "string",
431+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
432432
}
433433
],
434434
"responses": {
@@ -477,16 +477,16 @@
477477
"in": "path",
478478
"required": true,
479479
"description": "traffic controller name for path",
480-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
481-
"type": "string"
480+
"type": "string",
481+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
482482
},
483483
{
484484
"name": "associationName",
485485
"in": "path",
486486
"required": true,
487487
"description": "Name of Association",
488-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
489-
"type": "string"
488+
"type": "string",
489+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
490490
}
491491
],
492492
"responses": {
@@ -530,16 +530,16 @@
530530
"in": "path",
531531
"required": true,
532532
"description": "traffic controller name for path",
533-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
534-
"type": "string"
533+
"type": "string",
534+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
535535
},
536536
{
537537
"name": "associationName",
538538
"in": "path",
539539
"required": true,
540540
"description": "Name of Association",
541-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
542-
"type": "string"
541+
"type": "string",
542+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
543543
},
544544
{
545545
"name": "resource",
@@ -609,16 +609,16 @@
609609
"in": "path",
610610
"required": true,
611611
"description": "traffic controller name for path",
612-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
613-
"type": "string"
612+
"type": "string",
613+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
614614
},
615615
{
616616
"name": "associationName",
617617
"in": "path",
618618
"required": true,
619619
"description": "Name of Association",
620-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
621-
"type": "string"
620+
"type": "string",
621+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
622622
},
623623
{
624624
"name": "properties",
@@ -671,16 +671,16 @@
671671
"in": "path",
672672
"required": true,
673673
"description": "traffic controller name for path",
674-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
675-
"type": "string"
674+
"type": "string",
675+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
676676
},
677677
{
678678
"name": "associationName",
679679
"in": "path",
680680
"required": true,
681681
"description": "Name of Association",
682-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
683-
"type": "string"
682+
"type": "string",
683+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
684684
}
685685
],
686686
"responses": {
@@ -744,8 +744,8 @@
744744
"in": "path",
745745
"required": true,
746746
"description": "traffic controller name for path",
747-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
748-
"type": "string"
747+
"type": "string",
748+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
749749
}
750750
],
751751
"responses": {
@@ -794,16 +794,16 @@
794794
"in": "path",
795795
"required": true,
796796
"description": "traffic controller name for path",
797-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
798-
"type": "string"
797+
"type": "string",
798+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
799799
},
800800
{
801801
"name": "frontendName",
802802
"in": "path",
803803
"required": true,
804804
"description": "Frontends",
805-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
806-
"type": "string"
805+
"type": "string",
806+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
807807
}
808808
],
809809
"responses": {
@@ -847,16 +847,16 @@
847847
"in": "path",
848848
"required": true,
849849
"description": "traffic controller name for path",
850-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
851-
"type": "string"
850+
"type": "string",
851+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
852852
},
853853
{
854854
"name": "frontendName",
855855
"in": "path",
856856
"required": true,
857857
"description": "Frontends",
858-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
859-
"type": "string"
858+
"type": "string",
859+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
860860
},
861861
{
862862
"name": "resource",
@@ -926,16 +926,16 @@
926926
"in": "path",
927927
"required": true,
928928
"description": "traffic controller name for path",
929-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
930-
"type": "string"
929+
"type": "string",
930+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
931931
},
932932
{
933933
"name": "frontendName",
934934
"in": "path",
935935
"required": true,
936936
"description": "Frontends",
937-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
938-
"type": "string"
937+
"type": "string",
938+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
939939
},
940940
{
941941
"name": "properties",
@@ -988,16 +988,16 @@
988988
"in": "path",
989989
"required": true,
990990
"description": "traffic controller name for path",
991-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
992-
"type": "string"
991+
"type": "string",
992+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
993993
},
994994
{
995995
"name": "frontendName",
996996
"in": "path",
997997
"required": true,
998998
"description": "Frontends",
999-
"pattern": "[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+",
1000-
"type": "string"
999+
"type": "string",
1000+
"pattern": "^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$"
10011001
}
10021002
],
10031003
"responses": {

0 commit comments

Comments
 (0)