Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(geo): update amplify config geo schema #13290

Merged
merged 1 commit into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions packages/core/__tests__/parseAmplifyOutputs.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ describe('parseAmplifyOutputs tests', () => {
aws_region: 'us-east-1',
maps: {
items: {
map1: { name: 'map1', style: 'color' },
map1: { style: 'color' },
},
default: 'map1',
},
Expand All @@ -249,7 +249,6 @@ describe('parseAmplifyOutputs tests', () => {
items: {
map1: {
style: 'color',
name: 'map1',
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/singleton/AmplifyOutputs/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export interface AmplifyOutputsStorageProperties {
export interface AmplifyOutputsGeoProperties {
aws_region: string;
maps?: {
items: Record<string, { name: string; style: string }>;
items: Record<string, unknown>;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Option 1(less strict): keep type same as resource config. Similar to other categories

	maps?: {
		items: Record<string, unknown>;
		default: string;
	};

Option 2(more strict): remove name keep existing structure

	maps?: {
		items: Record<string, { style: string }>;
		default: string;
	};

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Going with option1, please feel free to comment otherwise

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason not to go with option 2? Seems like the cleaner solution

Copy link
Member

@ashika112 ashika112 Apr 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason we would want to do that? So the actual resource config itself is less stricter than what we had in outputsConfig and wondering if it would make sense to keep the same (consistency) since this is compiled down to ResourceConfig at the end.

default: string;
};
search_indices?: { items: string[]; default: string };
Expand Down
Loading