doc: construct properties using protected getters not marked in the docs #26079
Labels
@aws-cdk/aws-secretsmanager
Related to AWS Secrets Manager
documentation
This is a problem with documentation.
effort/medium
Medium work item – several days of effort
feature-request
A feature should be added or improved.
p2
Describe the issue
Some examples:
aws-cdk-lib.aws_secretsmanager.Secret,
arnForPolicies
Docs: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.Secret.html#properties (note that
arnForPolicies
is not marked asprotected
anywhere in the table)Specific property (
arnForPolicies
): not noted in the docs for the property either https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_secretsmanager.Secret.html#arnforpoliciesCode: https://github.com/aws/aws-cdk/blob/v2.85.0/packages/aws-cdk-lib/aws-secretsmanager/lib/secret.ts#L452
Usage:
Running with
npx ts-node
gives:aws-cdk-lib.aws_dynamodb.Table,
hasIndex
Docs: https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html#properties (note that
hasIndex
is not marked asprotected
anywhere in the table)Specific property: (
hasIndex
): not noted in the docs for the property either https://docs.aws.amazon.com/cdk/api/v2/docs/aws-cdk-lib.aws_dynamodb.Table.html#hasindexCode: https://github.com/aws/aws-cdk/blob/v2.85.0/packages/aws-cdk-lib/aws-dynamodb/lib/table.ts#L1723
Usage:
Running with
npx ts-node
gives:Probably affects all (or many) of https://github.com/search?q=repo%3Aaws%2Faws-cdk+%22protected+get%22&type=code as the root cause appears to be something in the docs generation.
I think it does make sense for any protected properties (and methods) to be included in the docs, as I might rely on them in a subclass I write, but the docs should mark them as protected, or otherwise make it clear that they aren't public.
Links
And probably all of:
The text was updated successfully, but these errors were encountered: