Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfluxDB 2.0: The ScraperTargetResponse has duplicated property [area/api] #12541

Closed
bednar opened this issue Mar 12, 2019 · 0 comments
Closed

Comments

@bednar
Copy link
Contributor

bednar commented Mar 12, 2019

The ScraperTargetResponse schema is defined as an extension of ScraperTargetRequest. The ScraperTargetRequest has defined the name property:

ScraperTargetRequest:
      type: object
      properties:
        name:
          type: string
          description: name of the scraper target
        type:
          type: string
          description: type of the metrics to be parsed
          enum: [prometheus]
        url:
          type: string
          description: url of the metrics endpoint
          example:  http://localhost:9090/metrics
        orgID:
          type: string
          description: id of the organization
        bucketID:
          type: string
          description: id of the bucket to be written

so the name property in ScraperTargetResponse is useless and cause that the client generated by swagger.yml has duplicated properties:

ScraperTargetResponse:
      type: object
      allOf:
        - $ref: "#/components/schemas/ScraperTargetRequest"
        - type: object
          properties:
            id:
              type: string
              readOnly: true
            organization:
              type: string
              description: name of the organization
            bucket:
              type: string
              description: name of the bucket
            name:
                type: string
                description: name of scraper target
            links:
              example:
                self: "/api/v2/scrapers/1"
                owners: "/api/v2/scrapers/1/owners"
                members: "/api/v2/scrapers/1/members"
              properties:
                self:
                  $ref: "#/components/schemas/Link"
                members:
                  $ref: "#/components/schemas/Link"
                owners:
                  $ref: "#/components/schemas/Link"

The name property of ScraperTargetResponse has to be removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant