Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Auto Generated Plain Old Java Objects (POJO) from Kubernetes API Swagger specs (oficial)

NotificationsYou must be signed in to change notification settings

la-rebelion/kubernetes-pojos

Repository files navigation

Auto-Generated Plain Old Java Objects (POJO) from Kubernetes API Swagger specs (official) withjsonschema2pojo.

cat k8s-api-swagger.json| yq -P> k8s-api-swagger.yamlio.k8s((\.)([a-zA-Z|1]+))+> io_k8s_$3# grep all typesgrep -E"io.k8s((\.)([a-z|1-2|\-]+))+((\.)([a-zA-Z]+):)" k8s-api-swagger-definitions-only.yaml| wc -l508# definitions and usagesgrep -E"io.k8s((\.)([a-z|1-2|\-]+))+((\.)([a-zA-Z]+))" k8s-api-swagger-definitions-only.yaml| wc -l1377# canonical namesgrep -E"io.k8s((\.)([a-z|1-2|\-]+))+((\.)([a-zA-Z]+):)" k8s-api-swagger-definitions-only.yaml| grep -E"io.k8s((\.)([a-z|1-2|\-]+))+"# just the packagesgrep -E"io.k8s((\.)([a-z|1-2|\-]+))+((\.)([a-zA-Z]+):)" ../k8s-api-swagger-definitions-only.yaml| grep -Eo"io.k8s((\.)([a-z|1-2|\-]+))+"| sort --unique> packages.txtmkdir -p`cat ../packages.txt`# VS Code - just the class nameio.k8s((?<dot>\.)(\w+))+ -->$3

For JSON Schema to POJO,two files are needed; the definitions (from Swagger: k8s-api-swagger-definitions-only.json) and the referenced schema (what I need/want) to "force" the generation of code (k8s-api-schema.json).

jsonschema2pojo --source k8s-api-schema.json --target java-gen -a JACKSON2 -R --package la.rebelion.k8s.api --include-dynamic-accessors --generate-constructors --constructors-include-copy-constructor

License

Creative Commons License
Kubernetes POJOs byLa Rebelion Labs is licensed under aCreative Commons Attribution-ShareAlike 4.0 International License.
Based on a work athttps://github.com/la-rebelion/kubernetes-pojos.

References

About

Auto Generated Plain Old Java Objects (POJO) from Kubernetes API Swagger specs (oficial)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp