influxdata / influxdata/openapi
schema/HTTPNotificationRuleBase - url property ignored in request
- Dominant language
- Shell
- Stars
- 18
- Forks
- 9
- PR merge metrics
- No merged PRs in 30d
Description
When sending a request with the property `url` as defined in HTTPNotificationRuleBase.yml the server returns an object without it.
__Request Body__
```
reqBody {
"type": "http",
"every": "10m",
"offset": "0s",
"name": "HTTPRule_b336",
"status": "active",
"tagRules": [],
"labels": [],
"statusRules": [
{
"currentLevel": "CRIT",
"previousLevel": "ANY"
}
],
"description": "foo",
"limit": 3,
"limitEvery": 3600,
"runbookLink": "/api/v2private/notebooks?orgID=9c5955fc99a60b8f",
"url": "http://bogus.listener.test",
"orgID": "d96c634457c016c9",
"endpointID": "0a0bbc8e6d3d1000"
}
```
__Response__
```
resp.body {
"id": "0a0bbc8fbca26000",
"name": "HTTPRule_b336",
"description": "foo",
"endpointID": "0a0bbc8e6d3d1000",
"orgID": "d96c634457c016c9",
"ownerID": "0a0bbc8d173d1000",
"taskID": "0a0bbc8fbfa14000",
"every": "10m",
"offset": "0s",
"runbookLink": "/api/v2private/notebooks?orgID=9c5955fc99a60b8f",
"statusRules": [
{
"currentLevel": "CRIT",
"previousLevel": "ANY"
}
],
"limit": 3,
"limitEvery": 3600,
"createdAt": "2022-09-27T12:38:39.602827553Z",
"updatedAt": "2022-09-27T12:38:39.602827553Z",
"type": "http",
"labels": [],
"links": {
"self": "/api/v2/notificationRules/0a0bbc8fbca26000",
"labels": "/api/v2/notificationRules/0a0bbc8fbca26000/labels",
"members": "/api/v2/notificationRules/0a0bbc8fbca26000/members",
"owners": "/api/v2/notificationRules/0a0bbc8fbca26000/owners",
"query": "/api/v2/notificationRules/0a0bbc8fbca26000/query"
},
"status": "active",
"latestCompleted": "2022-09-27T12:38:39Z",
"latestScheduled": "2022-09-27T12:38:39Z"
}
```
__HTTPNotificationRuleBase.yml__
```
type: object
required: [type]
properties:
type:
type: string
enum: [http]
url:
type: string
```
BTW. If connection and sending of notifications is handled by the endpoint bound through the property `endpointID`, why is the property `url` necessary in the NotificationRule?
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
Research direction
Start with HTTPNotificationRuleBase.yml and the notification-rule request/response entry points. Reproduce the shown request, compare the returned object with the schema, and trace how endpointID and url are handled. Done means the intended url behavior is documented or corrected and covered by a request test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, yaml
- Domain
- api
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100