diff --git a/main.go.tmpl b/main.go.tmpl index 7972833..2607cae 100644 --- a/main.go.tmpl +++ b/main.go.tmpl @@ -9,6 +9,7 @@ {{- set $opts "servers" (default .Opts.servers "") -}} {{- set $opts "securityAnnotation" (default .Opts.securityAnnotation "") -}} {{- set $opts "securitySchemes" (default .Opts.securitySchemes "") -}} +{{- set $opts "schemaHash" (ternary (eq (default .Opts.schemaHash "true") "false") false true) -}} {{- /* Print help on -help. */ -}} {{- if exists .Opts "help" -}} @@ -65,7 +66,7 @@ {{- $webrpcErrors := .WebrpcErrors -}} {{- $schemaErrors := .Errors -}} -# {{.SchemaName}} {{.SchemaVersion}} {{.SchemaHash}} +# {{.SchemaName}} {{.SchemaVersion}}{{if $opts.schemaHash}} {{.SchemaHash}}{{end}} # -- # Code generated by webrpc-gen@{{.WebrpcGenVersion}} with {{.WebrpcTarget}} generator; DO NOT EDIT #