From f62ff343df61cf4aef22acf2cd0fed8bee7366ea Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Thu, 20 Aug 2026 05:22:57 +0000 Subject: [PATCH 1/2] chore(deps): update go toolchain directive to v1.27.0 --- go.mod | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e0e23991..5f045820 100644 --- a/go.mod +++ b/go.mod @@ -2,7 +2,7 @@ module go.infratographer.com/metadata-api go 1.25.0 -toolchain go1.26.6 +toolchain go1.27.0 require ( entgo.io/contrib v0.7.0 From ff62ca3b60e96398c6aa87442c6b2b9f1cc6e736 Mon Sep 17 00:00:00 2001 From: Infratographer Actions Bot Date: Thu, 20 Aug 2026 05:24:15 +0000 Subject: [PATCH 2/2] chore: run go generate Signed-off-by: Infratographer Actions Bot --- internal/ent/generated/annotation.go | 3 +- internal/ent/generated/annotation_create.go | 4 +- internal/ent/generated/annotation_update.go | 10 ++--- internal/ent/generated/gql_mutation_input.go | 8 ++-- internal/ent/generated/mutation.go | 46 ++++++++++---------- internal/ent/generated/status.go | 3 +- internal/ent/generated/status_create.go | 4 +- internal/ent/generated/status_update.go | 10 ++--- internal/graphapi/gen_models.go | 6 +-- internal/graphapi/generated.go | 24 +++++----- internal/testclient/gen_client.go | 18 ++++---- internal/testclient/gen_models.go | 16 +++---- 12 files changed, 77 insertions(+), 75 deletions(-) diff --git a/internal/ent/generated/annotation.go b/internal/ent/generated/annotation.go index 5b851270..031f0b8a 100644 --- a/internal/ent/generated/annotation.go +++ b/internal/ent/generated/annotation.go @@ -18,6 +18,7 @@ package generated import ( "encoding/json" + "encoding/json/jsontext" "fmt" "strings" "time" @@ -45,7 +46,7 @@ type Annotation struct { // ID of the AnnotationNamespace of this annotation. AnnotationNamespaceID gidx.PrefixedID `json:"annotation_namespace_id,omitempty"` // JSON formatted data of this annotation. - Data json.RawMessage `json:"data,omitempty"` + Data jsontext.Value `json:"data,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the AnnotationQuery when eager-loading is set. Edges AnnotationEdges `json:"edges"` diff --git a/internal/ent/generated/annotation_create.go b/internal/ent/generated/annotation_create.go index 9b1fc41c..86cc9895 100644 --- a/internal/ent/generated/annotation_create.go +++ b/internal/ent/generated/annotation_create.go @@ -18,7 +18,7 @@ package generated import ( "context" - "encoding/json" + "encoding/json/jsontext" "errors" "fmt" "time" @@ -79,7 +79,7 @@ func (_c *AnnotationCreate) SetAnnotationNamespaceID(v gidx.PrefixedID) *Annotat } // SetData sets the "data" field. -func (_c *AnnotationCreate) SetData(v json.RawMessage) *AnnotationCreate { +func (_c *AnnotationCreate) SetData(v jsontext.Value) *AnnotationCreate { _c.mutation.SetData(v) return _c } diff --git a/internal/ent/generated/annotation_update.go b/internal/ent/generated/annotation_update.go index f70c7aef..18c2f159 100644 --- a/internal/ent/generated/annotation_update.go +++ b/internal/ent/generated/annotation_update.go @@ -18,7 +18,7 @@ package generated import ( "context" - "encoding/json" + "encoding/json/jsontext" "errors" "fmt" @@ -44,13 +44,13 @@ func (_u *AnnotationUpdate) Where(ps ...predicate.Annotation) *AnnotationUpdate } // SetData sets the "data" field. -func (_u *AnnotationUpdate) SetData(v json.RawMessage) *AnnotationUpdate { +func (_u *AnnotationUpdate) SetData(v jsontext.Value) *AnnotationUpdate { _u.mutation.SetData(v) return _u } // AppendData appends value to the "data" field. -func (_u *AnnotationUpdate) AppendData(v json.RawMessage) *AnnotationUpdate { +func (_u *AnnotationUpdate) AppendData(v jsontext.Value) *AnnotationUpdate { _u.mutation.AppendData(v) return _u } @@ -151,13 +151,13 @@ type AnnotationUpdateOne struct { } // SetData sets the "data" field. -func (_u *AnnotationUpdateOne) SetData(v json.RawMessage) *AnnotationUpdateOne { +func (_u *AnnotationUpdateOne) SetData(v jsontext.Value) *AnnotationUpdateOne { _u.mutation.SetData(v) return _u } // AppendData appends value to the "data" field. -func (_u *AnnotationUpdateOne) AppendData(v json.RawMessage) *AnnotationUpdateOne { +func (_u *AnnotationUpdateOne) AppendData(v jsontext.Value) *AnnotationUpdateOne { _u.mutation.AppendData(v) return _u } diff --git a/internal/ent/generated/gql_mutation_input.go b/internal/ent/generated/gql_mutation_input.go index 3ac67de9..5f0257a2 100644 --- a/internal/ent/generated/gql_mutation_input.go +++ b/internal/ent/generated/gql_mutation_input.go @@ -17,7 +17,7 @@ package generated import ( - "encoding/json" + "encoding/json/jsontext" "go.infratographer.com/x/gidx" ) @@ -75,7 +75,7 @@ func (c *AnnotationNamespaceUpdateOne) SetInput(i UpdateAnnotationNamespaceInput // CreateStatusInput represents a mutation input for creating statusslice. type CreateStatusInput struct { Source string - Data json.RawMessage + Data jsontext.Value NamespaceID gidx.PrefixedID MetadataID gidx.PrefixedID } @@ -98,8 +98,8 @@ func (c *StatusCreate) SetInput(i CreateStatusInput) *StatusCreate { // UpdateStatusInput represents a mutation input for updating statusslice. type UpdateStatusInput struct { - Data json.RawMessage - AppendData json.RawMessage + Data jsontext.Value + AppendData jsontext.Value } // Mutate applies the UpdateStatusInput on the StatusMutation builder. diff --git a/internal/ent/generated/mutation.go b/internal/ent/generated/mutation.go index 87371f07..1c317fcd 100644 --- a/internal/ent/generated/mutation.go +++ b/internal/ent/generated/mutation.go @@ -18,7 +18,7 @@ package generated import ( "context" - "encoding/json" + "encoding/json/jsontext" "errors" "fmt" "sync" @@ -59,8 +59,8 @@ type AnnotationMutation struct { id *gidx.PrefixedID created_at *time.Time updated_at *time.Time - data *json.RawMessage - appenddata json.RawMessage + data *jsontext.Value + appenddata jsontext.Value clearedFields map[string]struct{} namespace *gidx.PrefixedID clearednamespace bool @@ -320,13 +320,13 @@ func (m *AnnotationMutation) ResetAnnotationNamespaceID() { } // SetData sets the "data" field. -func (m *AnnotationMutation) SetData(jm json.RawMessage) { - m.data = &jm +func (m *AnnotationMutation) SetData(j jsontext.Value) { + m.data = &j m.appenddata = nil } // Data returns the value of the "data" field in the mutation. -func (m *AnnotationMutation) Data() (r json.RawMessage, exists bool) { +func (m *AnnotationMutation) Data() (r jsontext.Value, exists bool) { v := m.data if v == nil { return @@ -337,7 +337,7 @@ func (m *AnnotationMutation) Data() (r json.RawMessage, exists bool) { // OldData returns the old "data" field's value of the Annotation entity. // If the Annotation object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *AnnotationMutation) OldData(ctx context.Context) (v json.RawMessage, err error) { +func (m *AnnotationMutation) OldData(ctx context.Context) (v jsontext.Value, err error) { if !m.op.Is(OpUpdateOne) { return v, errors.New("OldData is only allowed on UpdateOne operations") } @@ -351,13 +351,13 @@ func (m *AnnotationMutation) OldData(ctx context.Context) (v json.RawMessage, er return oldValue.Data, nil } -// AppendData adds jm to the "data" field. -func (m *AnnotationMutation) AppendData(jm json.RawMessage) { - m.appenddata = append(m.appenddata, jm...) +// AppendData adds j to the "data" field. +func (m *AnnotationMutation) AppendData(j jsontext.Value) { + m.appenddata = append(m.appenddata, j...) } // AppendedData returns the list of values that were appended to the "data" field in this mutation. -func (m *AnnotationMutation) AppendedData() (json.RawMessage, bool) { +func (m *AnnotationMutation) AppendedData() (jsontext.Value, bool) { if len(m.appenddata) == 0 { return nil, false } @@ -562,7 +562,7 @@ func (m *AnnotationMutation) SetField(name string, value ent.Value) error { m.SetAnnotationNamespaceID(v) return nil case annotation.FieldData: - v, ok := value.(json.RawMessage) + v, ok := value.(jsontext.Value) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } @@ -1994,8 +1994,8 @@ type StatusMutation struct { created_at *time.Time updated_at *time.Time source *string - data *json.RawMessage - appenddata json.RawMessage + data *jsontext.Value + appenddata jsontext.Value clearedFields map[string]struct{} namespace *gidx.PrefixedID clearednamespace bool @@ -2291,13 +2291,13 @@ func (m *StatusMutation) ResetSource() { } // SetData sets the "data" field. -func (m *StatusMutation) SetData(jm json.RawMessage) { - m.data = &jm +func (m *StatusMutation) SetData(j jsontext.Value) { + m.data = &j m.appenddata = nil } // Data returns the value of the "data" field in the mutation. -func (m *StatusMutation) Data() (r json.RawMessage, exists bool) { +func (m *StatusMutation) Data() (r jsontext.Value, exists bool) { v := m.data if v == nil { return @@ -2308,7 +2308,7 @@ func (m *StatusMutation) Data() (r json.RawMessage, exists bool) { // OldData returns the old "data" field's value of the Status entity. // If the Status object wasn't provided to the builder, the object is fetched from the database. // An error is returned if the mutation operation is not UpdateOne, or the database query fails. -func (m *StatusMutation) OldData(ctx context.Context) (v json.RawMessage, err error) { +func (m *StatusMutation) OldData(ctx context.Context) (v jsontext.Value, err error) { if !m.op.Is(OpUpdateOne) { return v, errors.New("OldData is only allowed on UpdateOne operations") } @@ -2322,13 +2322,13 @@ func (m *StatusMutation) OldData(ctx context.Context) (v json.RawMessage, err er return oldValue.Data, nil } -// AppendData adds jm to the "data" field. -func (m *StatusMutation) AppendData(jm json.RawMessage) { - m.appenddata = append(m.appenddata, jm...) +// AppendData adds j to the "data" field. +func (m *StatusMutation) AppendData(j jsontext.Value) { + m.appenddata = append(m.appenddata, j...) } // AppendedData returns the list of values that were appended to the "data" field in this mutation. -func (m *StatusMutation) AppendedData() (json.RawMessage, bool) { +func (m *StatusMutation) AppendedData() (jsontext.Value, bool) { if len(m.appenddata) == 0 { return nil, false } @@ -2547,7 +2547,7 @@ func (m *StatusMutation) SetField(name string, value ent.Value) error { m.SetSource(v) return nil case status.FieldData: - v, ok := value.(json.RawMessage) + v, ok := value.(jsontext.Value) if !ok { return fmt.Errorf("unexpected type %T for field %s", value, name) } diff --git a/internal/ent/generated/status.go b/internal/ent/generated/status.go index 41a882e8..0a7ca8c4 100644 --- a/internal/ent/generated/status.go +++ b/internal/ent/generated/status.go @@ -18,6 +18,7 @@ package generated import ( "encoding/json" + "encoding/json/jsontext" "fmt" "strings" "time" @@ -46,7 +47,7 @@ type Status struct { // Source holds the value of the "source" field. Source string `json:"source,omitempty"` // JSON formatted data of this annotation. - Data json.RawMessage `json:"data,omitempty"` + Data jsontext.Value `json:"data,omitempty"` // Edges holds the relations/edges for other nodes in the graph. // The values are being populated by the StatusQuery when eager-loading is set. Edges StatusEdges `json:"edges"` diff --git a/internal/ent/generated/status_create.go b/internal/ent/generated/status_create.go index b0895c09..83c4213f 100644 --- a/internal/ent/generated/status_create.go +++ b/internal/ent/generated/status_create.go @@ -18,7 +18,7 @@ package generated import ( "context" - "encoding/json" + "encoding/json/jsontext" "errors" "fmt" "time" @@ -85,7 +85,7 @@ func (_c *StatusCreate) SetSource(v string) *StatusCreate { } // SetData sets the "data" field. -func (_c *StatusCreate) SetData(v json.RawMessage) *StatusCreate { +func (_c *StatusCreate) SetData(v jsontext.Value) *StatusCreate { _c.mutation.SetData(v) return _c } diff --git a/internal/ent/generated/status_update.go b/internal/ent/generated/status_update.go index 2329849b..f816f1d8 100644 --- a/internal/ent/generated/status_update.go +++ b/internal/ent/generated/status_update.go @@ -18,7 +18,7 @@ package generated import ( "context" - "encoding/json" + "encoding/json/jsontext" "errors" "fmt" @@ -44,13 +44,13 @@ func (_u *StatusUpdate) Where(ps ...predicate.Status) *StatusUpdate { } // SetData sets the "data" field. -func (_u *StatusUpdate) SetData(v json.RawMessage) *StatusUpdate { +func (_u *StatusUpdate) SetData(v jsontext.Value) *StatusUpdate { _u.mutation.SetData(v) return _u } // AppendData appends value to the "data" field. -func (_u *StatusUpdate) AppendData(v json.RawMessage) *StatusUpdate { +func (_u *StatusUpdate) AppendData(v jsontext.Value) *StatusUpdate { _u.mutation.AppendData(v) return _u } @@ -151,13 +151,13 @@ type StatusUpdateOne struct { } // SetData sets the "data" field. -func (_u *StatusUpdateOne) SetData(v json.RawMessage) *StatusUpdateOne { +func (_u *StatusUpdateOne) SetData(v jsontext.Value) *StatusUpdateOne { _u.mutation.SetData(v) return _u } // AppendData appends value to the "data" field. -func (_u *StatusUpdateOne) AppendData(v json.RawMessage) *StatusUpdateOne { +func (_u *StatusUpdateOne) AppendData(v jsontext.Value) *StatusUpdateOne { _u.mutation.AppendData(v) return _u } diff --git a/internal/graphapi/gen_models.go b/internal/graphapi/gen_models.go index ef6e54fc..f1c420bf 100644 --- a/internal/graphapi/gen_models.go +++ b/internal/graphapi/gen_models.go @@ -3,7 +3,7 @@ package graphapi import ( - "encoding/json" + "encoding/json/jsontext" "go.infratographer.com/metadata-api/internal/ent/generated" "go.infratographer.com/x/gidx" @@ -50,7 +50,7 @@ type AnnotationUpdateInput struct { // The namespace ID for this annotation. NamespaceID gidx.PrefixedID `json:"namespaceID"` // The data to save in this annotation. - Data json.RawMessage `json:"data"` + Data jsontext.Value `json:"data"` } // Return response from annotationUpdate @@ -131,7 +131,7 @@ type StatusUpdateInput struct { // The source for this status. Source string `json:"source"` // The data to save in this status. - Data json.RawMessage `json:"data"` + Data jsontext.Value `json:"data"` } // Return response from statusUpdate diff --git a/internal/graphapi/generated.go b/internal/graphapi/generated.go index 52ab183e..fc7cc8f6 100644 --- a/internal/graphapi/generated.go +++ b/internal/graphapi/generated.go @@ -5,7 +5,7 @@ package graphapi import ( "bytes" "context" - "encoding/json" + "encoding/json/jsontext" "errors" "fmt" "strconv" @@ -3168,7 +3168,7 @@ func (ec *executionContext) _Annotation_data(ctx context.Context, field graphql. return obj.Data, nil }, nil, - ec.marshalNJSON2encodingᚋjsonᚐRawMessage, + ec.marshalNJSON2encodingᚋjsonᚋjsontextᚐValue, true, true, ) @@ -6185,7 +6185,7 @@ func (ec *executionContext) _Status_data(ctx context.Context, field graphql.Coll return obj.Data, nil }, nil, - ec.marshalNJSON2encodingᚋjsonᚐRawMessage, + ec.marshalNJSON2encodingᚋjsonᚋjsontextᚐValue, true, true, ) @@ -9104,7 +9104,7 @@ func (ec *executionContext) unmarshalInputAnnotationUpdateInput(ctx context.Cont it.NamespaceID = data case "data": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("data")) - data, err := ec.unmarshalNJSON2encodingᚋjsonᚐRawMessage(ctx, v) + data, err := ec.unmarshalNJSON2encodingᚋjsonᚋjsontextᚐValue(ctx, v) if err != nil { return it, err } @@ -9416,7 +9416,7 @@ func (ec *executionContext) unmarshalInputCreateStatusInput(ctx context.Context, it.Source = data case "data": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("data")) - data, err := ec.unmarshalNJSON2encodingᚋjsonᚐRawMessage(ctx, v) + data, err := ec.unmarshalNJSON2encodingᚋjsonᚋjsontextᚐValue(ctx, v) if err != nil { return it, err } @@ -10211,7 +10211,7 @@ func (ec *executionContext) unmarshalInputStatusUpdateInput(ctx context.Context, it.Source = data case "data": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("data")) - data, err := ec.unmarshalNJSON2encodingᚋjsonᚐRawMessage(ctx, v) + data, err := ec.unmarshalNJSON2encodingᚋjsonᚋjsontextᚐValue(ctx, v) if err != nil { return it, err } @@ -10600,14 +10600,14 @@ func (ec *executionContext) unmarshalInputUpdateStatusInput(ctx context.Context, switch k { case "data": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("data")) - data, err := ec.unmarshalOJSON2encodingᚋjsonᚐRawMessage(ctx, v) + data, err := ec.unmarshalOJSON2encodingᚋjsonᚋjsontextᚐValue(ctx, v) if err != nil { return it, err } it.Data = data case "appendData": ctx := graphql.WithPathContext(ctx, graphql.NewPathWithField("appendData")) - data, err := ec.unmarshalOJSON2encodingᚋjsonᚐRawMessage(ctx, v) + data, err := ec.unmarshalOJSON2encodingᚋjsonᚋjsontextᚐValue(ctx, v) if err != nil { return it, err } @@ -13678,12 +13678,12 @@ func (ec *executionContext) marshalNInt2int(ctx context.Context, sel ast.Selecti return res } -func (ec *executionContext) unmarshalNJSON2encodingᚋjsonᚐRawMessage(ctx context.Context, v any) (json.RawMessage, error) { +func (ec *executionContext) unmarshalNJSON2encodingᚋjsonᚋjsontextᚐValue(ctx context.Context, v any) (jsontext.Value, error) { res, err := entx.UnmarshalRawMessage(v) return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalNJSON2encodingᚋjsonᚐRawMessage(ctx context.Context, sel ast.SelectionSet, v json.RawMessage) graphql.Marshaler { +func (ec *executionContext) marshalNJSON2encodingᚋjsonᚋjsontextᚐValue(ctx context.Context, sel ast.SelectionSet, v jsontext.Value) graphql.Marshaler { if v == nil { if !graphql.HasFieldError(ctx, graphql.GetFieldContext(ctx)) { ec.Errorf(ctx, "the requested element is null which the schema does not allow") @@ -14847,7 +14847,7 @@ func (ec *executionContext) marshalOInt2ᚖint(ctx context.Context, sel ast.Sele return res } -func (ec *executionContext) unmarshalOJSON2encodingᚋjsonᚐRawMessage(ctx context.Context, v any) (json.RawMessage, error) { +func (ec *executionContext) unmarshalOJSON2encodingᚋjsonᚋjsontextᚐValue(ctx context.Context, v any) (jsontext.Value, error) { if v == nil { return nil, nil } @@ -14855,7 +14855,7 @@ func (ec *executionContext) unmarshalOJSON2encodingᚋjsonᚐRawMessage(ctx cont return res, graphql.ErrorOnPath(ctx, err) } -func (ec *executionContext) marshalOJSON2encodingᚋjsonᚐRawMessage(ctx context.Context, sel ast.SelectionSet, v json.RawMessage) graphql.Marshaler { +func (ec *executionContext) marshalOJSON2encodingᚋjsonᚋjsontextᚐValue(ctx context.Context, sel ast.SelectionSet, v jsontext.Value) graphql.Marshaler { if v == nil { return graphql.Null } diff --git a/internal/testclient/gen_client.go b/internal/testclient/gen_client.go index fece2303..80b76343 100644 --- a/internal/testclient/gen_client.go +++ b/internal/testclient/gen_client.go @@ -4,7 +4,7 @@ package testclient import ( "context" - "encoding/json" + "encoding/json/jsontext" "time" "github.com/Yamashou/gqlgenc/clientv2" @@ -92,7 +92,7 @@ func (t *AnnotationUpdate_AnnotationUpdate_Annotation_Namespace) GetPrivate() bo type AnnotationUpdate_AnnotationUpdate_Annotation struct { CreatedAt time.Time "json:\"createdAt\" graphql:\"createdAt\"" - Data json.RawMessage "json:\"data\" graphql:\"data\"" + Data jsontext.Value "json:\"data\" graphql:\"data\"" ID gidx.PrefixedID "json:\"id\" graphql:\"id\"" Metadata AnnotationUpdate_AnnotationUpdate_Annotation_Metadata "json:\"metadata\" graphql:\"metadata\"" Namespace AnnotationUpdate_AnnotationUpdate_Annotation_Namespace "json:\"namespace\" graphql:\"namespace\"" @@ -105,7 +105,7 @@ func (t *AnnotationUpdate_AnnotationUpdate_Annotation) GetCreatedAt() *time.Time } return &t.CreatedAt } -func (t *AnnotationUpdate_AnnotationUpdate_Annotation) GetData() *json.RawMessage { +func (t *AnnotationUpdate_AnnotationUpdate_Annotation) GetData() *jsontext.Value { if t == nil { t = &AnnotationUpdate_AnnotationUpdate_Annotation{} } @@ -243,7 +243,7 @@ func (t *GetAnnotationNamespace_AnnotationNamespace_Owner) GetID() *gidx.Prefixe type GetAnnotationNamespace_AnnotationNamespace_Annotations struct { CreatedAt time.Time "json:\"createdAt\" graphql:\"createdAt\"" - Data json.RawMessage "json:\"data\" graphql:\"data\"" + Data jsontext.Value "json:\"data\" graphql:\"data\"" ID gidx.PrefixedID "json:\"id\" graphql:\"id\"" UpdatedAt time.Time "json:\"updatedAt\" graphql:\"updatedAt\"" } @@ -254,7 +254,7 @@ func (t *GetAnnotationNamespace_AnnotationNamespace_Annotations) GetCreatedAt() } return &t.CreatedAt } -func (t *GetAnnotationNamespace_AnnotationNamespace_Annotations) GetData() *json.RawMessage { +func (t *GetAnnotationNamespace_AnnotationNamespace_Annotations) GetData() *jsontext.Value { if t == nil { t = &GetAnnotationNamespace_AnnotationNamespace_Annotations{} } @@ -492,11 +492,11 @@ func (t *GetNodeMetadata_Entities_MetadataNode_Metadata_Annotations_Edges_Node_N } type GetNodeMetadata_Entities_MetadataNode_Metadata_Annotations_Edges_Node struct { - Data json.RawMessage "json:\"data\" graphql:\"data\"" + Data jsontext.Value "json:\"data\" graphql:\"data\"" Namespace GetNodeMetadata_Entities_MetadataNode_Metadata_Annotations_Edges_Node_Namespace "json:\"namespace\" graphql:\"namespace\"" } -func (t *GetNodeMetadata_Entities_MetadataNode_Metadata_Annotations_Edges_Node) GetData() *json.RawMessage { +func (t *GetNodeMetadata_Entities_MetadataNode_Metadata_Annotations_Edges_Node) GetData() *jsontext.Value { if t == nil { t = &GetNodeMetadata_Entities_MetadataNode_Metadata_Annotations_Edges_Node{} } @@ -609,7 +609,7 @@ func (t *StatusUpdate_StatusUpdate_Status_Namespace) GetPrivate() bool { type StatusUpdate_StatusUpdate_Status struct { CreatedAt time.Time "json:\"createdAt\" graphql:\"createdAt\"" - Data json.RawMessage "json:\"data\" graphql:\"data\"" + Data jsontext.Value "json:\"data\" graphql:\"data\"" ID gidx.PrefixedID "json:\"id\" graphql:\"id\"" Metadata StatusUpdate_StatusUpdate_Status_Metadata "json:\"metadata\" graphql:\"metadata\"" Namespace StatusUpdate_StatusUpdate_Status_Namespace "json:\"namespace\" graphql:\"namespace\"" @@ -623,7 +623,7 @@ func (t *StatusUpdate_StatusUpdate_Status) GetCreatedAt() *time.Time { } return &t.CreatedAt } -func (t *StatusUpdate_StatusUpdate_Status) GetData() *json.RawMessage { +func (t *StatusUpdate_StatusUpdate_Status) GetData() *jsontext.Value { if t == nil { t = &StatusUpdate_StatusUpdate_Status{} } diff --git a/internal/testclient/gen_models.go b/internal/testclient/gen_models.go index 3ce8581f..f033d98b 100644 --- a/internal/testclient/gen_models.go +++ b/internal/testclient/gen_models.go @@ -4,7 +4,7 @@ package testclient import ( "bytes" - "encoding/json" + "encoding/json/jsontext" "fmt" "io" "strconv" @@ -33,7 +33,7 @@ type Annotation struct { // ID of the metadata of this annotation MetadataID gidx.PrefixedID `json:"metadataID"` // JSON formatted data of this annotation. - Data json.RawMessage `json:"data"` + Data jsontext.Value `json:"data"` Namespace *AnnotationNamespace `json:"namespace"` Metadata *Metadata `json:"metadata"` } @@ -211,7 +211,7 @@ type AnnotationUpdateInput struct { // The namespace ID for this annotation. NamespaceID gidx.PrefixedID `json:"namespaceID"` // The data to save in this annotation. - Data json.RawMessage `json:"data"` + Data jsontext.Value `json:"data"` } // Return response from annotationUpdate @@ -275,7 +275,7 @@ type CreateAnnotationNamespaceInput struct { type CreateStatusInput struct { Source string `json:"source"` // JSON formatted data of this annotation. - Data json.RawMessage `json:"data"` + Data jsontext.Value `json:"data"` NamespaceID gidx.PrefixedID `json:"namespaceID"` MetadataID gidx.PrefixedID `json:"metadataID"` } @@ -423,7 +423,7 @@ type Status struct { StatusNamespaceID gidx.PrefixedID `json:"statusNamespaceID"` Source string `json:"source"` // JSON formatted data of this annotation. - Data json.RawMessage `json:"data"` + Data jsontext.Value `json:"data"` Namespace *StatusNamespace `json:"namespace"` Metadata *Metadata `json:"metadata"` } @@ -610,7 +610,7 @@ type StatusUpdateInput struct { // The source for this status. Source string `json:"source"` // The data to save in this status. - Data json.RawMessage `json:"data"` + Data jsontext.Value `json:"data"` } // Return response from statusUpdate @@ -685,8 +685,8 @@ type UpdateAnnotationNamespaceInput struct { // Input information to update a status namespace. type UpdateStatusInput struct { // JSON formatted data of this annotation. - Data json.RawMessage `json:"data,omitempty"` - AppendData json.RawMessage `json:"appendData,omitempty"` + Data jsontext.Value `json:"data,omitempty"` + AppendData jsontext.Value `json:"appendData,omitempty"` } // Input information to update a status namespace.