Skip to content

Commit d1027bf

Browse files
authored
Swagger: Fix sync issue with enterprise (#97696)
* Swagger: Fix sync issue with enterprise * Update swagger guidelines for enterprise endpoints
1 parent b00774f commit d1027bf

File tree

4 files changed

+125
-8
lines changed

4 files changed

+125
-8
lines changed

pkg/api/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ Developers modifying the HTTP API endpoints need to make sure to add the necessa
1212

1313
The following route defines a `PATCH` endpoint under the `/serviceaccounts/{serviceAccountId}` path with tag `service_accounts` (used for grouping together several routes) and operation ID `updateServiceAccount` (used for uniquely identifying routes and associate parameters and response with them).
1414

15+
> For enterprise endpoints make sure you add the `enterprise` tag as well.
16+
1517
```go
1618

1719
// swagger:route PATCH /serviceaccounts/{serviceAccountId} service_accounts updateServiceAccount

public/api-enterprise-spec.json

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2211,6 +2211,113 @@
22112211
}
22122212
}
22132213
},
2214+
"/scim/users/": {
2215+
"get": {
2216+
"tags": [
2217+
"users",
2218+
"enterprise"
2219+
],
2220+
"summary": "Fetches all users in UserSchema format.",
2221+
"operationId": "getUsers",
2222+
"responses": {
2223+
"200": {
2224+
"$ref": "#/responses/getUsers"
2225+
},
2226+
"400": {
2227+
"$ref": "#/responses/badRequestError"
2228+
},
2229+
"401": {
2230+
"$ref": "#/responses/unauthorisedError"
2231+
},
2232+
"404": {
2233+
"$ref": "#/responses/notFoundError"
2234+
},
2235+
"500": {
2236+
"$ref": "#/responses/internalServerError"
2237+
}
2238+
}
2239+
},
2240+
"post": {
2241+
"tags": [
2242+
"users",
2243+
"enterprise"
2244+
],
2245+
"summary": "Creates user.",
2246+
"operationId": "createUser",
2247+
"responses": {
2248+
"200": {
2249+
"$ref": "#/responses/okResponse"
2250+
},
2251+
"400": {
2252+
"$ref": "#/responses/badRequestError"
2253+
},
2254+
"401": {
2255+
"$ref": "#/responses/unauthorisedError"
2256+
},
2257+
"403": {
2258+
"$ref": "#/responses/forbiddenError"
2259+
},
2260+
"409": {
2261+
"$ref": "#/responses/conflictError"
2262+
},
2263+
"500": {
2264+
"$ref": "#/responses/internalServerError"
2265+
}
2266+
}
2267+
},
2268+
"delete": {
2269+
"tags": [
2270+
"user",
2271+
"enterprise"
2272+
],
2273+
"summary": "Deletes user.",
2274+
"operationId": "deleteUser",
2275+
"responses": {
2276+
"200": {
2277+
"$ref": "#/responses/okResponse"
2278+
},
2279+
"400": {
2280+
"$ref": "#/responses/badRequestError"
2281+
},
2282+
"401": {
2283+
"$ref": "#/responses/unauthorisedError"
2284+
},
2285+
"404": {
2286+
"$ref": "#/responses/notFoundError"
2287+
},
2288+
"500": {
2289+
"$ref": "#/responses/internalServerError"
2290+
}
2291+
}
2292+
}
2293+
},
2294+
"/scim/users/:id": {
2295+
"get": {
2296+
"tags": [
2297+
"user",
2298+
"enterprise"
2299+
],
2300+
"summary": "Gets user by id.",
2301+
"operationId": "getUser",
2302+
"responses": {
2303+
"200": {
2304+
"$ref": "#/responses/okResponse"
2305+
},
2306+
"400": {
2307+
"$ref": "#/responses/badRequestError"
2308+
},
2309+
"401": {
2310+
"$ref": "#/responses/unauthorisedError"
2311+
},
2312+
"403": {
2313+
"$ref": "#/responses/forbiddenError"
2314+
},
2315+
"500": {
2316+
"$ref": "#/responses/internalServerError"
2317+
}
2318+
}
2319+
}
2320+
},
22142321
"/teams/{teamId}/groups": {
22152322
"get": {
22162323
"tags": [

public/api-merged.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8609,7 +8609,8 @@
86098609
"/scim/users/": {
86108610
"get": {
86118611
"tags": [
8612-
"users"
8612+
"users",
8613+
"enterprise"
86138614
],
86148615
"summary": "Fetches all users in UserSchema format.",
86158616
"operationId": "getUsers",
@@ -8633,7 +8634,8 @@
86338634
},
86348635
"post": {
86358636
"tags": [
8636-
"users"
8637+
"users",
8638+
"enterprise"
86378639
],
86388640
"summary": "Creates user.",
86398641
"operationId": "createUser",
@@ -8660,7 +8662,8 @@
86608662
},
86618663
"delete": {
86628664
"tags": [
8663-
"user"
8665+
"user",
8666+
"enterprise"
86648667
],
86658668
"summary": "Deletes user.",
86668669
"operationId": "deleteUser",
@@ -8686,7 +8689,8 @@
86868689
"/scim/users/:id": {
86878690
"get": {
86888691
"tags": [
8689-
"user"
8692+
"user",
8693+
"enterprise"
86908694
],
86918695
"summary": "Gets user by id.",
86928696
"operationId": "getUser",

public/openapi3.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22639,7 +22639,8 @@
2263922639
},
2264022640
"summary": "Deletes user.",
2264122641
"tags": [
22642-
"user"
22642+
"user",
22643+
"enterprise"
2264322644
]
2264422645
},
2264522646
"get": {
@@ -22663,7 +22664,8 @@
2266322664
},
2266422665
"summary": "Fetches all users in UserSchema format.",
2266522666
"tags": [
22666-
"users"
22667+
"users",
22668+
"enterprise"
2266722669
]
2266822670
},
2266922671
"post": {
@@ -22690,7 +22692,8 @@
2269022692
},
2269122693
"summary": "Creates user.",
2269222694
"tags": [
22693-
"users"
22695+
"users",
22696+
"enterprise"
2269422697
]
2269522698
}
2269622699
},
@@ -22716,7 +22719,8 @@
2271622719
},
2271722720
"summary": "Gets user by id.",
2271822721
"tags": [
22719-
"user"
22722+
"user",
22723+
"enterprise"
2272022724
]
2272122725
}
2272222726
},

0 commit comments

Comments
 (0)