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

Add a name property to error structures #95

Merged
merged 1 commit into from
Jan 13, 2020
Merged

Conversation

kstich
Copy link
Contributor

@kstich kstich commented Jan 13, 2020

Fixes #94

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kstich kstich requested a review from mtdowling January 13, 2020 20:41
@@ -158,6 +158,7 @@ private void renderErrorStructure() {

writer.openBlock("export interface $L extends $L {", symbol.getName(), extendsFrom);
writer.write("__type: $S;", shape.getId().getName());
writer.write("name: $S;", shape.getId().getName());
Copy link
Member

Choose a reason for hiding this comment

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

I thought we were just special casing exceptions. Why is this needed on all structures? Why would we need this and __type?

Copy link
Contributor Author

@kstich kstich Jan 13, 2020

Choose a reason for hiding this comment

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

This is in the code for exception structures renderErrorStructure, as to the why we have both I think that's #92.

Copy link
Member

Choose a reason for hiding this comment

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

Ok. This needs to be addressed in a followup PR.

Copy link
Contributor

Choose a reason for hiding this comment

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

Issue created for removing __type #96

Copy link
Member

@mtdowling mtdowling left a comment

Choose a reason for hiding this comment

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

TODO: address the duplicative __type and name properties.

@kstich kstich merged commit 9f5ca92 into master Jan 13, 2020
@kstich kstich deleted the add_error_name_property branch January 13, 2020 21:04
trivikr added a commit to trivikr/aws-sdk-js-v3 that referenced this pull request Jan 13, 2020
trivikr added a commit to aws/aws-sdk-js-v3 that referenced this pull request Jan 13, 2020
AllanZhengYP pushed a commit to AllanZhengYP/aws-sdk-js-v3 that referenced this pull request Mar 20, 2020
trivikr added a commit to trivikr/aws-sdk-js-v3 that referenced this pull request Mar 20, 2020
trivikr added a commit to trivikr/aws-sdk-js-v3 that referenced this pull request Mar 24, 2020
trivikr added a commit to trivikr/aws-sdk-js-v3 that referenced this pull request Mar 24, 2020
srchase pushed a commit that referenced this pull request Mar 23, 2023
* Adds API Gateway Middleware. Adds method to define custom middleware. Adds support for MiddlewareDefinitions
srchase pushed a commit that referenced this pull request Jun 16, 2023
* Adds API Gateway Middleware. Adds method to define custom middleware. Adds support for MiddlewareDefinitions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add name to exceptions in models/index.ts
3 participants