buf.gen.yaml 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  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:v1.31.0
  10. out: gen
  11. opt:
  12. - paths=source_relative
  13. - plugin: buf.build/grpc/go:v1.3.0
  14. out: gen
  15. opt:
  16. - paths=source_relative
  17. - plugin: buf.build/grpc-ecosystem/gateway:v2.16.1
  18. out: gen
  19. opt:
  20. - paths=source_relative
  21. - plugin: buf.build/grpc-ecosystem/openapiv2:v2.19.0
  22. out: ../api/v2/
  23. opt: output_format=yaml,allow_merge=true
  24. # Build the TypeScript definitions for the web.
  25. - plugin: buf.build/community/stephenh-ts-proto:v1.152.1
  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
  36. - plugin: buf.build/community/pseudomuto-doc:v1.5.1
  37. out: gen
  38. opt:
  39. - markdown,README.md,source_relative