Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[json schema] When we don’t know a field’s type, let’s leave it empty #3964

Merged
merged 1 commit into from
Apr 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1351,7 +1351,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta10.json
Original file line number Diff line number Diff line change
Expand Up @@ -1153,7 +1153,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta11.json
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta12.json
Original file line number Diff line number Diff line change
Expand Up @@ -1162,7 +1162,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta13.json
Original file line number Diff line number Diff line change
Expand Up @@ -1214,7 +1214,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta14.json
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta15.json
Original file line number Diff line number Diff line change
Expand Up @@ -1208,7 +1208,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta16.json
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta17.json
Original file line number Diff line number Diff line change
Expand Up @@ -1250,7 +1250,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta5.json
Original file line number Diff line number Diff line change
Expand Up @@ -957,7 +957,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta6.json
Original file line number Diff line number Diff line change
Expand Up @@ -1006,7 +1006,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta7.json
Original file line number Diff line number Diff line change
Expand Up @@ -1101,7 +1101,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta8.json
Original file line number Diff line number Diff line change
Expand Up @@ -1147,7 +1147,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v1beta9.json
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v2alpha1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1364,7 +1364,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v2alpha2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1303,7 +1303,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v2alpha3.json
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v2alpha4.json
Original file line number Diff line number Diff line change
Expand Up @@ -1335,7 +1335,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v2beta1.json
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
1 change: 0 additions & 1 deletion docs/content/en/schemas/v2beta2.json
Original file line number Diff line number Diff line change
Expand Up @@ -1339,7 +1339,6 @@
]
},
"value": {
"type": "object",
"description": "value to apply. Can be any portion of yaml.",
"x-intellij-html-description": "value to apply. Can be any portion of yaml."
}
Expand Down
2 changes: 0 additions & 2 deletions hack/schemas/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,6 @@ func (g *schemaGenerator) newDefinition(name string, t ast.Expr, comment string,
if ident, ok := tt.X.(*ast.Ident); ok {
typeName := ident.Name
setTypeOrRef(def, typeName)
} else if _, ok := tt.X.(*ast.SelectorExpr); ok {
def.Type = "object"
}

case *ast.ArrayType:
Expand Down