cdklabs / cdklabs/cdk-cloudformation

JSdocs on Query parameter is incorrect

Open
#924 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
66
Forks
5
Avg merge
7d 43m
Merged PRs (30d)
1

Description

```
export interface Query {
/**
* A Datadog metric query for total (valid) events.
*
* @schema Query#Numerator
*/
readonly numerator?: string;

/**
* A Datadog metric query for good events.
*
* @schema Query#Denominator
*/
readonly denominator?: string;
}
```

Here in the docs, it tells us the numerator represents the total events (including good events), and the denominator represents the good events.
However, in the equation, the numerator is the top number, and the denominator is the bottom number in the fraction. In this case, the total events are always greater than the good events; as a result, the result of the equation is always greater than 1, which is incorrect.

Proposed fix
```
export interface Query {
/**
* A Datadog metric query for good events.
*
* @schema Query#Numerator
*/
readonly numerator?: string;

/**
* A Datadog metric query for total (valid) events.
*
* @schema Query#Denominator
*/
readonly denominator?: string;
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.