Skip to content
This repository was archived by the owner on Aug 26, 2025. It is now read-only.

Commit 4732753

Browse files
author
malpaniHMC
authored
[ServiceNetworking.Management] Update TypeSpec to match Swagger (Azure#24225)
- Swagger was accidentally updated manually in Azure#24081
1 parent 44fe78f commit 4732753

File tree

2 files changed

+47
-47
lines changed
  • specification/servicenetworking

2 files changed

+47
-47
lines changed

specification/servicenetworking/ServiceNetworking.Management/main.tsp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ model Frontend is TrackedResource<FrontendProperties>{
3131
@visibility("read")
3232
@path
3333
@segment("frontends")
34-
@pattern("[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+")
34+
@pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$")
3535
name : string;
3636
}
3737

@@ -55,7 +55,7 @@ model Association is TrackedResource<AssociationProperties> {
5555
@doc("Name of Association")
5656
@path
5757
@segment("associations")
58-
@pattern("[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+")
58+
@pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$")
5959
name: string;
6060
}
6161

@@ -88,7 +88,7 @@ model TrafficController is TrackedResource<TrafficControllerProperties> {
8888
@path
8989
@segment("trafficControllers")
9090
@doc("traffic controller name for path")
91-
@pattern("[A-Za-z0-9]+[A-Za-z0-9-_.]{0,62}[A-Za-z0-9_]+")
91+
@pattern("^[A-Za-z0-9]([A-Za-z0-9-_.]{0,62}[A-Za-z0-9])?$")
9292
name: string;
9393
}
9494

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

0 commit comments

Comments
 (0)