Configurable extensions for template parser

This commit is contained in:
Katrina Verey
2022-04-21 18:28:13 -04:00
parent 9d5491c2e2
commit bcae65770a
5 changed files with 42 additions and 10 deletions

View File

@@ -56,7 +56,7 @@ func SchemaStrings(data ...string) framework.SchemaParser {
// AdditionalSchemas: parser.SchemaFiles("path/to/crd-schemas", "path/to/special-schema.json),
// }
func SchemaFiles(paths ...string) SchemaParser {
return SchemaParser{parser{paths: paths, extension: SchemaExtension}}
return SchemaParser{parser{paths: paths, extensions: []string{SchemaExtension}}}
}
// SchemaParser is a framework.SchemaParser that can parse files or directories containing openapi schemas.