-
Notifications
You must be signed in to change notification settings - Fork 45
/
lro-parameterized-endpoints.json
133 lines (133 loc) · 3.65 KB
/
lro-parameterized-endpoints.json
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{
"swagger": "2.0",
"info": {
"title": "LRO With Paramaterized Endpoints",
"description": "Test Infrastructure for AutoRest",
"version": "1.0.0"
},
"host": "badhost",
"x-ms-parameterized-host": {
"hostTemplate": "{accountName}{host}",
"positionInOperation": "last",
"parameters": [
{
"name": "accountName",
"description": "Account Name. Pass in 'local' to pass test.",
"required": true,
"type": "string",
"in": "path",
"x-ms-skip-url-encoding": true
},
{
"$ref": "#/parameters/host"
}
]
},
"produces": ["application/json"],
"consumes": ["application/json"],
"paths": {
"/lroParameterizedEndpoints": {
"post": {
"operationId": "pollWithParameterizedEndpoints",
"x-ms-long-running-operation": true,
"x-ms-long-running-operation-options": {
"final-state-via": "location"
},
"description": "Poll with method and client level parameters in endpoint",
"responses": {
"200": {
"description": "Will return string 'success' if polling was a success",
"schema": {
"type": "string"
}
},
"202": {
"description": "Accepted polling request",
"headers": {
"Location": {
"type": "string",
"description": "Url to retrieve the final update resource. Is a relative link"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
},
"/lroConstantParameterizedEndpoints/{constantParameter}": {
"post": {
"operationId": "pollWithConstantParameterizedEndpoints",
"x-ms-long-running-operation": true,
"description": "Poll with method and client level parameters in endpoint, with a constant value",
"parameters": [
{
"name": "constantParameter",
"in": "path",
"required": true,
"enum": ["iAmConstant"],
"type": "string",
"x-ms-enum": {
"name": "ConstantEnum",
"modelAsString": false
},
"description": "Next link for the list operation.",
"x-ms-skip-url-encoding": true
}
],
"responses": {
"200": {
"description": "Will return string 'success' if polling was a success",
"schema": {
"type": "string"
}
},
"202": {
"description": "Accepted polling request",
"headers": {
"Location": {
"type": "string",
"description": "Url to retrieve the final update resource. Is a relative link"
}
}
},
"default": {
"description": "Unexpected error",
"schema": {
"$ref": "#/definitions/Error"
}
}
}
}
}
},
"parameters": {
"host": {
"name": "host",
"description": "A string value that is used as a global part of the parameterized host. Pass in 'host:3000' to pass test.",
"type": "string",
"required": true,
"default": "host",
"in": "path",
"x-ms-skip-url-encoding": true
}
},
"definitions": {
"Error": {
"type": "object",
"properties": {
"status": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
}
}
}
}
}