load("@io_bazel_rules_go//go:def.bzl", "go_library", "go_test")

package(default_visibility = ["//protoc-gen-openapiv2:__subpackages__"])

go_library(
    name = "go_default_library",
    srcs = [
        "doc.go",
        "generator.go",
        "helpers.go",
        "helpers_go111_old.go",
        "template.go",
        "types.go",
    ],
    importpath = "github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/internal/genopenapi",
    deps = [
        "//internal/casing:go_default_library",
        "//internal/descriptor:go_default_library",
        "//internal/generator:go_default_library",
        "//protoc-gen-openapiv2/options:go_default_library",
        "@com_github_golang_glog//:go_default_library",
        "@com_github_golang_protobuf//descriptor:go_default_library_gen",
        "@go_googleapis//google/api:annotations_go_proto",
        "@go_googleapis//google/rpc:status_go_proto",
        "@io_bazel_rules_go//proto/wkt:any_go_proto",
        "@org_golang_google_protobuf//encoding/protojson:go_default_library",
        "@org_golang_google_protobuf//proto:go_default_library",
        "@org_golang_google_protobuf//types/descriptorpb:go_default_library",
        "@org_golang_google_protobuf//types/known/structpb:go_default_library",
        "@org_golang_google_protobuf//types/pluginpb:go_default_library",
    ],
)

go_test(
    name = "go_default_test",
    size = "small",
    srcs = [
        "cycle_test.go",
        "template_test.go",
    ],
    embed = [":go_default_library"],
    deps = [
        "//internal/descriptor:go_default_library",
        "//internal/descriptor/openapiconfig:go_default_library",
        "//internal/httprule:go_default_library",
        "//protoc-gen-openapiv2/options:go_default_library",
        "//runtime:go_default_library",
        "@com_github_google_go_cmp//cmp:go_default_library",
        "@go_googleapis//google/api:annotations_go_proto",
        "@io_bazel_rules_go//proto/wkt:field_mask_go_proto",
        "@org_golang_google_protobuf//proto:go_default_library",
        "@org_golang_google_protobuf//reflect/protodesc:go_default_library",
        "@org_golang_google_protobuf//types/descriptorpb:go_default_library",
        "@org_golang_google_protobuf//types/known/durationpb:go_default_library",
        "@org_golang_google_protobuf//types/known/structpb:go_default_library",
        "@org_golang_google_protobuf//types/known/timestamppb:go_default_library",
        "@org_golang_google_protobuf//types/known/wrapperspb:go_default_library",
        "@org_golang_google_protobuf//types/pluginpb:go_default_library",
    ],
)
