ant31 / crd-validation Goto Github PK
View Code? Open in Web Editor NEWGenerator for crd validation openapi
License: Apache License 2.0
Generator for crd validation openapi
License: Apache License 2.0
Hi,
Thanks for this handy library. One question I have is why do you think additionalProperties
field is not supported by Kubernetes ? This field seems to be present in Go type and present in kubernetes/kube-openapi tests.
crd-validation/pkg/convert_types.go
Line 120 in eabcf70
Hi, I'm trying to validate v1.PodSpec
in my crd and luckily I've found this handy tool.
I've tried the example by getting code-generator, checking out to release 1.8 and then go install.
Afterwards, I tried ~/go/bin/openapi-gen -i $(REPO)/v1,k8s.io/apimachinery/pkg/apis/meta/v1,k8s.io/api/core/v1 -p ./v1 --go-header-file="../../.header"
and get the following output:
F1112 13:46:16.763309 29062 openapi.go:126] Got nil output package:
goroutine 1 [running]:
k8s.io/code-generator/vendor/github.com/golang/glog.stacks(0xc00a31b500, 0xc00a1d8be0, 0x4c, 0x9d)
/Users/xialei1/go/src/k8s.io/code-generator/vendor/github.com/golang/glog/glog.go:766 +0xb8
k8s.io/code-generator/vendor/github.com/golang/glog.(*loggingT).output(0x19dd700, 0xc000000003, 0xc00a018a80, 0x196886a, 0xa, 0x7e, 0x0)
/Users/xialei1/go/src/k8s.io/code-generator/vendor/github.com/golang/glog/glog.go:717 +0x351
k8s.io/code-generator/vendor/github.com/golang/glog.(*loggingT).printf(0x19dd700, 0xc000000003, 0x15a8984, 0x1a, 0xc0090d7cd0, 0x1, 0x1)
/Users/xialei1/go/src/k8s.io/code-generator/vendor/github.com/golang/glog/glog.go:655 +0x14b
k8s.io/code-generator/vendor/github.com/golang/glog.Fatalf(...)
/Users/xialei1/go/src/k8s.io/code-generator/vendor/github.com/golang/glog/glog.go:1145
k8s.io/code-generator/vendor/k8s.io/kube-openapi/pkg/generators.Packages(0xc00a18ad80, 0xc0004c4380, 0x15a29fc, 0xd, 0xc00a18ad80)
/Users/xialei1/go/src/k8s.io/code-generator/vendor/k8s.io/kube-openapi/pkg/generators/openapi.go:126 +0x6e2
k8s.io/code-generator/vendor/k8s.io/gengo/args.(*GeneratorArgs).Execute(0xc0004c4380, 0xc0090d7e10, 0x15a29fc, 0xd, 0x15c1b40, 0x9c54, 0xfe00)
/Users/xialei1/go/src/k8s.io/code-generator/vendor/k8s.io/gengo/args/args.go:165 +0x207
main.main()
/Users/xialei1/go/src/k8s.io/code-generator/cmd/openapi-gen/main.go:39 +0x242
make: *** [v1/openapi_generated.go] Error 255
I guess it's related to kube-openapi version. Would you specify the environment, such as by adding go.mod?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.