diff --git a/Makefile b/Makefile index 8cff9a2..9e01d4d 100644 --- a/Makefile +++ b/Makefile @@ -32,9 +32,9 @@ test/go/unit: $(call _print_step,Running Go unit tests) go test -race -cover ./... -.PHONY: check check/vet check/lint check/gosec check/spell check/trailing check/markdown check/format +.PHONY: check check/vet check/lint check/gosec check/spell check/trailing check/markdown check/format check/generate ## Run all checks. -check: check/vet check/lint check/gosec check/spell check/trailing check/markdown check/format +check: check/vet check/lint check/gosec check/spell check/trailing check/markdown check/format check/generate ## Run 'go vet' on the whole project. check/vet: @@ -77,26 +77,39 @@ check/format: $(call _print_step,Checking if files are formatted) $(SCRIPTS_DIR)/check-formatting.sh -.PHONY: generate +## Verify if the auto generated code has been committed. +check/generate: + $(call _print_step,Checking if generated code matches the provided definitions) + $(SCRIPTS_DIR)/check-generate.sh + +.PHONY: generate generate/go generate/govydoc +## Auto generate files. +generate: generate/go generate/govydoc + ## Generate Golang code. -generate: - echo "Generating Go code..." +generate/go: + $(call _print_step,Generating Go code) go generate ./... +## Generate object docs using govydoc. +generate/govydoc: + $(call _print_step,Generating object docs) + go run ./internal/cmd/objectdoc/main.go > ./internal/cmd/objectdoc/docs.json + .PHONY: format format/go format/cspell ## Format files. format: format/go format/cspell ## Format Go files. format/go: - echo "Formatting Go files..." + $(call _print_step,Formatting Go files) gofumpt -l -w -extra . goimports -local=$$(head -1 go.mod | awk '{print $$2}') -w . golines -m 120 --ignore-generated --reformat-tags -w . ## Format cspell config file. format/cspell: - echo "Formatting cspell.yaml configuration (words list)..." + $(call _print_step,Formatting cspell.yaml configuration \(words list\)) yarn --silent format-cspell-config .PHONY: install @@ -105,7 +118,7 @@ install: install/yarn ## Install JS dependencies with yarn. install/yarn: - echo "Installing yarn dependencies..." + $(call _print_step,Installing yarn dependencies) yarn --silent install .PHONY: help diff --git a/cspell.json b/cspell.json index efc1a46..f3c9376 100644 --- a/cspell.json +++ b/cspell.json @@ -19,7 +19,9 @@ "**/*.lock", "package.json", "go.mod", - "go.sum" + "go.sum", + "go.work", + "go.work.sum" ], "ignoreRegExpList": [ "/\\|\\s+[T|G]{2,}\\s+\\|/g", @@ -44,6 +46,7 @@ "gosec", "govulncheck", "govy", + "govydoc", "govytest", "mhdw", "nocomments", diff --git a/go.mod b/go.mod index f6bd720..b2dc2a6 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/OpenSLO/go-sdk go 1.24 require ( - github.com/nobl9/govy v0.21.0 + github.com/nobl9/govy v0.22.0-rc1 sigs.k8s.io/yaml v1.6.0 ) diff --git a/go.sum b/go.sum index 7c6ed22..5823409 100644 --- a/go.sum +++ b/go.sum @@ -1,7 +1,7 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= -github.com/nobl9/govy v0.21.0 h1:RDV8zMbcGpmk9vnyvjM5QLHALqttI5/RG/lQ6hRSyS4= -github.com/nobl9/govy v0.21.0/go.mod h1:DN0zA5jtaHrb+uKPATycrlr7HRJy27QUaUg8LEeTsxo= +github.com/nobl9/govy v0.22.0-rc1 h1:FMhHuqxhq7Mz2U2zgHsuQ540FqnltyEz/P5gMYs2WOg= +github.com/nobl9/govy v0.22.0-rc1/go.mod h1:DN0zA5jtaHrb+uKPATycrlr7HRJy27QUaUg8LEeTsxo= go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= go.yaml.in/yaml/v3 v3.0.3 h1:bXOww4E/J3f66rav3pX3m8w6jDE4knZjGOw8b5Y6iNE= diff --git a/go.work b/go.work new file mode 100644 index 0000000..07a64a9 --- /dev/null +++ b/go.work @@ -0,0 +1,6 @@ +go 1.24.7 + +use ( + . + ./internal/cmd/objectdoc +) diff --git a/go.work.sum b/go.work.sum new file mode 100644 index 0000000..8694af3 --- /dev/null +++ b/go.work.sum @@ -0,0 +1,98 @@ +github.com/OpenSLO/go-sdk v0.8.0/go.mod h1:Kn5r0/Dvievh4VD4+aOpJ1/GAYqiUeLz2UXHwbty95o= +github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.5.9/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/nobl9/govy v0.20.0/go.mod h1:DN0zA5jtaHrb+uKPATycrlr7HRJy27QUaUg8LEeTsxo= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= +github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw= +github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo= +github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA= +github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= +github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= +github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +github.com/yuin/goldmark v1.4.13/go.mod h1:6yULJ656Px+3vBD8DxQVa3kxgyrAnzto9xy5taEt/CY= +golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= +golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc= +golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc= +golang.org/x/crypto v0.19.0/go.mod h1:Iy9bg/ha4yyC70EfRS8jz+B6ybOBKMaSxLj6P6oBDfU= +golang.org/x/crypto v0.23.0/go.mod h1:CKFgDieR+mRhux2Lsu27y0fO304Db0wZe70UKqHu0v8= +golang.org/x/crypto v0.38.0/go.mod h1:MvrbAqul58NNYPKnOra203SB9vpuZW0e+RRZV+Ggqjw= +golang.org/x/crypto v0.39.0/go.mod h1:L+Xg3Wf6HoL4Bn4238Z6ft6KfEpN0tJGo53AAPC632U= +golang.org/x/crypto v0.40.0/go.mod h1:Qr1vMER5WyS2dfPHAlsOj01wgLbsyWtFn/aY+5+ZdxY= +golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4= +golang.org/x/mod v0.8.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.12.0/go.mod h1:iBbtSCu2XBx23ZKBPSOrRkjjQPZFPuis4dIYUhu/chs= +golang.org/x/mod v0.15.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.24.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/mod v0.25.0/go.mod h1:IXM97Txy2VM4PJ3gI61r1YEk/gAj6zAHN3AdZt6S9Ww= +golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c= +golang.org/x/net v0.6.0/go.mod h1:2Tu9+aMcznHK/AK1HMvgo6xiTLG5rD5rZLDS+rp2Bjs= +golang.org/x/net v0.10.0/go.mod h1:0qNGK6F8kojg2nk9dLZ2mShWaEBan6FAoqfSigmmuDg= +golang.org/x/net v0.15.0/go.mod h1:idbUs1IY1+zTqbi8yxTbhexhEEk5ur9LInksu6HrEpk= +golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= +golang.org/x/net v0.40.0/go.mod h1:y0hY0exeL2Pku80/zKK7tpntoX23cqL3Oa6njdgRtds= +golang.org/x/net v0.41.0/go.mod h1:B/K4NNqkfmg07DQYrbwvSluqCJOOXwUjeb/5lOisjbA= +golang.org/x/net v0.42.0/go.mod h1:FF1RA5d3u7nAYA4z2TkclSCKh68eSXtiFwcWQpPXdt8= +golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.1.0/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y= +golang.org/x/sync v0.6.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.14.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sync v0.15.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= +golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.8.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.33.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/sys v0.34.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= +golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= +golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= +golang.org/x/telemetry v0.0.0-20250710130107-8d8967aff50b/go.mod h1:4ZwOYna0/zsOKwuR5X/m0QFOJpSZvAxFfkQT+Erd9D4= +golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= +golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8= +golang.org/x/term v0.5.0/go.mod h1:jMB1sMXY+tzblOD4FWmEbocvup2/aLOaQEp7JmGp78k= +golang.org/x/term v0.8.0/go.mod h1:xPskH00ivmX89bAKVGSKKtLOWNx2+17Eiy94tnKShWo= +golang.org/x/term v0.12.0/go.mod h1:owVbMEjm3cBLCHdkQu9b1opXd4ETQWc3BhuQGKgXgvU= +golang.org/x/term v0.17.0/go.mod h1:lLRBjIVuehSbZlaOtGMbcMncT+aqLLLmKrsjNrUguwk= +golang.org/x/term v0.20.0/go.mod h1:8UkIAJTvZgivsXaD6/pH6U9ecQzZ45awqEOzuCvwpFY= +golang.org/x/term v0.32.0/go.mod h1:uZG1FhGx848Sqfsq4/DlJr3xGGsYMu/L5GW4abiaEPQ= +golang.org/x/term v0.33.0/go.mod h1:s18+ql9tYWp1IfpV9DmCtQDDSRBUjKaw9M1eAv5UeF0= +golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= +golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ= +golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8= +golang.org/x/text v0.9.0/go.mod h1:e1OnstbJyHTd6l/uOt8jFFHp6TRDWZR/bV3emEE/zU8= +golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.25.0/go.mod h1:WEdwpYrmk1qmdHvhkSTNPm3app7v4rsT8F2UD6+VHIA= +golang.org/x/text v0.26.0/go.mod h1:QK15LZJUUQVJxhz7wXgxSy/CJaTFjd0G+YLonydOVQA= +golang.org/x/text v0.27.0/go.mod h1:1D28KMCvyooCX9hBiosv5Tz/+YLxj0j7XhWjpSUF7CU= +golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= +golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.1.12/go.mod h1:hNGJHUnrk76NpqgfD5Aqm5Crs+Hm0VOH/i9J2+nxYbc= +golang.org/x/tools v0.6.0/go.mod h1:Xwgl3UAJ/d3gWutnCtw505GrjyAbvKui8lOU390QaIU= +golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= +golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= +golang.org/x/tools v0.33.0/go.mod h1:CIJMaWEY88juyUfo7UbgPqbC8rU2OqfAV1h2Qp0oMYI= +golang.org/x/tools v0.34.0/go.mod h1:pAP9OwEaY1CAW3HOmg3hLZC5Z0CCmzjAF2UQMSqNARg= +golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= +gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +sigs.k8s.io/randfill v1.0.0/go.mod h1:XeLlZ/jmk4i1HRopwe7/aU3H5n1zNUcX6TM94b3QxOY= diff --git a/internal/cmd/objectdoc/README.md b/internal/cmd/objectdoc/README.md new file mode 100644 index 0000000..9e61a58 --- /dev/null +++ b/internal/cmd/objectdoc/README.md @@ -0,0 +1,17 @@ +# objectdoc + +This little utility registers all OpenSLO objects across all versions, and: +extracts their [govy validators](https://pkg.go.dev/github.com/nobl9/govy/pkg/govy#Validator) +and feeds it into [govydoc](https://github.com/nieomylnieja/govydoc) +which in turn produces a complete documentation for each object based on their +[govy validation plan](https://pkg.go.dev/github.com/nobl9/govy/pkg/govy#Plan), +type definitions, code docs and examples. + +The output is a structured JSON which is written to stdout. + +## Usage + +The generated file is used to build https://openslo.com website. +There are checks in place which will fail if the generated file has not been updated. + +In order to update the file simply run `make generate`. diff --git a/internal/cmd/objectdoc/docs.json b/internal/cmd/objectdoc/docs.json new file mode 100644 index 0000000..97fcf90 --- /dev/null +++ b/internal/cmd/objectdoc/docs.json @@ -0,0 +1,13362 @@ +{ + "openslo.com/v2alpha": { + "AlertCondition": { + "name": "v2alpha.AlertCondition", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "AlertCondition", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo.com/v2alpha" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo.com/v2alpha'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertCondition" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertCondition'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "AlertConditionSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.severity", + "$.spec.condition", + "$.spec.description" + ] + }, + { + "path": "$.spec.severity", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.condition", + "typeInfo": { + "name": "AlertConditionType", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.condition.kind", + "$.spec.condition.op", + "$.spec.condition.threshold", + "$.spec.condition.lookbackWindow", + "$.spec.condition.alertAfter" + ] + }, + { + "path": "$.spec.condition.kind", + "typeInfo": { + "name": "AlertConditionKind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "burnrate" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: burnrate", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.condition.op", + "typeInfo": { + "name": "Operator", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "gt", + "lt", + "gte", + "lte" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: gt, lt, gte, lte", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.condition.threshold", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.condition.lookbackWindow", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.condition.alertAfter", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + } + ] + }, + "AlertNotificationTarget": { + "name": "v2alpha.AlertNotificationTarget", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "AlertNotificationTarget", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo.com/v2alpha" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo.com/v2alpha'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertNotificationTarget" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertNotificationTarget'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "AlertNotificationTargetSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.description", + "$.spec.target" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.target", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + } + ] + }, + "AlertPolicy": { + "name": "v2alpha.AlertPolicy", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "AlertPolicy", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo.com/v2alpha" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo.com/v2alpha'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertPolicy" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertPolicy'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "AlertPolicySpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.description", + "$.spec.alertWhenNoData", + "$.spec.alertWhenBreaching", + "$.spec.alertWhenResolved", + "$.spec.conditions", + "$.spec.conditions[*]", + "$.spec.notificationTargets", + "$.spec.notificationTargets[*]" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertWhenNoData", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.alertWhenBreaching", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.alertWhenResolved", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.conditions", + "typeInfo": { + "name": "[]AlertPolicyCondition", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "length must be between 1 and 1", + "errorCode": "slice_length" + } + ] + }, + { + "path": "$.spec.conditions[*]", + "typeInfo": { + "name": "AlertPolicyCondition", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "properties are mutually exclusive: conditionRef, spec", + "errorCode": "mutually_exclusive" + }, + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.conditions[*].conditionRef", + "$.spec.conditions[*].kind", + "$.spec.conditions[*].metadata", + "$.spec.conditions[*].spec" + ] + }, + { + "path": "$.spec.conditions[*].conditionRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.conditions[*].kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertCondition" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertCondition'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.spec.conditions[*].metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.conditions[*].metadata.name", + "$.spec.conditions[*].metadata.labels", + "$.spec.conditions[*].metadata.annotations" + ] + }, + { + "path": "$.spec.conditions[*].metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.conditions[*].metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.conditions[*].metadata.labels.~", + "$.spec.conditions[*].metadata.labels.*" + ] + }, + { + "path": "$.spec.conditions[*].metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.conditions[*].metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.spec.conditions[*].metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.conditions[*].metadata.annotations.~", + "$.spec.conditions[*].metadata.annotations.*" + ] + }, + { + "path": "$.spec.conditions[*].metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.conditions[*].metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.conditions[*].spec", + "typeInfo": { + "name": "AlertConditionSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.conditions[*].spec.severity", + "$.spec.conditions[*].spec.condition", + "$.spec.conditions[*].spec.description" + ] + }, + { + "path": "$.spec.conditions[*].spec.severity", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.conditions[*].spec.condition", + "typeInfo": { + "name": "AlertConditionType", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.conditions[*].spec.condition.kind", + "$.spec.conditions[*].spec.condition.op", + "$.spec.conditions[*].spec.condition.threshold", + "$.spec.conditions[*].spec.condition.lookbackWindow", + "$.spec.conditions[*].spec.condition.alertAfter" + ] + }, + { + "path": "$.spec.conditions[*].spec.condition.kind", + "typeInfo": { + "name": "AlertConditionKind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "burnrate" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: burnrate", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.conditions[*].spec.condition.op", + "typeInfo": { + "name": "Operator", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "gt", + "lt", + "gte", + "lte" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: gt, lt, gte, lte", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.conditions[*].spec.condition.threshold", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.conditions[*].spec.condition.lookbackWindow", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.conditions[*].spec.condition.alertAfter", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.conditions[*].spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.notificationTargets", + "typeInfo": { + "name": "[]AlertPolicyNotificationTarget", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "length must be greater than or equal to 1", + "errorCode": "slice_min_length" + } + ] + }, + { + "path": "$.spec.notificationTargets[*]", + "typeInfo": { + "name": "AlertPolicyNotificationTarget", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "properties are mutually exclusive: spec, targetRef", + "errorCode": "mutually_exclusive" + }, + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.notificationTargets[*].targetRef", + "$.spec.notificationTargets[*].kind", + "$.spec.notificationTargets[*].metadata", + "$.spec.notificationTargets[*].spec" + ] + }, + { + "path": "$.spec.notificationTargets[*].targetRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.notificationTargets[*].kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertNotificationTarget" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertNotificationTarget'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.spec.notificationTargets[*].metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.notificationTargets[*].metadata.name", + "$.spec.notificationTargets[*].metadata.labels", + "$.spec.notificationTargets[*].metadata.annotations" + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.notificationTargets[*].metadata.labels.~", + "$.spec.notificationTargets[*].metadata.labels.*" + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.notificationTargets[*].metadata.annotations.~", + "$.spec.notificationTargets[*].metadata.annotations.*" + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.notificationTargets[*].spec", + "typeInfo": { + "name": "AlertNotificationTargetSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.notificationTargets[*].spec.description", + "$.spec.notificationTargets[*].spec.target" + ] + }, + { + "path": "$.spec.notificationTargets[*].spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.notificationTargets[*].spec.target", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + } + ] + }, + "DataSource": { + "name": "v2alpha.DataSource", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "DataSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo.com/v2alpha" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo.com/v2alpha'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "DataSource" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'DataSource'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.description", + "$.spec.type", + "$.spec.connectionDetails", + "$.spec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + } + ] + }, + "SLI": { + "name": "v2alpha.SLI", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "SLI", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo.com/v2alpha" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo.com/v2alpha'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "SLI" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'SLI'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "SLISpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "properties are mutually exclusive: ratioMetric, thresholdMetric", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.description", + "$.spec.thresholdMetric", + "$.spec.ratioMetric" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.thresholdMetric", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.thresholdMetric.dataSourceRef", + "$.spec.thresholdMetric.dataSourceSpec", + "$.spec.thresholdMetric.spec" + ] + }, + { + "path": "$.spec.thresholdMetric.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.thresholdMetric.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.thresholdMetric.dataSourceSpec.description", + "$.spec.thresholdMetric.dataSourceSpec.type", + "$.spec.thresholdMetric.dataSourceSpec.connectionDetails", + "$.spec.thresholdMetric.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.thresholdMetric.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.thresholdMetric.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.thresholdMetric.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.thresholdMetric.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.thresholdMetric.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.thresholdMetric.spec.~", + "$.spec.thresholdMetric.spec.*" + ] + }, + { + "path": "$.spec.thresholdMetric.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.thresholdMetric.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.ratioMetric", + "typeInfo": { + "name": "SLIRatioMetric", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: raw, total", + "errorCode": "mutually_exclusive" + }, + { + "description": "properties are mutually exclusive: bad, good, raw", + "errorCode": "mutually_exclusive" + }, + { + "description": "one of [bad, good] properties must be set, none was provided", + "errorCode": "one_of_properties" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.counter", + "$.spec.ratioMetric.good", + "$.spec.ratioMetric.bad", + "$.spec.ratioMetric.total", + "$.spec.ratioMetric.rawType", + "$.spec.ratioMetric.raw" + ] + }, + { + "path": "$.spec.ratioMetric.counter", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.ratioMetric.good", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.good.dataSourceRef", + "$.spec.ratioMetric.good.dataSourceSpec", + "$.spec.ratioMetric.good.spec" + ] + }, + { + "path": "$.spec.ratioMetric.good.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.ratioMetric.good.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.good.dataSourceSpec.description", + "$.spec.ratioMetric.good.dataSourceSpec.type", + "$.spec.ratioMetric.good.dataSourceSpec.connectionDetails", + "$.spec.ratioMetric.good.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.ratioMetric.good.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.ratioMetric.good.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.ratioMetric.good.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.ratioMetric.good.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.ratioMetric.good.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.ratioMetric.good.spec.~", + "$.spec.ratioMetric.good.spec.*" + ] + }, + { + "path": "$.spec.ratioMetric.good.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.good.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.ratioMetric.bad", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.bad.dataSourceRef", + "$.spec.ratioMetric.bad.dataSourceSpec", + "$.spec.ratioMetric.bad.spec" + ] + }, + { + "path": "$.spec.ratioMetric.bad.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.ratioMetric.bad.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.bad.dataSourceSpec.description", + "$.spec.ratioMetric.bad.dataSourceSpec.type", + "$.spec.ratioMetric.bad.dataSourceSpec.connectionDetails", + "$.spec.ratioMetric.bad.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.ratioMetric.bad.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.ratioMetric.bad.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.ratioMetric.bad.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.ratioMetric.bad.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.ratioMetric.bad.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.ratioMetric.bad.spec.~", + "$.spec.ratioMetric.bad.spec.*" + ] + }, + { + "path": "$.spec.ratioMetric.bad.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.bad.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.ratioMetric.total", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.total.dataSourceRef", + "$.spec.ratioMetric.total.dataSourceSpec", + "$.spec.ratioMetric.total.spec" + ] + }, + { + "path": "$.spec.ratioMetric.total.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.ratioMetric.total.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.total.dataSourceSpec.description", + "$.spec.ratioMetric.total.dataSourceSpec.type", + "$.spec.ratioMetric.total.dataSourceSpec.connectionDetails", + "$.spec.ratioMetric.total.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.ratioMetric.total.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.ratioMetric.total.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.ratioMetric.total.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.ratioMetric.total.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.ratioMetric.total.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.ratioMetric.total.spec.~", + "$.spec.ratioMetric.total.spec.*" + ] + }, + { + "path": "$.spec.ratioMetric.total.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.total.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.ratioMetric.rawType", + "typeInfo": { + "name": "SLIRawMetricType", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "success", + "failure" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: success, failure", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.ratioMetric.raw", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.raw.dataSourceRef", + "$.spec.ratioMetric.raw.dataSourceSpec", + "$.spec.ratioMetric.raw.spec" + ] + }, + { + "path": "$.spec.ratioMetric.raw.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.ratioMetric.raw.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.raw.dataSourceSpec.description", + "$.spec.ratioMetric.raw.dataSourceSpec.type", + "$.spec.ratioMetric.raw.dataSourceSpec.connectionDetails", + "$.spec.ratioMetric.raw.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.ratioMetric.raw.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.ratioMetric.raw.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.ratioMetric.raw.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.ratioMetric.raw.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.ratioMetric.raw.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.ratioMetric.raw.spec.~", + "$.spec.ratioMetric.raw.spec.*" + ] + }, + { + "path": "$.spec.ratioMetric.raw.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.raw.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + } + ] + }, + "SLO": { + "name": "v2alpha.SLO", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "SLO", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo.com/v2alpha" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo.com/v2alpha'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "SLO" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'SLO'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "SLOSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "'sli' or 'sliRef' fields must either be defined on the 'spec' level (standard SLOs) or on the 'spec.objectives[*]' level (composite SLOs)", + "errorCode": "mutually_exclusive" + }, + { + "description": "properties are mutually exclusive: sli, sliRef", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.description", + "$.spec.serviceRef", + "$.spec.sli", + "$.spec.sliRef", + "$.spec.budgetingMethod", + "$.spec.timeWindow", + "$.spec.timeWindow[*]", + "$.spec.objectives", + "$.spec.objectives[*]", + "$.spec.alertPolicies", + "$.spec.alertPolicies[*]" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.serviceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli", + "typeInfo": { + "name": "SLOSLIInline", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.sli.metadata", + "$.spec.sli.spec" + ] + }, + { + "path": "$.spec.sli.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.sli.metadata.name", + "$.spec.sli.metadata.labels", + "$.spec.sli.metadata.annotations" + ] + }, + { + "path": "$.spec.sli.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.sli.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.sli.metadata.labels.~", + "$.spec.sli.metadata.labels.*" + ] + }, + { + "path": "$.spec.sli.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.sli.metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.spec.sli.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.sli.metadata.annotations.~", + "$.spec.sli.metadata.annotations.*" + ] + }, + { + "path": "$.spec.sli.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.sli.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.sli.spec", + "typeInfo": { + "name": "SLISpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "properties are mutually exclusive: ratioMetric, thresholdMetric", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.description", + "$.spec.sli.spec.thresholdMetric", + "$.spec.sli.spec.ratioMetric" + ] + }, + { + "path": "$.spec.sli.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.sli.spec.thresholdMetric", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.thresholdMetric.dataSourceRef", + "$.spec.sli.spec.thresholdMetric.dataSourceSpec", + "$.spec.sli.spec.thresholdMetric.spec" + ] + }, + { + "path": "$.spec.sli.spec.thresholdMetric.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.sli.spec.thresholdMetric.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.thresholdMetric.dataSourceSpec.description", + "$.spec.sli.spec.thresholdMetric.dataSourceSpec.type", + "$.spec.sli.spec.thresholdMetric.dataSourceSpec.connectionDetails", + "$.spec.sli.spec.thresholdMetric.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.sli.spec.thresholdMetric.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.sli.spec.thresholdMetric.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli.spec.thresholdMetric.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli.spec.thresholdMetric.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.sli.spec.thresholdMetric.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.sli.spec.thresholdMetric.spec.~", + "$.spec.sli.spec.thresholdMetric.spec.*" + ] + }, + { + "path": "$.spec.sli.spec.thresholdMetric.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.sli.spec.thresholdMetric.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric", + "typeInfo": { + "name": "SLIRatioMetric", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: raw, total", + "errorCode": "mutually_exclusive" + }, + { + "description": "properties are mutually exclusive: bad, good, raw", + "errorCode": "mutually_exclusive" + }, + { + "description": "one of [bad, good] properties must be set, none was provided", + "errorCode": "one_of_properties" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.counter", + "$.spec.sli.spec.ratioMetric.good", + "$.spec.sli.spec.ratioMetric.bad", + "$.spec.sli.spec.ratioMetric.total", + "$.spec.sli.spec.ratioMetric.rawType", + "$.spec.sli.spec.ratioMetric.raw" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.counter", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.good", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.good.dataSourceRef", + "$.spec.sli.spec.ratioMetric.good.dataSourceSpec", + "$.spec.sli.spec.ratioMetric.good.spec" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.good.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.good.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.good.dataSourceSpec.description", + "$.spec.sli.spec.ratioMetric.good.dataSourceSpec.type", + "$.spec.sli.spec.ratioMetric.good.dataSourceSpec.connectionDetails", + "$.spec.sli.spec.ratioMetric.good.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.good.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.good.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.good.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.good.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.good.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.good.spec.~", + "$.spec.sli.spec.ratioMetric.good.spec.*" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.good.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.good.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.bad", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.bad.dataSourceRef", + "$.spec.sli.spec.ratioMetric.bad.dataSourceSpec", + "$.spec.sli.spec.ratioMetric.bad.spec" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.bad.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.bad.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.bad.dataSourceSpec.description", + "$.spec.sli.spec.ratioMetric.bad.dataSourceSpec.type", + "$.spec.sli.spec.ratioMetric.bad.dataSourceSpec.connectionDetails", + "$.spec.sli.spec.ratioMetric.bad.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.bad.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.bad.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.bad.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.bad.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.bad.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.bad.spec.~", + "$.spec.sli.spec.ratioMetric.bad.spec.*" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.bad.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.bad.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.total", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.total.dataSourceRef", + "$.spec.sli.spec.ratioMetric.total.dataSourceSpec", + "$.spec.sli.spec.ratioMetric.total.spec" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.total.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.total.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.total.dataSourceSpec.description", + "$.spec.sli.spec.ratioMetric.total.dataSourceSpec.type", + "$.spec.sli.spec.ratioMetric.total.dataSourceSpec.connectionDetails", + "$.spec.sli.spec.ratioMetric.total.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.total.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.total.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.total.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.total.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.total.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.total.spec.~", + "$.spec.sli.spec.ratioMetric.total.spec.*" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.total.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.total.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.rawType", + "typeInfo": { + "name": "SLIRawMetricType", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "success", + "failure" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: success, failure", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.raw", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.raw.dataSourceRef", + "$.spec.sli.spec.ratioMetric.raw.dataSourceSpec", + "$.spec.sli.spec.ratioMetric.raw.spec" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.raw.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.raw.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.raw.dataSourceSpec.description", + "$.spec.sli.spec.ratioMetric.raw.dataSourceSpec.type", + "$.spec.sli.spec.ratioMetric.raw.dataSourceSpec.connectionDetails", + "$.spec.sli.spec.ratioMetric.raw.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.raw.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.raw.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.raw.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.raw.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.raw.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.sli.spec.ratioMetric.raw.spec.~", + "$.spec.sli.spec.ratioMetric.raw.spec.*" + ] + }, + { + "path": "$.spec.sli.spec.ratioMetric.raw.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.sli.spec.ratioMetric.raw.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.sliRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.budgetingMethod", + "typeInfo": { + "name": "SLOBudgetingMethod", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "Occurrences", + "Timeslices", + "RatioTimeslices" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: Occurrences, Timeslices, RatioTimeslices", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.timeWindow", + "typeInfo": { + "name": "[]SLOTimeWindow", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "length must be between 1 and 1", + "errorCode": "slice_length" + } + ] + }, + { + "path": "$.spec.timeWindow[*]", + "typeInfo": { + "name": "SLOTimeWindow", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.timeWindow[*].duration", + "$.spec.timeWindow[*].isRolling", + "$.spec.timeWindow[*].calendar" + ] + }, + { + "path": "$.spec.timeWindow[*].duration", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.timeWindow[*].isRolling", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.timeWindow[*].calendar", + "typeInfo": { + "name": "SLOCalendar", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.timeWindow[*].calendar.startTime", + "$.spec.timeWindow[*].calendar.timeZone" + ] + }, + { + "path": "$.spec.timeWindow[*].calendar.startTime", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must be a valid date and time in '2006-01-02 15:04:05' format", + "details": "date and time format follows Go's time layout, see https://pkg.go.dev/time#Layout for more details", + "errorCode": "string_date_time" + } + ] + }, + { + "path": "$.spec.timeWindow[*].calendar.timeZone", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must be a valid IANA Time Zone Database code", + "errorCode": "string_time_zone", + "examples": [ + "UTC", + "America/New_York", + "Europe/Warsaw" + ] + } + ] + }, + { + "path": "$.spec.objectives", + "typeInfo": { + "name": "[]SLOObjective", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + } + }, + { + "path": "$.spec.objectives[*]", + "typeInfo": { + "name": "SLOObjective", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "properties are mutually exclusive: target, targetPercent", + "errorCode": "mutually_exclusive" + }, + { + "description": "properties are mutually exclusive: sli, sliRef", + "errorCode": "mutually_exclusive", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].displayName", + "$.spec.objectives[*].op", + "$.spec.objectives[*].value", + "$.spec.objectives[*].target", + "$.spec.objectives[*].targetPercent", + "$.spec.objectives[*].timeSliceTarget", + "$.spec.objectives[*].timeSliceWindow", + "$.spec.objectives[*].sli", + "$.spec.objectives[*].sliRef", + "$.spec.objectives[*].compositeWeight" + ] + }, + { + "path": "$.spec.objectives[*].displayName", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].op", + "typeInfo": { + "name": "Operator", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "gt", + "lt", + "gte", + "lte" + ], + "rules": [ + { + "description": "property is forbidden", + "errorCode": "forbidden", + "conditions": [ + "'sli.spec.ratioMetric' is set" + ] + }, + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "'sli.spec.thresholdMetric' is set" + ] + }, + { + "description": "must be one of: gt, lt, gte, lte", + "errorCode": "one_of", + "conditions": [ + "'sli.spec.thresholdMetric' is set" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].value", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is forbidden", + "errorCode": "forbidden", + "conditions": [ + "'sli.spec.ratioMetric' is set" + ] + }, + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "'sli.spec.thresholdMetric' is set" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].target", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "should be greater than or equal to '0'", + "errorCode": "greater_than_or_equal_to" + }, + { + "description": "should be less than '1'", + "errorCode": "less_than" + } + ] + }, + { + "path": "$.spec.objectives[*].targetPercent", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "should be greater than or equal to '0'", + "errorCode": "greater_than_or_equal_to" + }, + { + "description": "should be less than '100'", + "errorCode": "less_than" + } + ] + }, + { + "path": "$.spec.objectives[*].timeSliceTarget", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be greater than '0'", + "errorCode": "greater_than" + }, + { + "description": "should be less than or equal to '1'", + "errorCode": "less_than_or_equal_to" + } + ] + }, + { + "path": "$.spec.objectives[*].timeSliceWindow", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.objectives[*].sli", + "typeInfo": { + "name": "SLOSLIInline", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.metadata", + "$.spec.objectives[*].sli.spec" + ] + }, + { + "path": "$.spec.objectives[*].sli.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.metadata.name", + "$.spec.objectives[*].sli.metadata.labels", + "$.spec.objectives[*].sli.metadata.annotations" + ] + }, + { + "path": "$.spec.objectives[*].sli.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "conditions": [ + "is composite SLO" + ], + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.objectives[*].sli.metadata.labels.~", + "$.spec.objectives[*].sli.metadata.labels.*" + ] + }, + { + "path": "$.spec.objectives[*].sli.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "conditions": [ + "is composite SLO" + ], + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "conditions": [ + "is composite SLO" + ], + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.objectives[*].sli.metadata.annotations.~", + "$.spec.objectives[*].sli.metadata.annotations.*" + ] + }, + { + "path": "$.spec.objectives[*].sli.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "conditions": [ + "is composite SLO" + ], + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].sli.spec", + "typeInfo": { + "name": "SLISpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "properties are mutually exclusive: ratioMetric, thresholdMetric", + "errorCode": "mutually_exclusive", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.description", + "$.spec.objectives[*].sli.spec.thresholdMetric", + "$.spec.objectives[*].sli.spec.ratioMetric" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.thresholdMetric", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceRef", + "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceSpec", + "$.spec.objectives[*].sli.spec.thresholdMetric.spec" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "conditions": [ + "is composite SLO" + ], + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceSpec.description", + "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceSpec.type", + "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceSpec.connectionDetails", + "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.thresholdMetric.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.thresholdMetric.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.thresholdMetric.spec.~", + "$.spec.objectives[*].sli.spec.thresholdMetric.spec.*" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.thresholdMetric.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.thresholdMetric.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric", + "typeInfo": { + "name": "SLIRatioMetric", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "properties are mutually exclusive: raw, total", + "errorCode": "mutually_exclusive", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "properties are mutually exclusive: bad, good, raw", + "errorCode": "mutually_exclusive", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "one of [bad, good] properties must be set, none was provided", + "errorCode": "one_of_properties", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.counter", + "$.spec.objectives[*].sli.spec.ratioMetric.good", + "$.spec.objectives[*].sli.spec.ratioMetric.bad", + "$.spec.objectives[*].sli.spec.ratioMetric.total", + "$.spec.objectives[*].sli.spec.ratioMetric.rawType", + "$.spec.objectives[*].sli.spec.ratioMetric.raw" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.counter", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.good", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceRef", + "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceSpec", + "$.spec.objectives[*].sli.spec.ratioMetric.good.spec" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "conditions": [ + "is composite SLO" + ], + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceSpec.description", + "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceSpec.type", + "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceSpec.connectionDetails", + "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.good.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.good.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.good.spec.~", + "$.spec.objectives[*].sli.spec.ratioMetric.good.spec.*" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.good.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.good.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.bad", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceRef", + "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceSpec", + "$.spec.objectives[*].sli.spec.ratioMetric.bad.spec" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "conditions": [ + "is composite SLO" + ], + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceSpec.description", + "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceSpec.type", + "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceSpec.connectionDetails", + "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.bad.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.bad.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.bad.spec.~", + "$.spec.objectives[*].sli.spec.ratioMetric.bad.spec.*" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.bad.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.bad.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.total", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceRef", + "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceSpec", + "$.spec.objectives[*].sli.spec.ratioMetric.total.spec" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "conditions": [ + "is composite SLO" + ], + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceSpec.description", + "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceSpec.type", + "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceSpec.connectionDetails", + "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.total.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.total.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.total.spec.~", + "$.spec.objectives[*].sli.spec.ratioMetric.total.spec.*" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.total.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.total.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.rawType", + "typeInfo": { + "name": "SLIRawMetricType", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "success", + "failure" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "must be one of: success, failure", + "errorCode": "one_of", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.raw", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "properties are mutually exclusive: dataSourceRef, dataSourceSpec", + "errorCode": "mutually_exclusive", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceRef", + "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceSpec", + "$.spec.objectives[*].sli.spec.ratioMetric.raw.spec" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "conditions": [ + "is composite SLO" + ], + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceSpec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + } + ], + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceSpec.description", + "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceSpec.type", + "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceSpec.connectionDetails", + "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceSpec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceSpec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceSpec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceSpec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.raw.dataSourceSpec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.raw.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "childrenPaths": [ + "$.spec.objectives[*].sli.spec.ratioMetric.raw.spec.~", + "$.spec.objectives[*].sli.spec.ratioMetric.raw.spec.*" + ] + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.raw.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].sli.spec.ratioMetric.raw.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.objectives[*].sliRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "conditions": [ + "is composite SLO" + ], + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].compositeWeight", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional", + "conditions": [ + "is composite SLO" + ] + }, + { + "description": "should be greater than '0'", + "errorCode": "greater_than", + "conditions": [ + "is composite SLO" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies", + "typeInfo": { + "name": "[]SLOAlertPolicy", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + } + }, + { + "path": "$.spec.alertPolicies[*]", + "typeInfo": { + "name": "SLOAlertPolicy", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "properties are mutually exclusive: spec, targetRef", + "errorCode": "mutually_exclusive" + }, + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].kind", + "$.spec.alertPolicies[*].metadata", + "$.spec.alertPolicies[*].spec", + "$.spec.alertPolicies[*].alertPolicyRef" + ] + }, + { + "path": "$.spec.alertPolicies[*].kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertPolicy" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertPolicy'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.spec.alertPolicies[*].metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].metadata.name", + "$.spec.alertPolicies[*].metadata.labels", + "$.spec.alertPolicies[*].metadata.annotations" + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].metadata.labels.~", + "$.spec.alertPolicies[*].metadata.labels.*" + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].metadata.annotations.~", + "$.spec.alertPolicies[*].metadata.annotations.*" + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.alertPolicies[*].spec", + "typeInfo": { + "name": "AlertPolicySpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.description", + "$.spec.alertPolicies[*].spec.alertWhenNoData", + "$.spec.alertPolicies[*].spec.alertWhenBreaching", + "$.spec.alertPolicies[*].spec.alertWhenResolved", + "$.spec.alertPolicies[*].spec.conditions", + "$.spec.alertPolicies[*].spec.conditions[*]", + "$.spec.alertPolicies[*].spec.notificationTargets", + "$.spec.alertPolicies[*].spec.notificationTargets[*]" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.alertWhenNoData", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.alertWhenBreaching", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.alertWhenResolved", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions", + "typeInfo": { + "name": "[]AlertPolicyCondition", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "length must be between 1 and 1", + "errorCode": "slice_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*]", + "typeInfo": { + "name": "AlertPolicyCondition", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "properties are mutually exclusive: conditionRef, spec", + "errorCode": "mutually_exclusive" + }, + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].conditionRef", + "$.spec.alertPolicies[*].spec.conditions[*].kind", + "$.spec.alertPolicies[*].spec.conditions[*].metadata", + "$.spec.alertPolicies[*].spec.conditions[*].spec" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].conditionRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertCondition" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertCondition'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].metadata.name", + "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels", + "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels.~", + "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels.*" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations.~", + "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations.*" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec", + "typeInfo": { + "name": "AlertConditionSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].spec.severity", + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition", + "$.spec.alertPolicies[*].spec.conditions[*].spec.description" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.severity", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition", + "typeInfo": { + "name": "AlertConditionType", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.kind", + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.op", + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.threshold", + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.lookbackWindow", + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.alertAfter" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.kind", + "typeInfo": { + "name": "AlertConditionKind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "burnrate" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: burnrate", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.op", + "typeInfo": { + "name": "Operator", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "values": [ + "gt", + "lt", + "gte", + "lte" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: gt, lt, gte, lte", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.threshold", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.lookbackWindow", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.alertAfter", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets", + "typeInfo": { + "name": "[]AlertPolicyNotificationTarget", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "length must be greater than or equal to 1", + "errorCode": "slice_min_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*]", + "typeInfo": { + "name": "AlertPolicyNotificationTarget", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "properties are mutually exclusive: spec, targetRef", + "errorCode": "mutually_exclusive" + }, + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.notificationTargets[*].targetRef", + "$.spec.alertPolicies[*].spec.notificationTargets[*].kind", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata", + "$.spec.alertPolicies[*].spec.notificationTargets[*].spec" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].targetRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertNotificationTarget" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertNotificationTarget'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.name", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels.~", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels.*" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations.~", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations.*" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].spec", + "typeInfo": { + "name": "AlertNotificationTargetSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.notificationTargets[*].spec.description", + "$.spec.alertPolicies[*].spec.notificationTargets[*].spec.target" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].spec.target", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].alertPolicyRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + } + ] + }, + "Service": { + "name": "v2alpha.Service", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "Service", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo.com/v2alpha" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo.com/v2alpha'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "Service" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'Service'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^([a-z0-9]([-._a-z0-9]{0,61}[a-z0-9])?)?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-label", + "my.domain_123-label" + ] + } + ] + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be between 1 and 317", + "errorCode": "string_kubernetes_qualified_name:string_length" + }, + { + "description": "string must be a Kubernetes Qualified Name", + "details": "Kubernetes Qualified Name must consist of alphanumeric characters, '-', '_' or '.', and must start and end with an alphanumeric character with an optional DNS subdomain prefix and '/'", + "errorCode": "string_kubernetes_qualified_name", + "examples": [ + "my.domain/MyName", + "MyName", + "my.name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "ServiceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" + }, + "childrenPaths": [ + "$.spec.description" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + } + ] + } + }, + "openslo/v1": { + "AlertCondition": { + "name": "v1.AlertCondition", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "AlertCondition", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo/v1" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo/v1'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertCondition" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertCondition'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.displayName", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*", + "$.metadata.labels.*[*]" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "AlertConditionSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.severity", + "$.spec.condition", + "$.spec.description" + ] + }, + { + "path": "$.spec.severity", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.condition", + "typeInfo": { + "name": "AlertConditionType", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.condition.kind", + "$.spec.condition.op", + "$.spec.condition.threshold", + "$.spec.condition.lookbackWindow", + "$.spec.condition.alertAfter" + ] + }, + { + "path": "$.spec.condition.kind", + "typeInfo": { + "name": "AlertConditionKind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "burnrate" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: burnrate", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.condition.op", + "typeInfo": { + "name": "Operator", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "gt", + "lt", + "gte", + "lte" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: gt, lt, gte, lte", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.condition.threshold", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.condition.lookbackWindow", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.condition.alertAfter", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + } + ] + }, + "AlertNotificationTarget": { + "name": "v1.AlertNotificationTarget", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "AlertNotificationTarget", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo/v1" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo/v1'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertNotificationTarget" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertNotificationTarget'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.displayName", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*", + "$.metadata.labels.*[*]" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "AlertNotificationTargetSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.description", + "$.spec.target" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.target", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + } + ] + }, + "AlertPolicy": { + "name": "v1.AlertPolicy", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "AlertPolicy", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo/v1" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo/v1'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertPolicy" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertPolicy'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.displayName", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*", + "$.metadata.labels.*[*]" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "AlertPolicySpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.description", + "$.spec.alertWhenNoData", + "$.spec.alertWhenBreaching", + "$.spec.alertWhenResolved", + "$.spec.conditions", + "$.spec.conditions[*]", + "$.spec.notificationTargets", + "$.spec.notificationTargets[*]" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertWhenNoData", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.alertWhenBreaching", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.alertWhenResolved", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.conditions", + "typeInfo": { + "name": "[]AlertPolicyCondition", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "length must be between 1 and 1", + "errorCode": "slice_length" + } + ] + }, + { + "path": "$.spec.conditions[*]", + "typeInfo": { + "name": "AlertPolicyCondition", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "properties are mutually exclusive: conditionRef, spec", + "errorCode": "mutually_exclusive" + }, + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.conditions[*].conditionRef", + "$.spec.conditions[*].kind", + "$.spec.conditions[*].metadata", + "$.spec.conditions[*].spec" + ] + }, + { + "path": "$.spec.conditions[*].conditionRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.conditions[*].kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertCondition" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertCondition'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.spec.conditions[*].metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.conditions[*].metadata.name", + "$.spec.conditions[*].metadata.displayName", + "$.spec.conditions[*].metadata.labels", + "$.spec.conditions[*].metadata.annotations" + ] + }, + { + "path": "$.spec.conditions[*].metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.conditions[*].metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.conditions[*].metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.conditions[*].metadata.labels.~", + "$.spec.conditions[*].metadata.labels.*", + "$.spec.conditions[*].metadata.labels.*[*]" + ] + }, + { + "path": "$.spec.conditions[*].metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.spec.conditions[*].metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.spec.conditions[*].metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.conditions[*].metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.conditions[*].metadata.annotations.~", + "$.spec.conditions[*].metadata.annotations.*" + ] + }, + { + "path": "$.spec.conditions[*].metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.spec.conditions[*].metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.conditions[*].spec", + "typeInfo": { + "name": "AlertConditionSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.conditions[*].spec.severity", + "$.spec.conditions[*].spec.condition", + "$.spec.conditions[*].spec.description" + ] + }, + { + "path": "$.spec.conditions[*].spec.severity", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.conditions[*].spec.condition", + "typeInfo": { + "name": "AlertConditionType", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.conditions[*].spec.condition.kind", + "$.spec.conditions[*].spec.condition.op", + "$.spec.conditions[*].spec.condition.threshold", + "$.spec.conditions[*].spec.condition.lookbackWindow", + "$.spec.conditions[*].spec.condition.alertAfter" + ] + }, + { + "path": "$.spec.conditions[*].spec.condition.kind", + "typeInfo": { + "name": "AlertConditionKind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "burnrate" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: burnrate", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.conditions[*].spec.condition.op", + "typeInfo": { + "name": "Operator", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "gt", + "lt", + "gte", + "lte" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: gt, lt, gte, lte", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.conditions[*].spec.condition.threshold", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.conditions[*].spec.condition.lookbackWindow", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.conditions[*].spec.condition.alertAfter", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.conditions[*].spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.notificationTargets", + "typeInfo": { + "name": "[]AlertPolicyNotificationTarget", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "length must be greater than or equal to 1", + "errorCode": "slice_min_length" + } + ] + }, + { + "path": "$.spec.notificationTargets[*]", + "typeInfo": { + "name": "AlertPolicyNotificationTarget", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "properties are mutually exclusive: spec, targetRef", + "errorCode": "mutually_exclusive" + }, + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.notificationTargets[*].targetRef", + "$.spec.notificationTargets[*].kind", + "$.spec.notificationTargets[*].metadata", + "$.spec.notificationTargets[*].spec" + ] + }, + { + "path": "$.spec.notificationTargets[*].targetRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.notificationTargets[*].kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertNotificationTarget" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertNotificationTarget'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.spec.notificationTargets[*].metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.notificationTargets[*].metadata.name", + "$.spec.notificationTargets[*].metadata.displayName", + "$.spec.notificationTargets[*].metadata.labels", + "$.spec.notificationTargets[*].metadata.annotations" + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.notificationTargets[*].metadata.labels.~", + "$.spec.notificationTargets[*].metadata.labels.*", + "$.spec.notificationTargets[*].metadata.labels.*[*]" + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.spec.notificationTargets[*].metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.notificationTargets[*].metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.notificationTargets[*].metadata.annotations.~", + "$.spec.notificationTargets[*].metadata.annotations.*" + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.spec.notificationTargets[*].metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.notificationTargets[*].spec", + "typeInfo": { + "name": "AlertNotificationTargetSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.notificationTargets[*].spec.description", + "$.spec.notificationTargets[*].spec.target" + ] + }, + { + "path": "$.spec.notificationTargets[*].spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.notificationTargets[*].spec.target", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + } + ] + }, + "DataSource": { + "name": "v1.DataSource", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "DataSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo/v1" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo/v1'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "DataSource" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'DataSource'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.displayName", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*", + "$.metadata.labels.*[*]" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "DataSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.description", + "$.spec.type", + "$.spec.connectionDetails", + "$.spec.connectionDetails[*]" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.type", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.connectionDetails", + "typeInfo": { + "name": "RawMessage", + "kind": "[]uint8", + "package": "encoding/json" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.connectionDetails[*]", + "typeInfo": { + "name": "uint8", + "kind": "uint8" + } + } + ] + }, + "SLI": { + "name": "v1.SLI", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "SLI", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo/v1" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo/v1'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "SLI" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'SLI'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.displayName", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*", + "$.metadata.labels.*[*]" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "SLISpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "properties are mutually exclusive: ratioMetric, thresholdMetric", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.description", + "$.spec.thresholdMetric", + "$.spec.ratioMetric" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.thresholdMetric", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.thresholdMetric.metricSource" + ] + }, + { + "path": "$.spec.thresholdMetric.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.thresholdMetric.metricSource.metricSourceRef", + "$.spec.thresholdMetric.metricSource.type", + "$.spec.thresholdMetric.metricSource.spec" + ] + }, + { + "path": "$.spec.thresholdMetric.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.thresholdMetric.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.thresholdMetric.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.thresholdMetric.metricSource.spec.~", + "$.spec.thresholdMetric.metricSource.spec.*" + ] + }, + { + "path": "$.spec.thresholdMetric.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.thresholdMetric.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.ratioMetric", + "typeInfo": { + "name": "SLIRatioMetric", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: raw, total", + "errorCode": "mutually_exclusive" + }, + { + "description": "properties are mutually exclusive: bad, good, raw", + "errorCode": "mutually_exclusive" + }, + { + "description": "one of [bad, good] properties must be set, none was provided", + "errorCode": "one_of_properties" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.counter", + "$.spec.ratioMetric.good", + "$.spec.ratioMetric.bad", + "$.spec.ratioMetric.total", + "$.spec.ratioMetric.rawType", + "$.spec.ratioMetric.raw" + ] + }, + { + "path": "$.spec.ratioMetric.counter", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.ratioMetric.good", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.good.metricSource" + ] + }, + { + "path": "$.spec.ratioMetric.good.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.ratioMetric.good.metricSource.metricSourceRef", + "$.spec.ratioMetric.good.metricSource.type", + "$.spec.ratioMetric.good.metricSource.spec" + ] + }, + { + "path": "$.spec.ratioMetric.good.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.ratioMetric.good.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.good.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.good.metricSource.spec.~", + "$.spec.ratioMetric.good.metricSource.spec.*" + ] + }, + { + "path": "$.spec.ratioMetric.good.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.good.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.ratioMetric.bad", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.bad.metricSource" + ] + }, + { + "path": "$.spec.ratioMetric.bad.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.ratioMetric.bad.metricSource.metricSourceRef", + "$.spec.ratioMetric.bad.metricSource.type", + "$.spec.ratioMetric.bad.metricSource.spec" + ] + }, + { + "path": "$.spec.ratioMetric.bad.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.ratioMetric.bad.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.bad.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.bad.metricSource.spec.~", + "$.spec.ratioMetric.bad.metricSource.spec.*" + ] + }, + { + "path": "$.spec.ratioMetric.bad.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.bad.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.ratioMetric.total", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.total.metricSource" + ] + }, + { + "path": "$.spec.ratioMetric.total.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.ratioMetric.total.metricSource.metricSourceRef", + "$.spec.ratioMetric.total.metricSource.type", + "$.spec.ratioMetric.total.metricSource.spec" + ] + }, + { + "path": "$.spec.ratioMetric.total.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.ratioMetric.total.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.total.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.total.metricSource.spec.~", + "$.spec.ratioMetric.total.metricSource.spec.*" + ] + }, + { + "path": "$.spec.ratioMetric.total.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.total.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.ratioMetric.rawType", + "typeInfo": { + "name": "SLIRawMetricType", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "success", + "failure" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: success, failure", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.ratioMetric.raw", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.raw.metricSource" + ] + }, + { + "path": "$.spec.ratioMetric.raw.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.ratioMetric.raw.metricSource.metricSourceRef", + "$.spec.ratioMetric.raw.metricSource.type", + "$.spec.ratioMetric.raw.metricSource.spec" + ] + }, + { + "path": "$.spec.ratioMetric.raw.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.ratioMetric.raw.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.raw.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.ratioMetric.raw.metricSource.spec.~", + "$.spec.ratioMetric.raw.metricSource.spec.*" + ] + }, + { + "path": "$.spec.ratioMetric.raw.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.ratioMetric.raw.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + } + ] + }, + "SLO": { + "name": "v1.SLO", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "SLO", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo/v1" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo/v1'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "SLO" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'SLO'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.displayName", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*", + "$.metadata.labels.*[*]" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "SLOSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "'indicator' or 'indicatorRef' fields must either be defined on the 'spec' level (standard SLOs) or on the 'spec.objectives[*]' level (composite SLOs)", + "errorCode": "mutually_exclusive" + }, + { + "description": "properties are mutually exclusive: indicator, indicatorRef", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.description", + "$.spec.service", + "$.spec.indicator", + "$.spec.indicatorRef", + "$.spec.budgetingMethod", + "$.spec.timeWindow", + "$.spec.timeWindow[*]", + "$.spec.objectives", + "$.spec.objectives[*]", + "$.spec.alertPolicies", + "$.spec.alertPolicies[*]" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.service", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.indicator", + "typeInfo": { + "name": "SLOIndicatorInline", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.indicator.metadata", + "$.spec.indicator.spec" + ] + }, + { + "path": "$.spec.indicator.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.indicator.metadata.name", + "$.spec.indicator.metadata.displayName", + "$.spec.indicator.metadata.labels", + "$.spec.indicator.metadata.annotations" + ] + }, + { + "path": "$.spec.indicator.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.indicator.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.indicator.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.indicator.metadata.labels.~", + "$.spec.indicator.metadata.labels.*", + "$.spec.indicator.metadata.labels.*[*]" + ] + }, + { + "path": "$.spec.indicator.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.spec.indicator.metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.spec.indicator.metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.indicator.metadata.annotations.~", + "$.spec.indicator.metadata.annotations.*" + ] + }, + { + "path": "$.spec.indicator.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.spec.indicator.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec", + "typeInfo": { + "name": "SLISpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "properties are mutually exclusive: ratioMetric, thresholdMetric", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.description", + "$.spec.indicator.spec.thresholdMetric", + "$.spec.indicator.spec.ratioMetric" + ] + }, + { + "path": "$.spec.indicator.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.indicator.spec.thresholdMetric", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.thresholdMetric.metricSource" + ] + }, + { + "path": "$.spec.indicator.spec.thresholdMetric.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.indicator.spec.thresholdMetric.metricSource.metricSourceRef", + "$.spec.indicator.spec.thresholdMetric.metricSource.type", + "$.spec.indicator.spec.thresholdMetric.metricSource.spec" + ] + }, + { + "path": "$.spec.indicator.spec.thresholdMetric.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.indicator.spec.thresholdMetric.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec.thresholdMetric.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.thresholdMetric.metricSource.spec.~", + "$.spec.indicator.spec.thresholdMetric.metricSource.spec.*" + ] + }, + { + "path": "$.spec.indicator.spec.thresholdMetric.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec.thresholdMetric.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric", + "typeInfo": { + "name": "SLIRatioMetric", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: raw, total", + "errorCode": "mutually_exclusive" + }, + { + "description": "properties are mutually exclusive: bad, good, raw", + "errorCode": "mutually_exclusive" + }, + { + "description": "one of [bad, good] properties must be set, none was provided", + "errorCode": "one_of_properties" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.counter", + "$.spec.indicator.spec.ratioMetric.good", + "$.spec.indicator.spec.ratioMetric.bad", + "$.spec.indicator.spec.ratioMetric.total", + "$.spec.indicator.spec.ratioMetric.rawType", + "$.spec.indicator.spec.ratioMetric.raw" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.counter", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.good", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.good.metricSource" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.good.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.good.metricSource.metricSourceRef", + "$.spec.indicator.spec.ratioMetric.good.metricSource.type", + "$.spec.indicator.spec.ratioMetric.good.metricSource.spec" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.good.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.good.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.good.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.good.metricSource.spec.~", + "$.spec.indicator.spec.ratioMetric.good.metricSource.spec.*" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.good.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.good.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.bad", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.bad.metricSource" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.bad.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.bad.metricSource.metricSourceRef", + "$.spec.indicator.spec.ratioMetric.bad.metricSource.type", + "$.spec.indicator.spec.ratioMetric.bad.metricSource.spec" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.bad.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.bad.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.bad.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.bad.metricSource.spec.~", + "$.spec.indicator.spec.ratioMetric.bad.metricSource.spec.*" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.bad.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.bad.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.total", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.total.metricSource" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.total.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.total.metricSource.metricSourceRef", + "$.spec.indicator.spec.ratioMetric.total.metricSource.type", + "$.spec.indicator.spec.ratioMetric.total.metricSource.spec" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.total.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.total.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.total.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.total.metricSource.spec.~", + "$.spec.indicator.spec.ratioMetric.total.metricSource.spec.*" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.total.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.total.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.rawType", + "typeInfo": { + "name": "SLIRawMetricType", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "success", + "failure" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: success, failure", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.raw", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.raw.metricSource" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.raw.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.raw.metricSource.metricSourceRef", + "$.spec.indicator.spec.ratioMetric.raw.metricSource.type", + "$.spec.indicator.spec.ratioMetric.raw.metricSource.spec" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.raw.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.raw.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.raw.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.indicator.spec.ratioMetric.raw.metricSource.spec.~", + "$.spec.indicator.spec.ratioMetric.raw.metricSource.spec.*" + ] + }, + { + "path": "$.spec.indicator.spec.ratioMetric.raw.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.indicator.spec.ratioMetric.raw.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.indicatorRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.budgetingMethod", + "typeInfo": { + "name": "SLOBudgetingMethod", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "Occurrences", + "Timeslices", + "RatioTimeslices" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: Occurrences, Timeslices, RatioTimeslices", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.timeWindow", + "typeInfo": { + "name": "[]SLOTimeWindow", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "length must be between 1 and 1", + "errorCode": "slice_length" + } + ] + }, + { + "path": "$.spec.timeWindow[*]", + "typeInfo": { + "name": "SLOTimeWindow", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.timeWindow[*].duration", + "$.spec.timeWindow[*].isRolling", + "$.spec.timeWindow[*].calendar" + ] + }, + { + "path": "$.spec.timeWindow[*].duration", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.timeWindow[*].isRolling", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.timeWindow[*].calendar", + "typeInfo": { + "name": "SLOCalendar", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.timeWindow[*].calendar.startTime", + "$.spec.timeWindow[*].calendar.timeZone" + ] + }, + { + "path": "$.spec.timeWindow[*].calendar.startTime", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must be a valid date and time in '2006-01-02 15:04:05' format", + "details": "date and time format follows Go's time layout, see https://pkg.go.dev/time#Layout for more details", + "errorCode": "string_date_time" + } + ] + }, + { + "path": "$.spec.timeWindow[*].calendar.timeZone", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must be a valid IANA Time Zone Database code", + "errorCode": "string_time_zone", + "examples": [ + "UTC", + "America/New_York", + "Europe/Warsaw" + ] + } + ] + }, + { + "path": "$.spec.objectives", + "typeInfo": { + "name": "[]SLOObjective", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.spec.objectives[*]", + "typeInfo": { + "name": "SLOObjective", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "properties are mutually exclusive: target, targetPercent", + "errorCode": "mutually_exclusive" + }, + { + "description": "properties are mutually exclusive: indicator, indicatorRef", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].displayName", + "$.spec.objectives[*].op", + "$.spec.objectives[*].value", + "$.spec.objectives[*].target", + "$.spec.objectives[*].targetPercent", + "$.spec.objectives[*].timeSliceTarget", + "$.spec.objectives[*].timeSliceWindow", + "$.spec.objectives[*].indicator", + "$.spec.objectives[*].indicatorRef", + "$.spec.objectives[*].compositeWeight" + ] + }, + { + "path": "$.spec.objectives[*].displayName", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].op", + "typeInfo": { + "name": "Operator", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "gt", + "lt", + "gte", + "lte" + ], + "rules": [ + { + "description": "property is forbidden", + "errorCode": "forbidden", + "conditions": [ + "'indicator.spec.ratioMetric' is set" + ] + }, + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "'indicator.spec.thresholdMetric' is set" + ] + }, + { + "description": "must be one of: gt, lt, gte, lte", + "errorCode": "one_of", + "conditions": [ + "'indicator.spec.thresholdMetric' is set" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].value", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is forbidden", + "errorCode": "forbidden", + "conditions": [ + "'indicator.spec.ratioMetric' is set" + ] + }, + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "'indicator.spec.thresholdMetric' is set" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].target", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "should be greater than or equal to '0'", + "errorCode": "greater_than_or_equal_to" + }, + { + "description": "should be less than '1'", + "errorCode": "less_than" + } + ] + }, + { + "path": "$.spec.objectives[*].targetPercent", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "should be greater than or equal to '0'", + "errorCode": "greater_than_or_equal_to" + }, + { + "description": "should be less than '100'", + "errorCode": "less_than" + } + ] + }, + { + "path": "$.spec.objectives[*].timeSliceTarget", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be greater than '0'", + "errorCode": "greater_than" + }, + { + "description": "should be less than or equal to '1'", + "errorCode": "less_than_or_equal_to" + } + ] + }, + { + "path": "$.spec.objectives[*].timeSliceWindow", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.objectives[*].indicator", + "typeInfo": { + "name": "SLOIndicatorInline", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.metadata", + "$.spec.objectives[*].indicator.spec" + ] + }, + { + "path": "$.spec.objectives[*].indicator.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.metadata.name", + "$.spec.objectives[*].indicator.metadata.displayName", + "$.spec.objectives[*].indicator.metadata.labels", + "$.spec.objectives[*].indicator.metadata.annotations" + ] + }, + { + "path": "$.spec.objectives[*].indicator.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.objectives[*].indicator.metadata.labels.~", + "$.spec.objectives[*].indicator.metadata.labels.*", + "$.spec.objectives[*].indicator.metadata.labels.*[*]" + ] + }, + { + "path": "$.spec.objectives[*].indicator.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.spec.objectives[*].indicator.metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.objectives[*].indicator.metadata.annotations.~", + "$.spec.objectives[*].indicator.metadata.annotations.*" + ] + }, + { + "path": "$.spec.objectives[*].indicator.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec", + "typeInfo": { + "name": "SLISpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "properties are mutually exclusive: ratioMetric, thresholdMetric", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.description", + "$.spec.objectives[*].indicator.spec.thresholdMetric", + "$.spec.objectives[*].indicator.spec.ratioMetric" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.thresholdMetric", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource.metricSourceRef", + "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource.type", + "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource.spec" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource.spec.~", + "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource.spec.*" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.thresholdMetric.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric", + "typeInfo": { + "name": "SLIRatioMetric", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "properties are mutually exclusive: raw, total", + "errorCode": "mutually_exclusive" + }, + { + "description": "properties are mutually exclusive: bad, good, raw", + "errorCode": "mutually_exclusive" + }, + { + "description": "one of [bad, good] properties must be set, none was provided", + "errorCode": "one_of_properties" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.counter", + "$.spec.objectives[*].indicator.spec.ratioMetric.good", + "$.spec.objectives[*].indicator.spec.ratioMetric.bad", + "$.spec.objectives[*].indicator.spec.ratioMetric.total", + "$.spec.objectives[*].indicator.spec.ratioMetric.rawType", + "$.spec.objectives[*].indicator.spec.ratioMetric.raw" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.counter", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.good", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource.metricSourceRef", + "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource.type", + "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource.spec" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource.spec.~", + "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource.spec.*" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.good.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.bad", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource.metricSourceRef", + "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource.type", + "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource.spec" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource.spec.~", + "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource.spec.*" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.bad.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.total", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource.metricSourceRef", + "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource.type", + "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource.spec" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource.spec.~", + "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource.spec.*" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.total.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.rawType", + "typeInfo": { + "name": "SLIRawMetricType", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "success", + "failure" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: success, failure", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.raw", + "typeInfo": { + "name": "SLIMetricSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource", + "typeInfo": { + "name": "SLIMetricSource", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource.metricSourceRef", + "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource.type", + "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource.spec" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource.metricSourceRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource.type", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource.spec", + "typeInfo": { + "name": "map[string]interface {}", + "kind": "map[string]interface" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be greater than or equal to 1", + "errorCode": "map_min_length" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource.spec.~", + "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource.spec.*" + ] + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource.spec.~", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.objectives[*].indicator.spec.ratioMetric.raw.metricSource.spec.*", + "typeInfo": { + "name": "interface {}", + "kind": "interface" + } + }, + { + "path": "$.spec.objectives[*].indicatorRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.objectives[*].compositeWeight", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "should be greater than '0'", + "errorCode": "greater_than" + } + ] + }, + { + "path": "$.spec.alertPolicies", + "typeInfo": { + "name": "[]SLOAlertPolicy", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.spec.alertPolicies[*]", + "typeInfo": { + "name": "SLOAlertPolicy", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "properties are mutually exclusive: spec, targetRef", + "errorCode": "mutually_exclusive" + }, + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].kind", + "$.spec.alertPolicies[*].metadata", + "$.spec.alertPolicies[*].spec", + "$.spec.alertPolicies[*].alertPolicyRef" + ] + }, + { + "path": "$.spec.alertPolicies[*].kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertPolicy" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertPolicy'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.spec.alertPolicies[*].metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].metadata.name", + "$.spec.alertPolicies[*].metadata.displayName", + "$.spec.alertPolicies[*].metadata.labels", + "$.spec.alertPolicies[*].metadata.annotations" + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].metadata.labels.~", + "$.spec.alertPolicies[*].metadata.labels.*", + "$.spec.alertPolicies[*].metadata.labels.*[*]" + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.spec.alertPolicies[*].metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.alertPolicies[*].metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].metadata.annotations.~", + "$.spec.alertPolicies[*].metadata.annotations.*" + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.alertPolicies[*].spec", + "typeInfo": { + "name": "AlertPolicySpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.description", + "$.spec.alertPolicies[*].spec.alertWhenNoData", + "$.spec.alertPolicies[*].spec.alertWhenBreaching", + "$.spec.alertPolicies[*].spec.alertWhenResolved", + "$.spec.alertPolicies[*].spec.conditions", + "$.spec.alertPolicies[*].spec.conditions[*]", + "$.spec.alertPolicies[*].spec.notificationTargets", + "$.spec.alertPolicies[*].spec.notificationTargets[*]" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.alertWhenNoData", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.alertWhenBreaching", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.alertWhenResolved", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions", + "typeInfo": { + "name": "[]AlertPolicyCondition", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "length must be between 1 and 1", + "errorCode": "slice_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*]", + "typeInfo": { + "name": "AlertPolicyCondition", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "properties are mutually exclusive: conditionRef, spec", + "errorCode": "mutually_exclusive" + }, + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].conditionRef", + "$.spec.alertPolicies[*].spec.conditions[*].kind", + "$.spec.alertPolicies[*].spec.conditions[*].metadata", + "$.spec.alertPolicies[*].spec.conditions[*].spec" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].conditionRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertCondition" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertCondition'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].metadata.name", + "$.spec.alertPolicies[*].spec.conditions[*].metadata.displayName", + "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels", + "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels.~", + "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels.*", + "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels.*[*]" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations.~", + "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations.*" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec", + "typeInfo": { + "name": "AlertConditionSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].spec.severity", + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition", + "$.spec.alertPolicies[*].spec.conditions[*].spec.description" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.severity", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition", + "typeInfo": { + "name": "AlertConditionType", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.kind", + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.op", + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.threshold", + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.lookbackWindow", + "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.alertAfter" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.kind", + "typeInfo": { + "name": "AlertConditionKind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "burnrate" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: burnrate", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.op", + "typeInfo": { + "name": "Operator", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "values": [ + "gt", + "lt", + "gte", + "lte" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: gt, lt, gte, lte", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.threshold", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.lookbackWindow", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.condition.alertAfter", + "typeInfo": { + "name": "DurationShorthand", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "typeDoc": "DurationShorthand is a shorthand representation of time duration. It consists of a value and unit, e.g. '1m' (1 minute), '10d' (10 days)." + }, + { + "path": "$.spec.alertPolicies[*].spec.conditions[*].spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets", + "typeInfo": { + "name": "[]AlertPolicyNotificationTarget", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "length must be greater than or equal to 1", + "errorCode": "slice_min_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*]", + "typeInfo": { + "name": "AlertPolicyNotificationTarget", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "properties are mutually exclusive: spec, targetRef", + "errorCode": "mutually_exclusive" + }, + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.notificationTargets[*].targetRef", + "$.spec.alertPolicies[*].spec.notificationTargets[*].kind", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata", + "$.spec.alertPolicies[*].spec.notificationTargets[*].spec" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].targetRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "AlertNotificationTarget" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'AlertNotificationTarget'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.name", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.displayName", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels.~", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels.*", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels.*[*]" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations.~", + "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations.*" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].spec", + "typeInfo": { + "name": "AlertNotificationTargetSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.alertPolicies[*].spec.notificationTargets[*].spec.description", + "$.spec.alertPolicies[*].spec.notificationTargets[*].spec.target" + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].spec.notificationTargets[*].spec.target", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.alertPolicies[*].alertPolicyRef", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + } + ] + }, + "Service": { + "name": "v1.Service", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "Service", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo/v1" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo/v1'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "Service" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'Service'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.displayName", + "$.metadata.labels", + "$.metadata.annotations" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.metadata.labels", + "typeInfo": { + "name": "Labels", + "kind": "map[string][]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.labels.~", + "$.metadata.labels.*", + "$.metadata.labels.*[*]" + ] + }, + { + "path": "$.metadata.labels.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp" + } + ] + }, + { + "path": "$.metadata.labels.*", + "typeInfo": { + "name": "Label", + "kind": "[]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + } + }, + { + "path": "$.metadata.labels.*[*]", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.metadata.annotations", + "typeInfo": { + "name": "Annotations", + "kind": "map[string]string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.metadata.annotations.~", + "$.metadata.annotations.*" + ] + }, + { + "path": "$.metadata.annotations.~", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "string must match regular expression: '^(.{0,253}/)?.{0,63}$'", + "errorCode": "string_match_regexp" + }, + { + "description": "string must match regular expression: '^([a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]{0,61}[a-z0-9])?)*/)?[a-zA-Z0-9]([-._a-zA-Z0-9]{0,61}[a-zA-Z0-9])?$'", + "errorCode": "string_match_regexp", + "examples": [ + "my-domain.org/my-key", + "openslo.com/annotation" + ] + } + ] + }, + { + "path": "$.metadata.annotations.*", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec", + "typeInfo": { + "name": "ServiceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + }, + "childrenPaths": [ + "$.spec.description" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + } + ] + } + }, + "openslo/v1alpha": { + "SLO": { + "name": "v1alpha.SLO", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "SLO", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo/v1alpha" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo/v1alpha'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "SLO" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'SLO'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.displayName" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec", + "typeInfo": { + "name": "SLOSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "rules": [ + { + "description": "", + "errorCode": "mutually_exclusive" + } + ], + "childrenPaths": [ + "$.spec.timeWindows", + "$.spec.timeWindows[*]", + "$.spec.budgetingMethod", + "$.spec.description", + "$.spec.indicator", + "$.spec.service", + "$.spec.objectives", + "$.spec.objectives[*]" + ] + }, + { + "path": "$.spec.timeWindows", + "typeInfo": { + "name": "[]SLOTimeWindow", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + } + }, + { + "path": "$.spec.timeWindows[*]", + "typeInfo": { + "name": "SLOTimeWindow", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "childrenPaths": [ + "$.spec.timeWindows[*].unit", + "$.spec.timeWindows[*].count", + "$.spec.timeWindows[*].isRolling", + "$.spec.timeWindows[*].calendar" + ] + }, + { + "path": "$.spec.timeWindows[*].unit", + "typeInfo": { + "name": "SLOTimeWindowUnit", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + } + }, + { + "path": "$.spec.timeWindows[*].count", + "typeInfo": { + "name": "int", + "kind": "int" + } + }, + { + "path": "$.spec.timeWindows[*].isRolling", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.timeWindows[*].calendar", + "typeInfo": { + "name": "SLOCalendar", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "childrenPaths": [ + "$.spec.timeWindows[*].calendar.startTime", + "$.spec.timeWindows[*].calendar.timeZone" + ] + }, + { + "path": "$.spec.timeWindows[*].calendar.startTime", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.timeWindows[*].calendar.timeZone", + "typeInfo": { + "name": "string", + "kind": "string" + } + }, + { + "path": "$.spec.budgetingMethod", + "typeInfo": { + "name": "SLOBudgetingMethod", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "values": [ + "Occurrences", + "Timeslices" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "must be one of: Occurrences, Timeslices", + "errorCode": "one_of" + } + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.indicator", + "typeInfo": { + "name": "SLOIndicator", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.indicator.thresholdMetric" + ] + }, + { + "path": "$.spec.indicator.thresholdMetric", + "typeInfo": { + "name": "SLOMetricSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.spec.indicator.thresholdMetric.source", + "$.spec.indicator.thresholdMetric.queryType", + "$.spec.indicator.thresholdMetric.query" + ] + }, + { + "path": "$.spec.indicator.thresholdMetric.source", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "string must match regular expression: '^[a-zA-Z]*$'", + "errorCode": "string_alpha" + } + ] + }, + { + "path": "$.spec.indicator.thresholdMetric.queryType", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "string must match regular expression: '^[a-zA-Z]*$'", + "errorCode": "string_alpha" + } + ] + }, + { + "path": "$.spec.indicator.thresholdMetric.query", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "string cannot be empty", + "errorCode": "string_not_empty" + } + ] + }, + { + "path": "$.spec.service", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.objectives", + "typeInfo": { + "name": "[]SLOObjective", + "kind": "[]struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + } + }, + { + "path": "$.spec.objectives[*]", + "typeInfo": { + "name": "SLOObjective", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "childrenPaths": [ + "$.spec.objectives[*].displayName", + "$.spec.objectives[*].value", + "$.spec.objectives[*].ratioMetrics", + "$.spec.objectives[*].target", + "$.spec.objectives[*].timeSliceTarget", + "$.spec.objectives[*].op" + ] + }, + { + "path": "$.spec.objectives[*].displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec.objectives[*].value", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ] + }, + { + "path": "$.spec.objectives[*].ratioMetrics", + "typeInfo": { + "name": "SLORatioMetrics", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + } + ], + "childrenPaths": [ + "$.spec.objectives[*].ratioMetrics.good", + "$.spec.objectives[*].ratioMetrics.total", + "$.spec.objectives[*].ratioMetrics.incremental" + ] + }, + { + "path": "$.spec.objectives[*].ratioMetrics.good", + "typeInfo": { + "name": "SLOMetricSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "childrenPaths": [ + "$.spec.objectives[*].ratioMetrics.good.source", + "$.spec.objectives[*].ratioMetrics.good.queryType", + "$.spec.objectives[*].ratioMetrics.good.query" + ] + }, + { + "path": "$.spec.objectives[*].ratioMetrics.good.source", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "string must match regular expression: '^[a-zA-Z]*$'", + "errorCode": "string_alpha" + } + ] + }, + { + "path": "$.spec.objectives[*].ratioMetrics.good.queryType", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "string must match regular expression: '^[a-zA-Z]*$'", + "errorCode": "string_alpha" + } + ] + }, + { + "path": "$.spec.objectives[*].ratioMetrics.good.query", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "string cannot be empty", + "errorCode": "string_not_empty" + } + ] + }, + { + "path": "$.spec.objectives[*].ratioMetrics.total", + "typeInfo": { + "name": "SLOMetricSourceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "childrenPaths": [ + "$.spec.objectives[*].ratioMetrics.total.source", + "$.spec.objectives[*].ratioMetrics.total.queryType", + "$.spec.objectives[*].ratioMetrics.total.query" + ] + }, + { + "path": "$.spec.objectives[*].ratioMetrics.total.source", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "string must match regular expression: '^[a-zA-Z]*$'", + "errorCode": "string_alpha" + } + ] + }, + { + "path": "$.spec.objectives[*].ratioMetrics.total.queryType", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "string must match regular expression: '^[a-zA-Z]*$'", + "errorCode": "string_alpha" + } + ] + }, + { + "path": "$.spec.objectives[*].ratioMetrics.total.query", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "string cannot be empty", + "errorCode": "string_not_empty" + } + ] + }, + { + "path": "$.spec.objectives[*].ratioMetrics.incremental", + "typeInfo": { + "name": "bool", + "kind": "bool" + } + }, + { + "path": "$.spec.objectives[*].target", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be greater than or equal to '0'", + "errorCode": "greater_than_or_equal_to" + }, + { + "description": "should be less than '1'", + "errorCode": "less_than" + } + ] + }, + { + "path": "$.spec.objectives[*].timeSliceTarget", + "typeInfo": { + "name": "float64", + "kind": "float64" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be greater than or equal to '0'", + "errorCode": "greater_than_or_equal_to" + }, + { + "description": "should be less than or equal to '1'", + "errorCode": "less_than_or_equal_to" + } + ] + }, + { + "path": "$.spec.objectives[*].op", + "typeInfo": { + "name": "Operator", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "values": [ + "gt", + "lt", + "gte", + "lte" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required", + "conditions": [ + "'thresholdMetric' is set" + ] + }, + { + "description": "must be one of: gt, lt, gte, lte", + "errorCode": "one_of", + "conditions": [ + "'thresholdMetric' is set" + ] + }, + { + "description": "property is forbidden", + "errorCode": "forbidden", + "conditions": [ + "'ratioMetrics' is set" + ] + } + ] + } + ] + }, + "Service": { + "name": "v1alpha.Service", + "properties": [ + { + "path": "$", + "typeInfo": { + "name": "Service", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "childrenPaths": [ + "$.apiVersion", + "$.kind", + "$.metadata", + "$.spec" + ] + }, + { + "path": "$.apiVersion", + "typeInfo": { + "name": "Version", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "openslo/v1alpha" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'openslo/v1alpha'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Version represents a version of the OpenSLO specification." + }, + { + "path": "$.kind", + "typeInfo": { + "name": "Kind", + "kind": "string", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo" + }, + "values": [ + "Service" + ], + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "should be equal to 'Service'", + "errorCode": "equal_to" + } + ], + "typeDoc": "Kind represents all the object kinds defined by OpenSLO specification. Keep in mind not all specification versions support every [Kind](https://pkg.go.dev/github.com/OpenSLO/go-sdk/pkg/openslo#Kind)." + }, + { + "path": "$.metadata", + "typeInfo": { + "name": "Metadata", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + } + ], + "childrenPaths": [ + "$.metadata.name", + "$.metadata.displayName" + ] + }, + { + "path": "$.metadata.name", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is required", + "errorCode": "required" + }, + { + "description": "length must be between 1 and 63", + "errorCode": "string_dns_label:string_length" + }, + { + "description": "string must match regular expression: '^[a-z0-9]([-a-z0-9]*[a-z0-9])?$'", + "details": "an RFC-1123 compliant label name must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character", + "errorCode": "string_dns_label:string_match_regexp", + "examples": [ + "my-name", + "123-abc" + ] + } + ] + }, + { + "path": "$.metadata.displayName", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "property is optional", + "errorCode": "optional" + }, + { + "description": "length must be less than or equal to 63", + "errorCode": "string_max_length" + } + ] + }, + { + "path": "$.spec", + "typeInfo": { + "name": "ServiceSpec", + "kind": "struct", + "package": "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + }, + "childrenPaths": [ + "$.spec.description" + ] + }, + { + "path": "$.spec.description", + "typeInfo": { + "name": "string", + "kind": "string" + }, + "rules": [ + { + "description": "length must be less than or equal to 1050", + "errorCode": "string_max_length" + } + ] + } + ] + } + } +} diff --git a/internal/cmd/objectdoc/go.mod b/internal/cmd/objectdoc/go.mod new file mode 100644 index 0000000..6425855 --- /dev/null +++ b/internal/cmd/objectdoc/go.mod @@ -0,0 +1,20 @@ +module github.com/OpenSLO/go-sdk/plan + +go 1.24.7 + +require ( + github.com/OpenSLO/go-sdk v0.8.0 + github.com/nieomylnieja/govydoc v0.0.0-20250608154008-4c88b62026ae +) + +require ( + github.com/nobl9/govy v0.22.0-rc1 // indirect + github.com/pkg/errors v0.9.1 // indirect + golang.org/x/mod v0.26.0 // indirect + golang.org/x/sync v0.16.0 // indirect + golang.org/x/tools v0.35.0 // indirect +) + +replace github.com/nieomylnieja/govydoc v0.0.0-20250608154008-4c88b62026ae => /home/mh/projects/govydoc/ + +replace github.com/OpenSLO/go-sdk v0.22.0-rc1 => ../../../. diff --git a/internal/cmd/objectdoc/go.sum b/internal/cmd/objectdoc/go.sum new file mode 100644 index 0000000..b27cb96 --- /dev/null +++ b/internal/cmd/objectdoc/go.sum @@ -0,0 +1,26 @@ +github.com/OpenSLO/go-sdk v0.8.0 h1:w6r4qybBc98dJ8kGcI0qPOMPVBIhLceC+dgmwGvX5Rg= +github.com/OpenSLO/go-sdk v0.8.0/go.mod h1:Kn5r0/Dvievh4VD4+aOpJ1/GAYqiUeLz2UXHwbty95o= +github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= +github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= +github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= +github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= +github.com/nobl9/govy v0.22.0-rc1 h1:FMhHuqxhq7Mz2U2zgHsuQ540FqnltyEz/P5gMYs2WOg= +github.com/nobl9/govy v0.22.0-rc1/go.mod h1:DN0zA5jtaHrb+uKPATycrlr7HRJy27QUaUg8LEeTsxo= +github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4= +github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0= +github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= +github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= +github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U= +github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U= +go.yaml.in/yaml/v2 v2.4.2 h1:DzmwEr2rDGHl7lsFgAHxmNz/1NlQ7xLIrlN2h5d1eGI= +go.yaml.in/yaml/v2 v2.4.2/go.mod h1:081UH+NErpNdqlCXm3TtEran0rJZGxAYx9hb/ELlsPU= +golang.org/x/mod v0.26.0 h1:EGMPT//Ezu+ylkCijjPc+f4Aih7sZvaAr+O3EHBxvZg= +golang.org/x/mod v0.26.0/go.mod h1:/j6NAhSk8iQ723BGAUyoAcn7SlD7s15Dp9Nd/SfeaFQ= +golang.org/x/sync v0.16.0 h1:ycBJEhp9p4vXvUZNszeOq0kGTPghopOL8q0fq3vstxw= +golang.org/x/sync v0.16.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/tools v0.35.0 h1:mBffYraMEf7aa0sB+NuKnuCy8qI/9Bughn8dC2Gu5r0= +golang.org/x/tools v0.35.0/go.mod h1:NKdj5HkL/73byiZSJjqJgKn3ep7KjFkBOkR/Hps3VPw= +gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= +gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +sigs.k8s.io/yaml v1.6.0 h1:G8fkbMSAFqgEFgh4b1wmtzDnioxFCUgTZhlbj5P9QYs= +sigs.k8s.io/yaml v1.6.0/go.mod h1:796bPqUfzR/0jLAl6XjHl3Ck7MiyVv8dbTdyT3/pMf4= diff --git a/internal/cmd/objectdoc/main.go b/internal/cmd/objectdoc/main.go new file mode 100644 index 0000000..18d2c91 --- /dev/null +++ b/internal/cmd/objectdoc/main.go @@ -0,0 +1,99 @@ +package main + +import ( + "cmp" + "encoding/json" + "os" + "slices" + "sync" + + "github.com/nieomylnieja/govydoc/pkg/govydoc" + + v1 "github.com/OpenSLO/go-sdk/pkg/openslo/v1" + "github.com/OpenSLO/go-sdk/pkg/openslo/v1alpha" + "github.com/OpenSLO/go-sdk/pkg/openslo/v2alpha" +) + +type ( + Versions map[Version]map[Kind]govydoc.ObjectDoc + + Version = string + Kind = string +) + +var allDocsGeneratorFuncs = []func() (govydoc.ObjectDoc, error){ + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v1alpha.Service{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v1alpha.SLO{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v1.Service{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v1.SLO{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v1.SLI{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v1.AlertCondition{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { + return govydoc.Generate(v1.AlertNotificationTarget{}.GetValidator()) + }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v1.AlertPolicy{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v1.DataSource{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v2alpha.Service{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v2alpha.SLO{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v2alpha.SLI{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v2alpha.AlertCondition{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { + return govydoc.Generate(v2alpha.AlertNotificationTarget{}.GetValidator()) + }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v2alpha.AlertPolicy{}.GetValidator()) }, + func() (govydoc.ObjectDoc, error) { return govydoc.Generate(v2alpha.DataSource{}.GetValidator()) }, +} + +func main() { + wg := sync.WaitGroup{} + wg.Add(len(allDocsGeneratorFuncs)) + docs := make([]govydoc.ObjectDoc, 0, len(allDocsGeneratorFuncs)) + mu := sync.Mutex{} + for _, f := range allDocsGeneratorFuncs { + go func() { + defer wg.Done() + doc, err := f() + if err != nil { + panic(err) + } + mu.Lock() + docs = append(docs, doc) + mu.Unlock() + }() + } + wg.Wait() + + slices.SortFunc(docs, func(o1, o2 govydoc.ObjectDoc) int { return cmp.Compare(o1.Name, o2.Name) }) + + versions := make(Versions) + for _, doc := range docs { + var ( + version Version + kind Kind + ) + for _, prop := range doc.Properties { + switch prop.Path { + case "$.apiVersion": + version = prop.Values[0] + case "$.kind": + kind = prop.Values[0] + } + } + if version == "" || kind == "" { + panic("missing version or kind in doc: " + doc.Name) + } + if versions[version] == nil { + versions[version] = make(map[Kind]govydoc.ObjectDoc) + } + if _, exists := versions[version][kind]; exists { + panic("duplicate version and kind: " + version + " " + kind) + } + versions[version][kind] = doc + } + + enc := json.NewEncoder(os.Stdout) + enc.SetIndent("", " ") + if err := enc.Encode(versions); err != nil { + panic(err) + } +} diff --git a/internal/scripts/check-generate.sh b/internal/scripts/check-generate.sh index 63fcfbd..07d666e 100755 --- a/internal/scripts/check-generate.sh +++ b/internal/scripts/check-generate.sh @@ -2,7 +2,7 @@ set -e -GEN_PATHS="**/*.go **/*.yaml" +GEN_PATHS="**/*.go **/*.yaml **/*.json" TMP_DIR=$(mktemp -d) cleanup_git() {