mirror of https://github.com/databricks/cli.git
type defs as map[string]any
This commit is contained in:
parent
8575c47626
commit
46585bbd3f
|
@ -45,7 +45,7 @@ type constructor struct {
|
||||||
// For example:
|
// For example:
|
||||||
// {"a/b/c": "value"} is converted to {"a": {"b": {"c": "value"}}}
|
// {"a/b/c": "value"} is converted to {"a": {"b": {"c": "value"}}}
|
||||||
// the $ref for "value" would be "#/$defs/a/b/c" in the generated JSON schema.
|
// the $ref for "value" would be "#/$defs/a/b/c" in the generated JSON schema.
|
||||||
func (c *constructor) Definitions() any {
|
func (c *constructor) Definitions() map[string]any {
|
||||||
defs := maps.Clone(c.definitions)
|
defs := maps.Clone(c.definitions)
|
||||||
|
|
||||||
// Remove the root type from the definitions. We don't need to include it in
|
// Remove the root type from the definitions. We don't need to include it in
|
||||||
|
|
|
@ -15,7 +15,7 @@ import (
|
||||||
type Schema struct {
|
type Schema struct {
|
||||||
// Definitions that can be reused and referenced throughout the schema. The
|
// Definitions that can be reused and referenced throughout the schema. The
|
||||||
// syntax for a reference is $ref: #/$defs/<path.to.definition>
|
// syntax for a reference is $ref: #/$defs/<path.to.definition>
|
||||||
Definitions any `json:"$defs,omitempty"`
|
Definitions map[string]any `json:"$defs,omitempty"`
|
||||||
|
|
||||||
// Type of the object
|
// Type of the object
|
||||||
Type Type `json:"type,omitempty"`
|
Type Type `json:"type,omitempty"`
|
||||||
|
|
Loading…
Reference in New Issue