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 Document create response doesn't contains a "labels" property [area/api] #12858

Closed
bednar opened this issue Mar 25, 2019 · 5 comments
Assignees
Labels

Comments

@bednar
Copy link
Contributor

bednar commented Mar 25, 2019

The Document schema is defined as:

Document:
      type: object
      properties:
        id:
          type: string
          readOnly: true
        meta:
          $ref: "#/components/schemas/DocumentMeta"
        content:
          type: object
        labels:
          $ref: "#/components/schemas/Labels"
      required:
        - id
        - meta
        - content

but the HTTP response doesn't contains the property labels:

-> POST 
-> http://127.0.0.1:9999/api/v2/documents/templates
-> {
	"meta": {
		"name": "document-name1553507530887-IT",
		"version": "1"
	},
	"content": "templates content",
	"orgID": "0399033576e2b000",
	"labels": ["label1553507530844-IT"]
}

<- 201 
<- Created
<- {
	"links": {
		"self": "/api/v2/documents/templates/039910472487a000"
	},
	"id": "039910472487a000",
	"meta": {
		"name": "document-name1553507530887-IT",
		"version": "1"
	},
	"content": "templates content"
}

introduced by #12382, cc @desa, @goller

@bednar bednar changed the title InfluxDB 2.0: The Document create response doesn't contains a labels property "links" [area/api] InfluxDB 2.0: The Document create response doesn't contains a "labels" property [area/api] Mar 25, 2019
@desa desa self-assigned this Mar 26, 2019
@desa
Copy link
Contributor

desa commented Mar 26, 2019

@bednar good catch. I'm actually not 100% sure what the correct response should be. Do you think we should include the labels in the response, or do you think we should update the swagger for the create?

@bednar
Copy link
Contributor Author

bednar commented Mar 26, 2019

I think the better will be include the labels in the response. The response for create and get /documents/templates/{templateID} should be same.

@desa
Copy link
Contributor

desa commented Mar 26, 2019

Yeah, I think I agree. 👍

@bednar
Copy link
Contributor Author

bednar commented Mar 26, 2019

👍

@bednar
Copy link
Contributor Author

bednar commented Mar 28, 2019

It works perfectly 👍

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

2 participants