Merge pull request #13519 from influxdata/doc_desc
feat(influxdb): add doc descriptionpull/13562/head
commit
4acad08ea5
|
@ -24,9 +24,10 @@ type Document struct {
|
|||
// DocumentMeta is information that is universal across documents. Ideally
|
||||
// data in the meta should be indexed and queryable.
|
||||
type DocumentMeta struct {
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Version string `json:"version,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Type string `json:"type,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
Version string `json:"version,omitempty"`
|
||||
}
|
||||
|
||||
// DocumentStore is used to perform CRUD operations on documents. It follows an options
|
||||
|
|
|
@ -46,8 +46,9 @@ var (
|
|||
doc1 = influxdb.Document{
|
||||
ID: doc1ID,
|
||||
Meta: influxdb.DocumentMeta{
|
||||
Name: "doc1",
|
||||
Type: "typ1",
|
||||
Name: "doc1",
|
||||
Type: "typ1",
|
||||
Description: "desc1",
|
||||
},
|
||||
Content: "content1",
|
||||
Labels: []*influxdb.Label{
|
||||
|
@ -125,7 +126,8 @@ var (
|
|||
],
|
||||
"meta": {
|
||||
"name": "doc1",
|
||||
"type": "typ1"
|
||||
"type": "typ1",
|
||||
"description": "desc1"
|
||||
}
|
||||
},
|
||||
{
|
||||
|
|
|
@ -6959,6 +6959,8 @@ components:
|
|||
type: string
|
||||
type:
|
||||
type: string
|
||||
description:
|
||||
type: string
|
||||
version:
|
||||
type: string
|
||||
required:
|
||||
|
|
|
@ -60,8 +60,9 @@ func NewDocumentIntegrationTest(store kv.Store) func(t *testing.T) {
|
|||
t.Run("u1 can create document for o1", func(t *testing.T) {
|
||||
d1 = &influxdb.Document{
|
||||
Meta: influxdb.DocumentMeta{
|
||||
Name: "i1",
|
||||
Type: "type1",
|
||||
Name: "i1",
|
||||
Type: "type1",
|
||||
Description: "desc1",
|
||||
},
|
||||
Content: map[string]interface{}{
|
||||
"v1": "v1",
|
||||
|
|
Loading…
Reference in New Issue