Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

schema/StatusRule - properties count and period ignored in request

Aperta
#559 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
35/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
openapi
Ambito
api

Direzione di ricerca

Inizia da StatusRule.yml e confronta le sue proprietà count e period con gli esempi di request e response. Traccia la gestione dell’API per statusRules per determinare se questi campi sono supportati o sono stati sostituiti da limit e limitEvery. Il lavoro è completato quando la specifica e il comportamento dell’API sono coerenti e il comportamento rilevante di request/response è stato verificato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

When sending a request with a StatusRule containing the properties count and period as defined in StatusRule.yml, the server responds with an object containing a StatusRule stripped of these two properties.

Request

reqBody {
   "type": "http",
   "every": "10m",
   "offset": "0s",
   "name": "HTTPRule_aae0",
   "status": "active",
   "tagRules": [],
   "labels": [],
   "statusRules": [
      {
         "currentLevel": "CRIT",
         "previousLevel": "ANY",
         "count": 3,
         "period": "1h"
      }
   ],
   "description": "foo",
   "limit": 3,
   "limitEvery": 3600,
   "runbookLink": "/api/v2private/notebooks?orgID=9c5955fc99a60b8f",
   "url": "http://bogus.listener.test",
   "orgID": "e7494b160b9c62db",
   "endpointID": "0a0bbe57aefd1000"
}

Response

{
   "id": "0a0bbe59fd226000",
   "name": "HTTPRule_aae0",
   "description": "foo",
   "endpointID": "0a0bbe57aefd1000",
   "orgID": "e7494b160b9c62db",
   "ownerID": "0a0bbe5654fd1000",
   "taskID": "0a0bbe59ffe14000",
   "every": "10m",
   "offset": "0s",
   "runbookLink": "/api/v2private/notebooks?orgID=9c5955fc99a60b8f",
   "statusRules": [
      {
         "currentLevel": "CRIT",
         "previousLevel": "ANY"
      }
   ],
   "limit": 3,
   "limitEvery": 3600,
   "createdAt": "2022-09-27T12:46:28.852229364Z",
   "updatedAt": "2022-09-27T12:46:28.852229364Z",
   "type": "http",
   "labels": [],
   "links": {
      "self": "/api/v2/notificationRules/0a0bbe59fd226000",
      "labels": "/api/v2/notificationRules/0a0bbe59fd226000/labels",
      "members": "/api/v2/notificationRules/0a0bbe59fd226000/members",
      "owners": "/api/v2/notificationRules/0a0bbe59fd226000/owners",
      "query": "/api/v2/notificationRules/0a0bbe59fd226000/query"
   },
   "status": "active",
   "latestCompleted": "2022-09-27T12:46:28Z",
   "latestScheduled": "2022-09-27T12:46:28Z"
}

StatusRule.yml

  type: object
  properties:
    currentLevel:
      $ref: "./RuleStatusLevel.yml"
    previousLevel:
      $ref: "./RuleStatusLevel.yml"
    count:
      type: integer
    period:
      type: string

Do the properties count and period serve a purpose? Have they been superseded by limit and limitEvery? Should they be removed from this definition?

Latest commit in openapi

commit ad64ba87e7dd666feb80bbb85d1757b3d290d6c3 (HEAD -> master, origin/master, origin/HEAD)
Author: wiedld <wiedld@users.noreply.github.com>
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
Lingua principale
Shell
Stelle
18
Fork
9
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di influxdata/openapi

Tutte le issue di influxdata/openapi

Issue simili

Altre issue su Shell/Bash

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.