-
Notifications
You must be signed in to change notification settings - Fork 5.2k
/
Copy pathmain.tsp
50 lines (45 loc) · 1.15 KB
/
main.tsp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
import "@typespec/rest";
import "@typespec/http";
import "@azure-tools/typespec-azure-core";
import "./DevBox/routes.tsp";
import "./DevCenter/routes.tsp";
import "./Environments/routes.tsp";
using Azure.Core;
using TypeSpec.Versioning;
using TypeSpec.Rest;
using TypeSpec.Http;
@useAuth(
OAuth2Auth<[
{
type: OAuth2FlowType.implicit,
authorizationUrl: "https://login.microsoftonline.com/common/oauth2/authorize",
scopes: ["https://devcenter.azure.com/.default"],
}
]>
)
@service({
title: "DevCenter",
})
@server(
"{endpoint}",
"DevCenter service",
{
@doc("The DevCenter-specific URI to operate on.")
endpoint: url,
}
)
@doc("DevCenter service")
@versioned(APIVersions)
namespace DevCenterService;
@doc("DevCenter API versions")
enum APIVersions {
@doc("The 2023-04-01 service API version")
@useDependency(Versions.v1_0_Preview_2)
v2023_04_01: "2023-04-01",
@doc("The 2024-02-01 service API version")
@useDependency(Versions.v1_0_Preview_2)
v2024_02_01: "2024-02-01",
@doc("The 2024-05-01-preview service API version")
@useDependency(Versions.v1_0_Preview_2)
v2024_05_01_preview: "2024-05-01-preview",
}