@@ -263,15 +263,18 @@ const prepareInputs = async (instance, credentials, inputs = {}) => {
263
263
? inputs . apigwConfig
264
264
: { }
265
265
const apigatewayConf = Object . assign ( tempApigwConf , {
266
- serviceId : inputs . serviceId ,
266
+ serviceId : inputs . serviceId || tempApigwConf . serviceId ,
267
267
region : regionList ,
268
268
isDisabled : tempApigwConf . isDisabled === true ,
269
269
fromClientRemark : fromClientRemark ,
270
- serviceName : inputs . serviceName || getDefaultServiceName ( instance ) ,
271
- description : tempApigwConf . description || getDefaultServiceDescription ( instance ) ,
270
+ serviceName : inputs . serviceName || tempApigwConf . serviceName || getDefaultServiceName ( instance ) ,
271
+ serviceDesc : tempApigwConf . serviceDesc || getDefaultServiceDescription ( instance ) ,
272
272
protocols : tempApigwConf . protocols || [ 'http' ] ,
273
273
environment : tempApigwConf . environment ? tempApigwConf . environment : 'release' ,
274
- endpoints : [
274
+ customDomains : tempApigwConf . customDomains || [ ]
275
+ } )
276
+ if ( ! apigatewayConf . endpoints ) {
277
+ apigatewayConf . endpoints = [
275
278
{
276
279
path : tempApigwConf . path || '/' ,
277
280
enableCORS : tempApigwConf . enableCORS ,
@@ -286,9 +289,8 @@ const prepareInputs = async (instance, credentials, inputs = {}) => {
286
289
( tempApigwConf . function && tempApigwConf . function . functionQualifier ) || '$LATEST'
287
290
}
288
291
}
289
- ] ,
290
- customDomains : tempApigwConf . customDomains || [ ]
291
- } )
292
+ ]
293
+ }
292
294
if ( tempApigwConf . usagePlan ) {
293
295
apigatewayConf . endpoints [ 0 ] . usagePlan = {
294
296
usagePlanId : tempApigwConf . usagePlan . usagePlanId ,
0 commit comments