diff --git a/_examples/hello-webrpc/webapp/client.gen.js b/_examples/hello-webrpc/webapp/client.gen.js index f4c3a69..4fd4fa7 100644 --- a/_examples/hello-webrpc/webapp/client.gen.js +++ b/_examples/hello-webrpc/webapp/client.gen.js @@ -1,9 +1,18 @@ -// hello-webrpc v1.0.0 +// hello-webrpc v1.0.0 949b00a8db9810c69295f9dd9f02587a65d3c497 // -- // Code generated by webrpc-gen@v0.37.0 with ../../ generator. DO NOT EDIT. // // webrpc-gen -schema=hello-api.ridl -target=../../ -exports=false -client -out=./webapp/client.gen.js +// WebRPC description and code-gen version +const WebRPCVersion = "v1" + +// Schema version of your RIDL schema +const WebRPCSchemaVersion = "v1.0.0" + +// Schema hash generated from your RIDL schema +const WebRPCSchemaHash = "949b00a8db9810c69295f9dd9f02587a65d3c497" + // // Types // diff --git a/main.go.tmpl b/main.go.tmpl index e9c9d3c..015bf20 100644 --- a/main.go.tmpl +++ b/main.go.tmpl @@ -5,7 +5,7 @@ {{- set $opts "client" (ternary (in .Opts.client "" "true") true false) -}} {{- set $opts "server" (ternary (in .Opts.server "" "true") true false) -}} {{- set $opts "exports" (ternary (in .Opts.exports "false") false true) -}} -{{- set $opts "schemaHash" (ternary (in .Opts.schemaHash "" "true") true false) -}} +{{- set $opts "schemaHash" (ternary (eq (default .Opts.schemaHash "true") "false") false true) -}} {{- /* Print help on -help. */ -}} {{- if exists .Opts "help" -}}