mirror of https://github.com/databricks/cli.git
fixed typo, and tested schema is working
This commit is contained in:
parent
926db54a6d
commit
cc5ed2bc76
|
@ -11,15 +11,15 @@ const MaxHistoryOccurances = 3
|
|||
// TODO: should omit empty denote non required fields in the json schema?
|
||||
type Schema struct {
|
||||
Type JsType `json:"type"`
|
||||
Properities map[string]*Property `json:"properities,omitempty"`
|
||||
AdditionalProperities *Property `json:"additionalProperities,omitempty"`
|
||||
Properities map[string]*Property `json:"properties,omitempty"`
|
||||
AdditionalProperities *Property `json:"additionalProperties,omitempty"`
|
||||
}
|
||||
|
||||
type Property struct {
|
||||
Type JsType `json:"type"`
|
||||
Items *Item `json:"item,omitempty"`
|
||||
Properities map[string]*Property `json:"properities,omitempty"`
|
||||
AdditionalProperities *Property `json:"additionalProperities,omitempty"`
|
||||
Properities map[string]*Property `json:"properties,omitempty"`
|
||||
AdditionalProperities *Property `json:"additionalProperties,omitempty"`
|
||||
}
|
||||
|
||||
// TODO: panic for now, add support for adding schemas to $defs in case of cycles
|
||||
|
|
|
@ -44,7 +44,7 @@ func TestNumberStringBooleanSchema(t *testing.T) {
|
|||
expected :=
|
||||
`{
|
||||
"type": "object",
|
||||
"properities": {
|
||||
"properties": {
|
||||
"bool_val": {
|
||||
"type": "string"
|
||||
},
|
||||
|
@ -119,10 +119,10 @@ func TestObjectSchema(t *testing.T) {
|
|||
expected :=
|
||||
`{
|
||||
"type": "object",
|
||||
"properities": {
|
||||
"properties": {
|
||||
"hero": {
|
||||
"type": "object",
|
||||
"properities": {
|
||||
"properties": {
|
||||
"age": {
|
||||
"type": "number"
|
||||
},
|
||||
|
@ -133,7 +133,7 @@ func TestObjectSchema(t *testing.T) {
|
|||
},
|
||||
"plot": {
|
||||
"type": "object",
|
||||
"properities": {
|
||||
"properties": {
|
||||
"stakes": {
|
||||
"type": "array",
|
||||
"item": {
|
||||
|
@ -144,7 +144,7 @@ func TestObjectSchema(t *testing.T) {
|
|||
},
|
||||
"villian": {
|
||||
"type": "object",
|
||||
"properities": {
|
||||
"properties": {
|
||||
"age": {
|
||||
"type": "number"
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue