@@ -139,93 +139,98 @@ function postProcess() {
139
139
}
140
140
141
141
function updateCloudV2 {
142
- outFile=" cloud/v2/ref.yml"
142
+ outFile=" influxdb/ cloud/v2/ref.yml"
143
143
if [[ -z " $baseUrl " ]];
144
144
then
145
145
echo " Using existing $outFile "
146
146
else
147
147
curl $UPDATE_OPTIONS ${baseUrl} /contracts/ref/cloud.yml -o $outFile
148
148
fi
149
- postProcess $outFile ' cloud/.config.yml' v2@2
149
+ postProcess $outFile ' influxdb/ cloud/.config.yml' v2@2
150
150
}
151
151
152
152
function updateCloudDedicatedManagement {
153
- outFile=" cloud-dedicated/management/openapi.yml"
153
+ outFile=" influxdb3/ cloud-dedicated/management/openapi.yml"
154
154
if [[ -z " $baseUrl " ]];
155
155
then
156
156
echo " Using existing $outFile "
157
157
else
158
- curl $UPDATE_OPTIONS https://raw.githubusercontent.com/influxdata/granite/ab7ee2aceacfae7f415d15ffbcf8c9d0f6f3e015/openapi.yaml -o $outFile
158
+ # Clone influxdata/granite and fetch the latest openapi.yaml file.
159
+ echo " Fetching the latest openapi.yaml file from influxdata/granite"
160
+ tmp_dir=$( mktemp -d)
161
+ git clone --depth 1 --branch main https://github.com/influxdata/granite.git " $tmp_dir "
162
+ cp " $tmp_dir /openapi.yaml" " $outFile "
163
+ rm -rf " $tmp_dir "
159
164
fi
160
- postProcess $outFile ' cloud-dedicated/.config.yml' management@0
165
+ postProcess $outFile ' influxdb3/ cloud-dedicated/.config.yml' management@0
161
166
}
162
167
163
168
function updateCloudDedicatedV2 {
164
- outFile=" cloud-dedicated/v2/ref.yml"
169
+ outFile=" influxdb3/ cloud-dedicated/v2/ref.yml"
165
170
if [[ -z " $baseUrl " ]];
166
171
then
167
172
echo " Using existing $outFile "
168
173
else
169
174
curl $UPDATE_OPTIONS ${baseUrl} /contracts/ref/cloud.yml -o $outFile
170
175
fi
171
- postProcess $outFile ' cloud-dedicated/.config.yml' v2@2
176
+ postProcess $outFile ' influxdb3/ cloud-dedicated/.config.yml' v2@2
172
177
}
173
178
174
179
function updateClusteredV2 {
175
- outFile=" clustered/v2/ref.yml"
180
+ outFile=" influxdb3/ clustered/v2/ref.yml"
176
181
if [[ -z " $baseUrl " ]];
177
182
then
178
183
echo " Using existing $outFile "
179
184
else
180
185
curl $UPDATE_OPTIONS ${baseUrl} /contracts/ref/cloud.yml -o $outFile
181
186
fi
182
- postProcess $outFile ' clustered/.config.yml' v2@2
187
+ postProcess $outFile ' influxdb3/ clustered/.config.yml' v2@2
183
188
}
184
189
185
190
function updateCloudServerlessV2 {
186
- outFile=" cloud-serverless/v2/ref.yml"
191
+ outFile=" influxdb3/ cloud-serverless/v2/ref.yml"
187
192
if [[ -z " $baseUrl " ]];
188
193
then
189
194
echo " Using existing $outFile "
190
195
else
191
196
curl $UPDATE_OPTIONS ${baseUrl} /contracts/ref/cloud.yml -o $outFile
192
197
fi
193
- postProcess $outFile ' cloud-serverless/.config.yml' v2@2
198
+ postProcess $outFile ' influxdb3/ cloud-serverless/.config.yml' v2@2
194
199
}
195
200
196
201
function updateOSSV2 {
197
- outFile=" v2/ref.yml"
202
+ outFile=" influxdb/ v2/ref.yml"
198
203
if [[ -z " $baseUrlOSS " ]];
199
204
then
200
205
echo " Using existing $outFile "
201
206
else
202
207
curl $UPDATE_OPTIONS ${baseUrlOSS} /contracts/ref/oss.yml -o $outFile
203
208
fi
204
- postProcess $outFile ' v2/.config.yml' ' @2'
209
+ postProcess $outFile ' influxdb/ v2/.config.yml' ' @2'
205
210
}
206
211
207
212
function updateV1Compat {
208
- outFile=" cloud/v1-compatibility/swaggerV1Compat.yml"
213
+ outFile=" influxdb/ cloud/v1-compatibility/swaggerV1Compat.yml"
209
214
if [[ -z " $baseUrl " ]];
210
215
then
211
216
echo " Using existing $outFile "
212
217
else
213
218
curl $UPDATE_OPTIONS ${baseUrl} /contracts/swaggerV1Compat.yml -o $outFile
214
219
fi
215
- postProcess $outFile ' cloud/.config.yml' ' v1-compatibility'
220
+ postProcess $outFile ' influxdb/ cloud/.config.yml' ' v1-compatibility'
216
221
217
- outFile=" v2/v1-compatibility/swaggerV1Compat.yml"
222
+ outFile=" influxdb/ v2/v1-compatibility/swaggerV1Compat.yml"
218
223
cp cloud/v1-compatibility/swaggerV1Compat.yml $outFile
219
- postProcess $outFile ' v2/.config.yml' ' v1-compatibility'
224
+ postProcess $outFile ' influxdb/ v2/.config.yml' ' v1-compatibility'
220
225
221
- outFile=" cloud-dedicated/v1-compatibility/swaggerV1Compat.yml"
222
- postProcess $outFile ' cloud-dedicated/.config.yml' ' v1-compatibility'
226
+ outFile=" influxdb3/ cloud-dedicated/v1-compatibility/swaggerV1Compat.yml"
227
+ postProcess $outFile ' influxdb3/ cloud-dedicated/.config.yml' ' v1-compatibility'
223
228
224
- outFile=" cloud-serverless/v1-compatibility/swaggerV1Compat.yml"
225
- postProcess $outFile ' cloud-serverless/.config.yml' ' v1-compatibility'
229
+ outFile=" influxdb3/ cloud-serverless/v1-compatibility/swaggerV1Compat.yml"
230
+ postProcess $outFile ' influxdb3/ cloud-serverless/.config.yml' ' v1-compatibility'
226
231
227
- outFile=" clustered/v1-compatibility/swaggerV1Compat.yml"
228
- postProcess $outFile ' clustered/.config.yml' ' v1-compatibility'
232
+ outFile=" influxdb3/ clustered/v1-compatibility/swaggerV1Compat.yml"
233
+ postProcess $outFile ' influxdb3/ clustered/.config.yml' ' v1-compatibility'
229
234
}
230
235
231
236
UPDATE_OPTIONS=" --fail"
0 commit comments