Skip to content

Commit

Permalink
backward-compat for marshalling function spec
Browse files Browse the repository at this point in the history
  • Loading branch information
Zaid-Ajaj committed Nov 23, 2022
1 parent 8e22a3b commit a522da4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/codegen/schema/schema.go
Expand Up @@ -1724,6 +1724,11 @@ func (funcSpec FunctionSpec) MarshalFunctionSpec() map[string]interface{} {
}
}

// for backward-compat when we only specify the outputs object of the function
if funcSpec.ReturnType == nil && funcSpec.Outputs != nil {
data["outputs"] = funcSpec.Outputs
}

if funcSpec.DeprecationMessage != "" {
data["deprecationMessage"] = funcSpec.DeprecationMessage
}
Expand Down

0 comments on commit a522da4

Please sign in to comment.