UnmarshalSpec unmarshals the internal spec into the given interface
(out any)
| 90 | |
| 91 | // UnmarshalSpec unmarshals the internal spec into the given interface |
| 92 | func (s *Source) UnmarshalSpec(out any) error { |
| 93 | b, err := json.Marshal(s.Spec) |
| 94 | if err != nil { |
| 95 | return err |
| 96 | } |
| 97 | dec := json.NewDecoder(bytes.NewReader(b)) |
| 98 | dec.UseNumber() |
| 99 | dec.DisallowUnknownFields() |
| 100 | return dec.Decode(out) |
| 101 | } |
| 102 | |
| 103 | func (Source) JSONSchemaExtend(sc *jsonschema.Schema) { |
| 104 | tables := sc.Properties.Value("tables") |