From c4f768cd5b396c6aed54ed2580d7e31f9631019f Mon Sep 17 00:00:00 2001 From: Lukas Jenicek Date: Fri, 8 Mar 2024 14:40:14 +0100 Subject: [PATCH 1/2] use double quotes to wrap comments and replace all double quotes with single --- main.go.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go.tmpl b/main.go.tmpl index c2296ac..820764d 100644 --- a/main.go.tmpl +++ b/main.go.tmpl @@ -129,7 +129,7 @@ paths: /rpc/{{$service.Name}}/{{$method.Name}}: post: {{- if gt (len $method.Comments) 0 }} - summary: '{{ join $method.Comments "\n" }}' + summary: "{{ replaceAll (join $method.Comments "\n") "\"" "'" }}" {{- end }} requestBody: content: From 6da3ea5db46bd936513a3ca7e4eda1acf1fcc09a Mon Sep 17 00:00:00 2001 From: Lukas Jenicek Date: Fri, 8 Mar 2024 15:37:45 +0100 Subject: [PATCH 2/2] regenerate using latest webrpc --- .github/workflows/ci.yml | 2 +- _examples/openapi.gen.yaml | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9f9c4a6..90e9d5c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: - uses: actions/checkout@v3 - name: Install webrpc-gen run: | - curl -o ./webrpc-gen -fLJO https://github.com/webrpc/webrpc/releases/download/v0.14.3/webrpc-gen.linux-amd64 + curl -o ./webrpc-gen -fLJO https://github.com/webrpc/webrpc/releases/download/v0.15.1/webrpc-gen.linux-amd64 chmod +x ./webrpc-gen echo $PWD >> $GITHUB_PATH diff --git a/_examples/openapi.gen.yaml b/_examples/openapi.gen.yaml index 8fa5527..1aa7c5b 100644 --- a/_examples/openapi.gen.yaml +++ b/_examples/openapi.gen.yaml @@ -1,6 +1,6 @@ # example v0.0.1 2b7f54ec87d95d472145c1e137844eb76a239e1f # -- -# Code generated by webrpc-gen@v0.14.3 with ../ generator; DO NOT EDIT +# Code generated by webrpc-gen@v0.15.1 with ../ generator; DO NOT EDIT # # webrpc-gen -schema=./proto.ridl -target=../ -out=./openapi.gen.yaml -title=Example webrpc API -apiVersion=v22.11.8 -serverUrl=https://api.example.com -serverDescription=Production openapi: 3.0.0 @@ -702,4 +702,4 @@ paths: - $ref: '#/components/schemas/ErrorWebrpcBadResponse' - $ref: '#/components/schemas/ErrorWebrpcServerPanic' - $ref: '#/components/schemas/ErrorWebrpcInternalError' - - $ref: '#/components/schemas/ErrorDatabaseDown' \ No newline at end of file + - $ref: '#/components/schemas/ErrorDatabaseDown'