Skip to content

chore: remove contents from json deserializeStructure #1179

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

Merged
merged 2 commits into from
May 13, 2020

Conversation

trivikr
Copy link
Member

@trivikr trivikr commented May 13, 2020

Issue #, if available:
Similar to #1153

Description of changes:
remove contents from json deserializeStructure

Before:

const deserializeAws_restJson1_1AnalyzedResourceSummary = (
  output: any,
  context: __SerdeContext
): AnalyzedResourceSummary => {
  let contents: any = {
    __type: "AnalyzedResourceSummary",
    resourceArn: undefined,
    resourceType: undefined
  };
  if (output.resourceArn !== undefined && output.resourceArn !== null) {
    contents.resourceArn = output.resourceArn;
  }
  if (output.resourceType !== undefined && output.resourceType !== null) {
    contents.resourceType = output.resourceType;
  }
  return contents;
}

After:

const deserializeAws_restJson1_1AnalyzedResourceSummary = (
  output: any,
  context: __SerdeContext
): AnalyzedResourceSummary => {
  return {
    __type: "AnalyzedResourceSummary",
    resourceArn:
      output.resourceArn !== undefined && output.resourceArn !== null
        ? output.resourceArn
        : undefined,
    resourceType:
      output.resourceType !== undefined && output.resourceType !== null
        ? output.resourceType
        : undefined
  } as any;
}

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

@aws-sdk-js-automation
Copy link

AWS CodeBuild CI Report

  • CodeBuild project: sdk-staging-test
  • Commit ID: 9ff100a
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@codecov-io
Copy link

Codecov Report

Merging #1179 into master will decrease coverage by 0.16%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1179      +/-   ##
==========================================
- Coverage   73.69%   73.52%   -0.17%     
==========================================
  Files         285      285              
  Lines       12549    12497      -52     
  Branches     2814     2892      +78     
==========================================
- Hits         9248     9189      -59     
- Misses       3301     3308       +7     
Impacted Files Coverage Δ
protocol_tests/aws-json/protocols/Aws_json1_1.ts 68.73% <ø> (+0.36%) ⬆️
...ol_tests/aws-restjson/protocols/Aws_restJson1_1.ts 63.47% <ø> (-1.09%) ⬇️
...rotocol_tests/aws-restxml/protocols/Aws_restXml.ts 67.31% <ø> (-0.50%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f820e6...9ff100a. Read the comment docs.

@trivikr trivikr merged commit 54ec57b into aws:master May 13, 2020
@trivikr trivikr deleted the remove-contents-json-deserializeStructure branch May 13, 2020 16:55
@lock
Copy link

lock bot commented May 20, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@lock lock bot locked as resolved and limited conversation to collaborators May 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants