buf.gen.yaml 1014 B

1234567891011121314151617181920212223242526272829303132333435
  1. version: v1
  2. managed:
  3. enabled: true
  4. go_package_prefix:
  5. default: github.com/usememos/memos/proto/gen
  6. except:
  7. - buf.build/googleapis/googleapis
  8. plugins:
  9. - plugin: buf.build/protocolbuffers/go
  10. out: gen
  11. opt:
  12. - paths=source_relative
  13. - plugin: buf.build/grpc/go
  14. out: gen
  15. opt:
  16. - paths=source_relative
  17. - plugin: buf.build/grpc-ecosystem/gateway
  18. out: gen
  19. opt:
  20. - paths=source_relative
  21. - plugin: buf.build/grpc-ecosystem/openapiv2
  22. out: ../docs
  23. opt: output_format=yaml,allow_merge=true
  24. # Build the TypeScript definitions for the web.
  25. - plugin: buf.build/community/stephenh-ts-proto
  26. out: ../web/src/types/proto
  27. # reference: https://github.com/deeplay-io/nice-grpc/blob/master/packages/nice-grpc-web/README.md#using-ts-proto
  28. opt:
  29. - env=browser
  30. - useOptionals=messages
  31. - outputServices=generic-definitions
  32. - outputJsonMethods=false
  33. - useExactTypes=false
  34. - esModuleInterop=true
  35. - stringEnums=true