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
GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)
go generate
# runs # go:generate buf dep update# go:generate buf build# go:generate buf generate# correct run
make openapi
Output
duplicate generated file name "openapi.yaml". Generation will continue without error here and drop the second occurrence of this file, but please raise an issue with the maintainer of the plugin.
Expected Output
output api into openapi.yaml with no errors
Anything else?
The openapi tool used
go install github.com/google/gnostic/cmd/protoc-gen-openapi@latest
and uncomment this at file buf.gen.yaml on root directory:
- local: protoc-gen-openapi
out: resources/docs/openapi
opt:
- naming=proto # Naming convention. Using "proto" passes the name directly from the proto file. The default value is json
# - depth=2 # Recursion depth of the loop message. The default value is 2
# - default_response=false # Adds a default response message. If true, a default response is automatically added for actions using the google.rpc.Status message. This is useful if you use envoy or grpc-gateway for transcoding, as they use this type as the default error response. Default value: true.
# - enum_type=string # Serialized type of enumeration type. Use "string" for string-based serialization. The default value is integer.
- output_mode=merge # Output file generation mode. By default, only one openapi.yaml file is generated in the output folder. Using "source_relative" generates a separate "[inputfile].openapi.yaml" file for each '[inputfile].proto' file. The default is: merged.
- fq_schema_naming=true # Schema named whether to add a package name, is true, will add a package name, for example: system. Service. V1. ListDictDetailResponse, otherwise as follows: ListDictDetailResponse. The default value is false.
It looks like, buf is splitting the proto into multiple commands for different directories.
The text was updated successfully, but these errors were encountered:
I cloned the repro and unfortunately there doesn't seem to be a buf.gen.yaml present in the repository you provided?
That being said, looking at your issue description:
It looks like, buf is splitting the proto into multiple commands for different directories.
The strategy key in buf.gen.yaml might be helpful to you. The default is to split the input file by directory and run the plugin across each. However, if you set strategy: all for your plugin, it will run the plugin against your entire.
GitHub repository with your minimal reproducible example (do not leave this field blank or fill out this field with "github.com/bufbuild/buf" or we will automatically close your issue, see the instructions above!)
https://github.com/origadmin/basic-layout
Commands
Output
Expected Output
output api into openapi.yaml with no errors
Anything else?
The openapi tool used
and uncomment this at file buf.gen.yaml on root directory:
It looks like, buf is splitting the proto into multiple commands for different directories.
The text was updated successfully, but these errors were encountered: