You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I use local plugin from last release and buf.gen.yaml my config is:
inputs:
- directory: .paths:
- module\api\service\ plugins:
- local: ../../third_party/protoc-gen-openapiv3.exe # current dir is proto rootout: gen/swagger/v3opt:
- openapi_config=my_api_config.yaml
Actual behavior
When I call buf generate --template my_buf.gen.yaml (from proto root dir) openapi plugin responds with error:
protoc-gen-openapiv3.exe: failed to load global OpenAPI config file: failed to JSON marshal content: json: unsupported type: map[interface {}]interface {}
Expected behavior
No error and merged swagger for all services in module/api/service was generated
The text was updated successfully, but these errors were encountered:
@WizMe-M could I possibly see your my_api_config.yaml.
I think this is something we need to resolve but I want to first ensure the problem is what I think it is. I bet when we load the YAML file, we get any as the key but JSON does NOT allow any or interface{} as the JSON keys, thus the issue.
Ah... I'm so sorry, I can't reproduce this issue.
I fixed it by accident and don't know what was the problem.
Pretty sure that it was located somewhere
services:
selector: '.v1.FooService'
methods:
FooBar:
responses: # there
I was trying to add docs for default (200) response.
iirc, it was either ref option, or name of response code (I named it without quotes at first).
I guess the root of the problem was in quotes for response code
Context
I use local plugin from last release and
buf.gen.yaml
my config is:Actual behavior
When I call
buf generate --template my_buf.gen.yaml
(from proto root dir) openapi plugin responds with error:Expected behavior
No error and merged swagger for all services in
module/api/service
was generatedThe text was updated successfully, but these errors were encountered: