influxdata / influxdata/openapi

paths/notificationRules - GET definition contains query param `checkID` which does not seem to be implemented

Open
#563 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

While writing tests for the endpoint notificationRules I've tried to filter using the checkID parameter defined in common/paths/notificationRules.yml but it seems to have no affect. Even illegal ID Values (e.g. ?checkID=12345678 should throw an error that ID must have a length of 16 bytes) are passed without issue.

Is this the remains of an idea that was later implemented differently and should be removed, or is this something awaiting implementation?

common/paths/notificationRules.yml

get:
  operationId: GetNotificationRules
  tags:
    - NotificationRules
  summary: List all notification rules
  parameters:
    - $ref: "../parameters/TraceSpan.yml"
    - $ref: "../parameters/Offset.yml"
    - $ref: "../parameters/Limit.yml"
    - in: query
      name: orgID
      required: true
      description: Only show notification rules that belong to a specific organization ID.
      schema:
        type: string
    - in: query
      name: checkID
      description: Only show notifications that belong to the specific check ID.
      schema:
        type: string
    - in: query
      name: tag
      description: Only return notification rules that "would match" statuses which contain the tag key value pairs provided.
      schema:
        type: string
        pattern: ^[a-zA-Z0-9_]+:[a-zA-Z0-9_]+$
        example: env:prod
  responses:
    "200":
      description: A list of notification rules
      content:
        application/json:
          schema:
            $ref: "../schemas/NotificationRules.yml"
    default:
      description: Unexpected error
      content:
        application/json:
          schema:
            $ref: "../schemas/Error.yml"
post:
  operationId: CreateNotificationRule
  tags:
    - NotificationRules
...

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 common/paths/notificationRules.yml and the tests mentioned in the issue. Check whether GET notificationRules supports filtering and validation for checkID; done when the OpenAPI definition matches the implemented behavior, with the relevant behavior covered by tests or the unsupported parameter removed.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
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.