Skip to content

Commit

Permalink
fix(code-gen/go): fix issues on combined parent-child
Browse files Browse the repository at this point in the history
  • Loading branch information
sruehl committed Sep 25, 2024
1 parent e0cb517 commit 1fc6afa
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ type ${type.name} interface {
// ${type.name}Contract provides a set of functions which can be overwritten by a sub struct
type ${type.name}Contract interface {
<#if type.isDiscriminatedChildTypeDefinition()>
${type.parentType.orElseThrow().name?cap_first}
${type.parentType.orElseThrow().name?cap_first}<#if type.isDiscriminatedParentTypeDefinition()>Contract</#if>
</#if>
<#list type.propertyFields as field>
<#assign typeRef=field.asTypedField().orElseThrow().type>
Expand Down Expand Up @@ -208,7 +208,7 @@ var _ ${type.name}Contract = (*_${type.name})(nil)
<#else>
var _ ${type.name} = (*_${type.name})(nil)
</#if>
<#if type.isDiscriminatedChildTypeDefinition()>
<#if type.isDiscriminatedChildTypeDefinition() && !type.isDiscriminatedParentTypeDefinition()>
var _ ${type.getParentType().orElseThrow().name}Requirements = (*_${type.name})(nil)
</#if>

Expand Down

0 comments on commit 1fc6afa

Please sign in to comment.