BUILD.bazel 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")
  2. package(default_visibility = ["//protoc-gen-openapiv2:__subpackages__"])
  3. go_library(
  4. name = "genopenapi",
  5. srcs = [
  6. "doc.go",
  7. "format.go",
  8. "generator.go",
  9. "helpers.go",
  10. "helpers_go111_old.go",
  11. "naming.go",
  12. "template.go",
  13. "types.go",
  14. ],
  15. importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi",
  16. deps = [
  17. "//internal/casing",
  18. "//internal/descriptor",
  19. "//internal/generator",
  20. "//protoc-gen-openapiv2/options",
  21. "@in_gopkg_yaml_v3//:yaml_v3",
  22. "@org_golang_google_genproto_googleapis_api//annotations",
  23. "@org_golang_google_genproto_googleapis_api//visibility",
  24. "@org_golang_google_genproto_googleapis_rpc//status",
  25. "@org_golang_google_grpc//grpclog",
  26. "@org_golang_google_protobuf//encoding/protojson",
  27. "@org_golang_google_protobuf//proto",
  28. "@org_golang_google_protobuf//reflect/protodesc",
  29. "@org_golang_google_protobuf//types/descriptorpb",
  30. "@org_golang_google_protobuf//types/known/anypb",
  31. "@org_golang_google_protobuf//types/known/structpb",
  32. "@org_golang_google_protobuf//types/pluginpb",
  33. "@org_golang_x_text//cases",
  34. "@org_golang_x_text//language",
  35. ],
  36. )
  37. go_test(
  38. name = "genopenapi_test",
  39. size = "small",
  40. srcs = [
  41. "cycle_test.go",
  42. "format_test.go",
  43. "generator_test.go",
  44. "helpers_test.go",
  45. "naming_test.go",
  46. "template_fuzz_test.go",
  47. "template_test.go",
  48. "types_test.go",
  49. ],
  50. data = glob(["testdata/**"]),
  51. embed = [":genopenapi"],
  52. deps = [
  53. "//internal/descriptor",
  54. "//internal/descriptor/openapiconfig",
  55. "//internal/httprule",
  56. "//protoc-gen-openapiv2/options",
  57. "//runtime",
  58. "@com_github_google_go_cmp//cmp",
  59. "@in_gopkg_yaml_v3//:yaml_v3",
  60. "@org_golang_google_genproto_googleapis_api//annotations",
  61. "@org_golang_google_genproto_googleapis_api//visibility",
  62. "@org_golang_google_protobuf//encoding/protojson",
  63. "@org_golang_google_protobuf//encoding/prototext",
  64. "@org_golang_google_protobuf//proto",
  65. "@org_golang_google_protobuf//reflect/protodesc",
  66. "@org_golang_google_protobuf//reflect/protoreflect",
  67. "@org_golang_google_protobuf//reflect/protoregistry",
  68. "@org_golang_google_protobuf//types/descriptorpb",
  69. "@org_golang_google_protobuf//types/known/anypb",
  70. "@org_golang_google_protobuf//types/known/durationpb",
  71. "@org_golang_google_protobuf//types/known/emptypb",
  72. "@org_golang_google_protobuf//types/known/fieldmaskpb",
  73. "@org_golang_google_protobuf//types/known/structpb",
  74. "@org_golang_google_protobuf//types/known/timestamppb",
  75. "@org_golang_google_protobuf//types/known/wrapperspb",
  76. "@org_golang_google_protobuf//types/pluginpb",
  77. ],
  78. )
  79. alias(
  80. name = "go_default_library",
  81. actual = ":genopenapi",
  82. visibility = ["//protoc-gen-openapiv2:__subpackages__"],
  83. )