influxdata / openapi

An OpenAPI specification for influx (cloud/oss) apis.
MIT License
17 stars 10 forks source link

Telegrafs - TelegrafPluginRequest and TelegrafRequest have no required properties #610

Open karel-rehor opened 1 year ago

karel-rehor commented 1 year ago

Looking into TelegrafPluginRequest and TelegrafRequest I see there are no properties listed as Required. I would think, that as with other resources an orgID would be required in a request. Also I cannot imagine a use case for a TelegrafPlugin without a name or a config.

src/common/schemas/TelegrafPluginRequest.yml

# This defines the 'legacy' `TelegrafConfigDecode` type in the api.
type: object
properties:
  name:
    type: string
  description:
    type: string
  plugins:
    type: array
    items:
      type: object
      properties:
        type:
          type: string
        name:
          type: string
        alias:
          type: string
        description:
          type: string
        config:
          type: string
  metadata:
    type: object
    properties:
      buckets:
        type: array
        items:
          type: string
  config:
    type: string
  orgID:
    type: string

src/common/schemas/TelegrafRequest.yml

  type: object
  properties:
    name:
      type: string
    description:
      type: string
    metadata:
      type: object
      properties:
        buckets:
          type: array
          items:
            type: string
    config:
      type: string
    orgID:
      type: string

Inspecting opeanapi repository with latest commit at:

commit 9d31f38d457c9ddd4fb66a4bdb4ff40f402961ad (HEAD -> master, origin/master, origin/docs-release/influxdb-oss, origin/HEAD)
Author: Jason Stirnaman <jstirnaman@influxdata.com>
Date:   Tue Nov 8 11:50:47 2022 -0600