jkcfg / kubernetes

Apache License 2.0
26 stars 6 forks source link

Use only the first segment of the schema group #70

Closed squaremo closed 4 years ago

squaremo commented 4 years ago

The tool that generates the schemas in use here, https://github.com/instrumenta/openapi2jsonschema, shortens group names for Kubernetes definitions to just the first segment -- e.g., apiextensions.k8s.io gets the group apiextensions. The group is then used to name the schema file generated.

This commit reproduces that logic in the schema.js, so that it can find the right file for resources that have a dotted name as above.

Fixes #69.