forked from hswaw/hscloud
kube/kube.libsonnet: add OpenAPI.Require
This allows for the following: local oa = kube.OpenAPI, vaidation: oa.Validation(oa.Dict { foo: oa.Required(oa.String), bar: oa.Required(oa.Array(oa.Dict { baz: oa.Boolean, })), }), No more `oa.String { required:: true }`! Change-Id: I4ecc5002e83a8a1cfcdf083d425d7decd4cf8871
This commit is contained in:
parent
5a89d225e7
commit
0b6d5d526f
1 changed files with 4 additions and 0 deletions
|
@ -45,6 +45,10 @@ kube {
|
|||
openAPIV3Schema: obj.render,
|
||||
},
|
||||
|
||||
Required(inner):: inner {
|
||||
required:: true,
|
||||
},
|
||||
|
||||
Dict:: {
|
||||
local dict = self,
|
||||
required:: false,
|
||||
|
|
Loading…
Add table
Reference in a new issue