@@ -155,7 +155,7 @@ export class APIGatewayService extends AbstractService {
155155 * @returns {String }
156156 */
157157 get stageName ( ) {
158- return this . env ;
158+ return this . property . apiVersion ;
159159 }
160160
161161 /**
@@ -253,11 +253,12 @@ export class APIGatewayService extends AbstractService {
253253 this . _config . api . id ,
254254 this . _config . api . resources ,
255255 this . _config . api . role
256- ) ( ( methods , integrations , rolePolicy , deployedApi , authorizer ) => {
256+ ) ( ( methods , integrations , rolePolicy , apiStage , authorizer ) => {
257257 this . _config . api . methods = methods ;
258258 this . _config . api . integrations = integrations ;
259259 this . _config . api . rolePolicy = rolePolicy ;
260- this . _config . api . deployedApi = deployedApi ;
260+ this . _config . api . stages = this . _config . api . stages || { } ;
261+ this . _config . api . stages [ this . stageName ] = apiStage ;
261262 this . _config . api . authorizer = authorizer ;
262263
263264 // generate cloud watch log group name for deployed API Gateway
@@ -388,10 +389,10 @@ export class APIGatewayService extends AbstractService {
388389 this . _addPolicyToApiRole ( apiRole , ( data ) => {
389390 rolePolicy = data ;
390391
391- this . _deployApi ( apiId , ( deployedApi ) => {
392+ this . _deployApi ( apiId , ( apiStage ) => {
392393
393394 this . _updateStage ( apiId , this . stageName , apiRole , this . apiConfig , ( data ) => {
394- callback ( methods , integrations , rolePolicy , deployedApi , authorizer ) ;
395+ callback ( methods , integrations , rolePolicy , apiStage , authorizer ) ;
395396 } ) ;
396397 } ) ;
397398 } ) ;
@@ -564,7 +565,7 @@ export class APIGatewayService extends AbstractService {
564565 stageName : this . stageName ,
565566 cacheClusterEnabled : this . apiConfig . cache . enabled ,
566567 cacheClusterSize : this . apiConfig . cache . clusterSize ,
567- stageDescription : `Stage for "${ this . env } " environment` ,
568+ stageDescription : `Stage for "${ this . env } / ${ this . stageName } " environment` ,
568569 description : `Deployed on ${ new Date ( ) . toTimeString ( ) } ` ,
569570 } ;
570571
0 commit comments