Skip to content

aws-lambda: Unclosed code-bock in Function.addAlias hides Function.addEnvironment documentation #20623

@huonw

Description

@huonw

Describe the issue

The Function docs are currently corrupted by addAlias's example code block not being closed, and this infects surrounding docs, in particular the addEnvironment method:

* ```ts
* declare const fn: lambda.Function;
*
* fn.addAlias('Live');
*
* // Is equivalent to
*
* new lambda.Alias(this, 'AliasLive', {
* aliasName: 'Live',
* version: fn.currentVersion,
* });
*
* @param aliasName The name of the alias

image

More broadly that this specific instance, it seems like a unclosed code block in a single method should never escape into surrounding docs, and either be an error, or be automatically closed in the method it's attached to (so as to contain the 'damage').

Links

https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_lambda.Function.html#addwbraliasaliasname-options

Metadata

Metadata

Assignees

No one assigned

    Labels

    @aws-cdk/aws-lambdaRelated to AWS LambdadocumentationThis is a problem with documentation.effort/smallSmall work item – less than a day of effortgood first issueRelated to contributions. See CONTRIBUTING.mdp2

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions