Kindsys: Replace "Declaration" with "Definition" (#62515)

* s/Declaration/Definition/g

* s/DeclForGen/DefForGen/g

* Rename some local vars
This commit is contained in:
sam boyer
2023-01-31 09:50:08 +00:00
committed by GitHub
parent d48a8fd227
commit dbe2f0c8f6
34 changed files with 262 additions and 261 deletions
+4 -4
View File
@@ -34,8 +34,8 @@ func (j docsJenny) JennyName() string {
return "DocsJenny"
}
func (j docsJenny) Generate(decl *DeclForGen) (*codejen.File, error) {
f, err := jsonschema.GenerateSchema(decl.Lineage().Latest())
func (j docsJenny) Generate(def *DefForGen) (*codejen.File, error) {
f, err := jsonschema.GenerateSchema(def.Lineage().Latest())
if err != nil {
return nil, fmt.Errorf("failed to generate json representation for the schema: %v", err)
}
@@ -61,10 +61,10 @@ func (j docsJenny) Generate(decl *DeclForGen) (*codejen.File, error) {
// fixes the references between the types within a json after making components.schema.<types> the root of the json
kindJsonStr := strings.Replace(string(obj.Components.Schemas), "#/components/schemas/", "#/", -1)
kindProps := decl.Properties.Common()
kindProps := def.Properties.Common()
data := templateData{
KindName: kindProps.Name,
KindVersion: decl.Lineage().Latest().Version().String(),
KindVersion: def.Lineage().Latest().Version().String(),
KindMaturity: string(kindProps.Maturity),
Markdown: "{{ .Markdown 1 }}",
}