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 Variable schema doesn't have an org link [area/api] #12947

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

InfluxDB 2.0: The Variable schema doesn't have an org link [area/api] #12947

bednar opened this issue Mar 27, 2019 · 0 comments
Labels

Comments

@bednar
Copy link
Contributor

bednar commented Mar 27, 2019

The Variable schema is defined as:

Variable:
      type: object
      required:
        - name
        - orgID
        - arguments
      properties:
        links:
          type: object
          readOnly: true
          properties:
            self:
              type: string
              format: uri
        id:
          readOnly: true
          type: string
        orgID:
          type: string
        name:
          type: string
        selected:
          type: array
          items:
            type: string
        arguments:
          type: object
          oneOf:
            - $ref: "#/components/schemas/QueryVariableProperties"
            - $ref: "#/components/schemas/ConstantVariableProperties"
            - $ref: "#/components/schemas/MapVariableProperties"

but the HTTP response also contains the org link property:

-> POST 
-> http://127.0.0.1:9999/api/v2/variables
-> {
	"orgID": "039b91ad74036000",
	"name": "my-variable1553716598000-IT",
	"selected": ["constant2"],
	"arguments": {
		"type": "constant",
		"values": ["constant1", "constant2", "constant3"]
	}
}

<- 201 
<- Created
<- {
	"id": "039c2dce6684d000",
	"orgID": "039b91ad74036000",
	"name": "my-variable1553716598000-IT",
	"selected": ["constant2"],
	"arguments": {
		"type": "constant",
		"values": ["constant1", "constant2", "constant3"]
	},
	"links": {
		"self": "/api/v2/variables/039c2dce6684d000",
		"org": "/api/v2/orgs/039b91ad74036000"
	}
}

The Variable schema should be defined as:

Variable:
      type: object
      required:
        - name
        - orgID
        - arguments
      properties:
        links:
          type: object
          readOnly: true
          properties:
            self:
              type: string
              format: uri
            org:
              type: string
              format: uri
        id:
          readOnly: true
          type: string
        orgID:
          type: string
        name:
          type: string
        selected:
          type: array
          items:
            type: string
        arguments:
          type: object
          oneOf:
            - $ref: "#/components/schemas/QueryVariableProperties"
            - $ref: "#/components/schemas/ConstantVariableProperties"
            - $ref: "#/components/schemas/MapVariableProperties"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant