influxdata / influxdata/openapi

schema/TelegramNotificationRuleBase - property channel listed as required is not defined

Open
#560 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
18
Forks
9
PR merge metrics
No merged PRs in 30d

Description

The property `channel` listed as _required_ is not listed under property definitions.

__TelegramNotificationRuleBase.yml__

```
type: object
required: [type, messageTemplate, channel]
properties:
type:
description: The discriminator between other types of notification rules is "telegram".
type: string
enum: [telegram]
messageTemplate:
description: The message template as a flux interpolated string.
type: string
parseMode:
description: Parse mode of the message text per https://core.telegram.org/bots/api#formatting-options. Defaults to "MarkdownV2".
type: string
enum:
- MarkdownV2
- HTML
- Markdown
disableWebPagePreview:
description: Disables preview of web links in the sent messages when "true". Defaults to "false".
type: boolean
```
BTW: if the connection and sending of a notification is handled by the NotificationEndpoint defined as `endpointID` in NotificationRuleBase.yml, is it necessary to have the connection defining properties defined in the rule?

NOTE: In the flux documentation the `telegram.message` function signature includes a channel argument.
https://docs.influxdata.com/flux/v0.x/stdlib/contrib/sranka/telegram/message/

channel
text
token
?disableWebPagePreview
?parseMode
?silent
?url

Latest commit in openapi

```
commit ad64ba87e7dd666feb80bbb85d1757b3d290d6c3 (HEAD -> master, origin/master, origin/HEAD)
Author: wiedld
Date: Thu Sep 22 10:01:37 2022 -0700
```

Testing in K8SIDPE - latest commit
```
commit d3c2922e6c43cc6d7708a1622d6d2d7b1943b769 (HEAD -> master, origin/master, origin/HEAD)
Author: influx-acs[bot] <107396960+influx-acs[bot]@users.noreply.github.com>
Date: Tue Sep 27 01:45:24 2022 +0000
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with TelegramNotificationRuleBase.yml and compare its required and properties sections, then read NotificationRuleBase.yml to check how endpointID is modeled. Verify the intended channel and connection fields against the referenced Flux telegram.message signature; done means the schema is internally consistent and the OpenAPI validation passes.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi, yaml
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.