Skip to content

Commit 59c1166

Browse files
authored
Rename Region description field to name (#923)
1 parent e2ef02e commit 59c1166

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

src/shared/regions/defaultRegionProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,6 @@ function getRegionInfo(endpoints: Endpoints, partitionId: string): RegionInfo[]
8989
function asRegionInfo(region: Region): RegionInfo {
9090
return {
9191
regionCode: region.id,
92-
regionName: region.description
92+
regionName: region.name
9393
}
9494
}

src/shared/regions/endpoints.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,14 @@ export interface Partition {
1919
}
2020

2121
export interface Region {
22+
/**
23+
* Region Code
24+
*/
2225
id: string
23-
description: string
26+
/**
27+
* Friendly Name
28+
*/
29+
name: string
2430
}
2531

2632
export interface Service {
@@ -102,7 +108,7 @@ function convertJsonMap<TIn, TOut>(
102108
function convertToRegion(id: string, region: ManifestRegion): Region {
103109
return {
104110
id: id,
105-
description: region.description
111+
name: region.description
106112
}
107113
}
108114

src/test/shared/regions/defaultRegionProvider.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ describe('DefaultRegionProvider', async () => {
8686
regions: [
8787
{
8888
id: regionCode,
89-
description: ''
89+
name: ''
9090
}
9191
],
9292
services: [

src/test/shared/regions/endpoints.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ describe('loadEndpoints', async () => {
8484
assert.strictEqual(regions.length, 3, 'Unexpected amount of regions loaded')
8585
const region = regions[1]
8686
assert.strictEqual(region.id, 'region2')
87-
assert.strictEqual(region.description, 'aws region two')
87+
assert.strictEqual(region.name, 'aws region two')
8888
})
8989

9090
it('loads services', async () => {

0 commit comments

Comments
 (0)