Title: Schema filename casing mismatch between openapi2json.py output and -schema-location template
Body:
Context
The README suggests using a template for custom schemas like:
# If the resource Kind is not found in default, also lookup in the schemas/ folder for a matching file
kubeconform -schema-location default -schema-location 'schemas/{{ .ResourceKind }}{{ .KindSuffix }}.json' fixtures/custom-resource.yaml
Problem
- The helper script
openapi2json.py writes schema files in lowercase.
.ResourceKind is typically PascalCase (e.g., MyCustomResource), so the template above looks for schemas/MyCustomResource.json, while the generated file is schemas/mycustomresource.json.
- As a result, kubeconform doesn’t find the schema unless users manually rename files or avoid the documented template.
Questions
- What is the recommended approach to reconcile this casing mismatch?
What would help
Any of the following would resolve the mismatch:
- Documented guidance on the expected casing for user-provided schemas.
- Support for a lowercase variant in templates (e.g.,
{{ .ResourceKindLower }}), or exposing common template functions (e.g., | lower).
- Update the README example to use a pattern consistent with the generator’s output (e.g., suggest
schemas/{{ .ResourceKind }}.json only if generator matches that casing, otherwise provide a lowercase example).
Request
- Is there an officially recommended pattern here?
- If template functions aren’t supported, could you consider adding a lowercase variable or documenting a canonical casing for schema filenames?
Title: Schema filename casing mismatch between openapi2json.py output and -schema-location template
Body:
Context
The README suggests using a template for custom schemas like:
Problem
openapi2json.pywrites schema files in lowercase..ResourceKindis typically PascalCase (e.g.,MyCustomResource), so the template above looks forschemas/MyCustomResource.json, while the generated file isschemas/mycustomresource.json.Questions
What would help
Any of the following would resolve the mismatch:
{{ .ResourceKindLower }}), or exposing common template functions (e.g.,| lower).schemas/{{ .ResourceKind }}.jsononly if generator matches that casing, otherwise provide a lowercase example).Request