Skip to content

Commit 1d5f7f8

Browse files
authored
[Azure Container Apps] Fix sessions data-plane api spec (#36644)
* Remove unnecessary usings * test regex * fix * test * fix * fix * fix * test * test * test * fix * fix
1 parent 1c40dd1 commit 1d5f7f8

File tree

8 files changed

+6
-17
lines changed

8 files changed

+6
-17
lines changed

specification/app/Microsoft.App.DynamicSessions/main.tsp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import "@azure-tools/typespec-azure-core";
44
import "./routes.tsp";
55

66
using TypeSpec.Http;
7-
using TypeSpec.Rest;
87
using TypeSpec.Versioning;
98
using Azure.Core;
109

specification/app/Microsoft.App.DynamicSessions/models/code-execution-file.tsp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import "./common.tsp";
2-
using TypeSpec.Http;
32
using TypeSpec.Rest;
43

54
namespace Microsoft.App.DynamicSessions;

specification/app/Microsoft.App.DynamicSessions/models/code-execution.tsp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import "./common.tsp";
22
using Azure.Core;
3-
using TypeSpec.Http;
43
using TypeSpec.Rest;
54

65
namespace Microsoft.App.DynamicSessions;
@@ -17,7 +16,7 @@ model SessionCodeExecutionRequest {
1716
code: string;
1817

1918
@doc("Code execution timeout in seconds.")
20-
timeoutInSeconds: int64;
19+
timeoutInSeconds: int32;
2120
}
2221

2322
@doc("The result of the code execution.")

specification/app/Microsoft.App.DynamicSessions/models/common.tsp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
import "@azure-tools/typespec-azure-resource-manager";
22

3-
using Azure.Core;
43
using TypeSpec.Http;
5-
using TypeSpec.Rest;
64

75
namespace Microsoft.App.DynamicSessions;
8-
using OpenAPI;
96

107
@doc("The optional execution id header.")
118
model ExecutionOperationIdHeader {
@@ -20,7 +17,7 @@ model SessionIdentifier {
2017
@query
2118
@minLength(1)
2219
@maxLength(256)
23-
@pattern("^[A-Za-z0-9-_]{1,256}$")
20+
@pattern("^[a-zA-Z0-9_|}{\\[\\]\\:\"\";'<>?\\/.,@#$%\\^&*()_\\-+=!~`]{4,128}$")
2421
identifier: string;
2522
}
2623

specification/app/Microsoft.App.DynamicSessions/models/session.tsp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import "./common.tsp";
22
using Azure.Core;
3-
using TypeSpec.Http;
4-
using TypeSpec.Rest;
53
using TypeSpec.Versioning;
64

75
namespace Microsoft.App.DynamicSessions;

specification/app/Microsoft.App.DynamicSessions/models/sessionpool-metadata.tsp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
11
import "./common.tsp";
2-
using Azure.Core;
3-
using TypeSpec.Http;
4-
using TypeSpec.Rest;
52
using TypeSpec.Versioning;
63

74
namespace Microsoft.App.DynamicSessions;

specification/app/data-plane/Microsoft.App.DynamicSessions/preview/2024-10-02-preview/DynamicSessions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -634,7 +634,7 @@
634634
},
635635
"timeoutInSeconds": {
636636
"type": "integer",
637-
"format": "int64",
637+
"format": "int32",
638638
"description": "Code execution timeout in seconds."
639639
}
640640
},
@@ -800,7 +800,7 @@
800800
"type": "string",
801801
"minLength": 1,
802802
"maxLength": 256,
803-
"pattern": "^[A-Za-z0-9-_]{1,256}$",
803+
"pattern": "^[a-zA-Z0-9_|}{\\[\\]\\:\"\";'<>?\\/.,@#$%\\^&*()_\\-+=!~`]{4,128}$",
804804
"x-ms-parameter-location": "method"
805805
},
806806
"SessionResourceFilePathQueryParameter": {

specification/app/data-plane/Microsoft.App.DynamicSessions/preview/2025-02-02-preview/DynamicSessions.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -892,7 +892,7 @@
892892
},
893893
"timeoutInSeconds": {
894894
"type": "integer",
895-
"format": "int64",
895+
"format": "int32",
896896
"description": "Code execution timeout in seconds."
897897
}
898898
},
@@ -1120,7 +1120,7 @@
11201120
"type": "string",
11211121
"minLength": 1,
11221122
"maxLength": 256,
1123-
"pattern": "^[A-Za-z0-9-_]{1,256}$",
1123+
"pattern": "^[a-zA-Z0-9_|}{\\[\\]\\:\"\";'<>?\\/.,@#$%\\^&*()_\\-+=!~`]{4,128}$",
11241124
"x-ms-parameter-location": "method"
11251125
},
11261126
"SessionResourceFilePathQueryParameter": {

0 commit comments

Comments
 (0)