Skip to content

Commit

Permalink
add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
hariso committed Nov 20, 2024
1 parent d9f7f64 commit 768c935
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source_middleware.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,10 @@ type SourceWithSchemaExtraction struct {
KeySubject *string `json:"sdk.schema.extract.key.subject" default:"key"`
}

// SchemaType returns the typed schema type (and not the string value as it's
// in the configuration itself).
// todo: use https://github.com/ConduitIO/conduit-commons/issues/142 to parse
// the string value into schema.Type directly
func (c *SourceWithSchemaExtraction) SchemaType() schema.Type {
t := lang.Ptr(schema.Type(0))
err := t.UnmarshalText([]byte(c.SchemaTypeStr))
Expand Down

0 comments on commit 768c935

Please sign in to comment.