You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
*`/usr/local/Cellar/swagger-codegen/2.2.3/libexec/swagger-codegen-cli.jar`: the Swagger Codegen CLI path on OS X. This can be vary on different OSs and with different installs. You can read more about this at [Swagger Codegen CLI Installation](https://github.com/swagger-api/swagger-codegen#table-of-contents).
43
43
*`javascript_api_client`: the destination folder for the generated client. This is also can be vary based on your decision.
44
44
45
-
## Fix basePath in the generated Swagger YML
46
-
Change `basePath: "/api"` to `basePath: "/cb/api"` at [/api/swagger.yaml](api/swagger.yaml).
45
+
## Upgrade Swagger YML
46
+
47
+
### Base Path
48
+
Change `basePath: "/api"` to `basePath: "/cb"` at [/api/swagger.yaml](api/swagger.yaml).
49
+
50
+
### New Info and Health Services
51
+
Introduce brand new Services for Cloudbreak Info and Health.
52
+
53
+
1. In the `tags` section:
54
+
```
55
+
tags:
56
+
- name: "info"
57
+
- name: "health"
58
+
```
59
+
2. In the beginning of the `paths`:
60
+
```
61
+
paths:
62
+
/info:
63
+
get:
64
+
tags:
65
+
- "info"
66
+
summary: "retrieve Cloudbreak version for user"
67
+
description: "Cloudbreak version information."
68
+
operationId: "getCloudbreakInfo"
69
+
schemes:
70
+
- "http"
71
+
- "https"
72
+
consumes:
73
+
- "application/json"
74
+
produces:
75
+
- "application/json"
76
+
parameters: []
77
+
responses:
78
+
200:
79
+
description: "successful operation"
80
+
schema:
81
+
$ref: "#/definitions/Info"
82
+
x-swagger-router-controller: "Info"
83
+
/health:
84
+
get:
85
+
tags:
86
+
- "health"
87
+
summary: "retrieve Cloudbreak server status for user"
88
+
description: "Cloudbreak server status."
89
+
operationId: "getCloudbreakHealth"
90
+
schemes:
91
+
- "http"
92
+
- "https"
93
+
consumes:
94
+
- "application/json"
95
+
produces:
96
+
- "application/json"
97
+
parameters: []
98
+
responses:
99
+
200:
100
+
description: "successful operation"
101
+
schema:
102
+
$ref: "#/definitions/Info"
103
+
x-swagger-router-controller: "Info"
104
+
```
105
+
3. In the end of `definitions`:
106
+
```
107
+
definitions:
108
+
```
109
+
...
110
+
```
111
+
Info:
112
+
type: "object"
113
+
```
114
+
115
+
### Extend Paths
116
+
Exend all the `paths:` with `/api`, for example change `/v1/accountpreferences/isplatformselectiondisabled:` to `/api/v1/accountpreferences/isplatformselectiondisabled:`
47
117
48
118
## Provide responses to all the needed Services
49
-
Here is an example for `V1credentialsService.js`:
119
+
Introduce brand new Services for Cloudbreak Info and Health here as well. The new files should be [Info.js](controllers/Info.js) and [InfoService.js](controllers/InfoService.js).
120
+
121
+
For existing services here is an example for `V1credentialsService.js`:
0 commit comments