Skip to content

fix(cloud-assembly-schema): add a valid example for CcApiContextQuery#538

Merged
rix0rrr merged 2 commits intomainfrom
huijbers/compiling-example
May 27, 2025
Merged

fix(cloud-assembly-schema): add a valid example for CcApiContextQuery#538
rix0rrr merged 2 commits intomainfrom
huijbers/compiling-example

Conversation

@rix0rrr
Copy link
Copy Markdown
Contributor

@rix0rrr rix0rrr commented May 27, 2025

This type is being exposed as-is in the CDK library, by copying it into the public API surface. It therefore gets processed by jsii, and examples get generated for it.

Because we don't have an example for this type and jsii cannot express string literal types, the automatically generated example is based off the type string and looks like this:

{
  expectedMatchCount: 'expectedMatchCount',
}

This example does not compile because the generated value does not conform to the actual declared type.

To solve this, we add a valid example here into the base code.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license

This type is being exposed as-is in the CDK library, by copying it into
the public API surface. It therefore gets processed by jsii, and
examples get generated for it.

Because we don't have an example for this type and jsii cannot express
string literal types, the automatically generated example is based
off the type `string` and looks like this:

```ts
{
  expectedMatchCount: 'expectedMatchCount',
}
```

This example does not compile because the generated value does not
conform to the actual declared type.

To solve this, we add a valid example here into the base code.
@rix0rrr rix0rrr requested a review from a team May 27, 2025 07:36
@github-actions github-actions bot added the p2 label May 27, 2025
@rix0rrr rix0rrr disabled auto-merge May 27, 2025 07:36
@aws-cdk-automation aws-cdk-automation requested a review from a team May 27, 2025 07:37
Signed-off-by: github-actions <github-actions@github.com>
@codecov-commenter
Copy link
Copy Markdown

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.88%. Comparing base (70128c0) to head (bbd0c2f).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #538      +/-   ##
==========================================
- Coverage   79.01%   78.88%   -0.13%     
==========================================
  Files          47       47              
  Lines        7032     7032              
  Branches      786      780       -6     
==========================================
- Hits         5556     5547       -9     
- Misses       1458     1467       +9     
  Partials       18       18              
Flag Coverage Δ
suite.unit 78.88% <ø> (-0.13%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@rix0rrr rix0rrr added this pull request to the merge queue May 27, 2025
Merged via the queue into main with commit 65937a2 May 27, 2025
21 checks passed
@rix0rrr rix0rrr deleted the huijbers/compiling-example branch May 27, 2025 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants