From 1e4a4e98a8fdc4a4a71cb52bb9824e1a84344999 Mon Sep 17 00:00:00 2001 From: ST Date: Fri, 23 Aug 2024 16:39:53 +0530 Subject: [PATCH] fix(assertions): misformatted doc string causes generated docs to cut off information #27392 --- .../aws-cdk-lib/assertions/lib/annotations.ts | 18 +++++++++--------- .../aws-cdk-lib/assertions/lib/template.ts | 16 ++++++++-------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/packages/aws-cdk-lib/assertions/lib/annotations.ts b/packages/aws-cdk-lib/assertions/lib/annotations.ts index 08f9b75f95f47..97797eb356f6d 100644 --- a/packages/aws-cdk-lib/assertions/lib/annotations.ts +++ b/packages/aws-cdk-lib/assertions/lib/annotations.ts @@ -25,7 +25,7 @@ export class Annotations { /** * Assert that an error with the given message exists in the synthesized CDK `Stack`. * - * @param constructPath the construct path to the error. Provide `'*'` to match all errors in the template. + * @param constructPath the construct path to the error, provide `'*'` to match all errors in the template. * @param message the error message as should be expected. This should be a string or Matcher object. */ public hasError(constructPath: string, message: any): void { @@ -38,7 +38,7 @@ export class Annotations { /** * Assert that an error with the given message does not exist in the synthesized CDK `Stack`. * - * @param constructPath the construct path to the error. Provide `'*'` to match all errors in the template. + * @param constructPath the construct path to the error, provide `'*'` to match all errors in the template. * @param message the error message as should be expected. This should be a string or Matcher object. */ public hasNoError(constructPath: string, message: any): void { @@ -51,7 +51,7 @@ export class Annotations { /** * Get the set of matching errors of a given construct path and message. * - * @param constructPath the construct path to the error. Provide `'*'` to match all errors in the template. + * @param constructPath the construct path to the error, provide `'*'` to match all errors in the template. * @param message the error message as should be expected. This should be a string or Matcher object. */ public findError(constructPath: string, message: any): SynthesisMessage[] { @@ -61,7 +61,7 @@ export class Annotations { /** * Assert that an warning with the given message exists in the synthesized CDK `Stack`. * - * @param constructPath the construct path to the warning. Provide `'*'` to match all warnings in the template. + * @param constructPath the construct path to the warning, provide `'*'` to match all warnings in the template. * @param message the warning message as should be expected. This should be a string or Matcher object. */ public hasWarning(constructPath: string, message: any): void { @@ -74,7 +74,7 @@ export class Annotations { /** * Assert that an warning with the given message does not exist in the synthesized CDK `Stack`. * - * @param constructPath the construct path to the warning. Provide `'*'` to match all warnings in the template. + * @param constructPath the construct path to the warning, provide `'*'` to match all warnings in the template. * @param message the warning message as should be expected. This should be a string or Matcher object. */ public hasNoWarning(constructPath: string, message: any): void { @@ -87,7 +87,7 @@ export class Annotations { /** * Get the set of matching warning of a given construct path and message. * - * @param constructPath the construct path to the warning. Provide `'*'` to match all warnings in the template. + * @param constructPath the construct path to the warning, provide `'*'` to match all warnings in the template. * @param message the warning message as should be expected. This should be a string or Matcher object. */ public findWarning(constructPath: string, message: any): SynthesisMessage[] { @@ -97,7 +97,7 @@ export class Annotations { /** * Assert that an info with the given message exists in the synthesized CDK `Stack`. * - * @param constructPath the construct path to the info. Provide `'*'` to match all info in the template. + * @param constructPath the construct path to the info, provide `'*'` to match all info in the template. * @param message the info message as should be expected. This should be a string or Matcher object. */ public hasInfo(constructPath: string, message: any): void { @@ -110,7 +110,7 @@ export class Annotations { /** * Assert that an info with the given message does not exist in the synthesized CDK `Stack`. * - * @param constructPath the construct path to the info. Provide `'*'` to match all info in the template. + * @param constructPath the construct path to the info, provide `'*'` to match all info in the template. * @param message the info message as should be expected. This should be a string or Matcher object. */ public hasNoInfo(constructPath: string, message: any): void { @@ -123,7 +123,7 @@ export class Annotations { /** * Get the set of matching infos of a given construct path and message. * - * @param constructPath the construct path to the info. Provide `'*'` to match all infos in the template. + * @param constructPath the construct path to the info, provide `'*'` to match all infos in the template. * @param message the info message as should be expected. This should be a string or Matcher object. */ public findInfo(constructPath: string, message: any): SynthesisMessage[] { diff --git a/packages/aws-cdk-lib/assertions/lib/template.ts b/packages/aws-cdk-lib/assertions/lib/template.ts index 7395aa469e212..fc219f9756633 100644 --- a/packages/aws-cdk-lib/assertions/lib/template.ts +++ b/packages/aws-cdk-lib/assertions/lib/template.ts @@ -168,7 +168,7 @@ export class Template { * Assert that a Parameter with the given properties exists in the CloudFormation template. * By default, performs partial matching on the parameter, via the `Match.objectLike()`. * To configure different behavior, use other matchers in the `Match` class. - * @param logicalId the name of the parameter. Provide `'*'` to match all parameters in the template. + * @param logicalId the name of the parameter, provide `'*'` to match all parameters in the template. * @param props the parameter as should be expected in the template. */ public hasParameter(logicalId: string, props: any): void { @@ -180,7 +180,7 @@ export class Template { /** * Get the set of matching Parameters that match the given properties in the CloudFormation template. - * @param logicalId the name of the parameter. Provide `'*'` to match all parameters in the template. + * @param logicalId the name of the parameter, provide `'*'` to match all parameters in the template. * @param props by default, matches all Parameters in the template. * When a literal object is provided, performs a partial match via `Match.objectLike()`. * Use the `Match` APIs to configure a different behaviour. @@ -193,7 +193,7 @@ export class Template { * Assert that an Output with the given properties exists in the CloudFormation template. * By default, performs partial matching on the resource, via the `Match.objectLike()`. * To configure different behavior, use other matchers in the `Match` class. - * @param logicalId the name of the output. Provide `'*'` to match all outputs in the template. + * @param logicalId the name of the output, provide `'*'` to match all outputs in the template. * @param props the output as should be expected in the template. */ public hasOutput(logicalId: string, props: any): void { @@ -205,7 +205,7 @@ export class Template { /** * Get the set of matching Outputs that match the given properties in the CloudFormation template. - * @param logicalId the name of the output. Provide `'*'` to match all outputs in the template. + * @param logicalId the name of the output, provide `'*'` to match all outputs in the template. * @param props by default, matches all Outputs in the template. * When a literal object is provided, performs a partial match via `Match.objectLike()`. * Use the `Match` APIs to configure a different behaviour. @@ -218,7 +218,7 @@ export class Template { * Assert that a Mapping with the given properties exists in the CloudFormation template. * By default, performs partial matching on the resource, via the `Match.objectLike()`. * To configure different behavior, use other matchers in the `Match` class. - * @param logicalId the name of the mapping. Provide `'*'` to match all mappings in the template. + * @param logicalId the name of the mapping, provide `'*'` to match all mappings in the template. * @param props the output as should be expected in the template. */ public hasMapping(logicalId: string, props: any): void { @@ -230,7 +230,7 @@ export class Template { /** * Get the set of matching Mappings that match the given properties in the CloudFormation template. - * @param logicalId the name of the mapping. Provide `'*'` to match all mappings in the template. + * @param logicalId the name of the mapping, provide `'*'` to match all mappings in the template. * @param props by default, matches all Mappings in the template. * When a literal object is provided, performs a partial match via `Match.objectLike()`. * Use the `Match` APIs to configure a different behaviour. @@ -243,7 +243,7 @@ export class Template { * Assert that a Condition with the given properties exists in the CloudFormation template. * By default, performs partial matching on the resource, via the `Match.objectLike()`. * To configure different behavior, use other matchers in the `Match` class. - * @param logicalId the name of the mapping. Provide `'*'` to match all conditions in the template. + * @param logicalId the name of the mapping, provide `'*'` to match all conditions in the template. * @param props the output as should be expected in the template. */ public hasCondition(logicalId: string, props: any): void { @@ -255,7 +255,7 @@ export class Template { /** * Get the set of matching Conditions that match the given properties in the CloudFormation template. - * @param logicalId the name of the condition. Provide `'*'` to match all conditions in the template. + * @param logicalId the name of the condition, provide `'*'` to match all conditions in the template. * @param props by default, matches all Conditions in the template. * When a literal object is provided, performs a partial match via `Match.objectLike()`. * Use the `Match` APIs to configure a different behaviour.