openapiconfig.proto 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. syntax = "proto3";
  2. package grpc.gateway.internal.descriptor.openapiconfig;
  3. option go_package = "github.com/go-kratos/grpc-gateway/v2/internal/descriptor/openapiconfig";
  4. import "protoc-gen-openapiv2/options/openapiv2.proto";
  5. // OpenAPIFileOption represents OpenAPI options on a file
  6. message OpenAPIFileOption {
  7. string file = 1;
  8. grpc.gateway.protoc_gen_openapiv2.options.Swagger option = 2;
  9. }
  10. // OpenAPIMethodOption represents OpenAPI options on a method
  11. message OpenAPIMethodOption {
  12. string method = 1;
  13. grpc.gateway.protoc_gen_openapiv2.options.Operation option = 2;
  14. }
  15. // OpenAPIMessageOption represents OpenAPI options on a message
  16. message OpenAPIMessageOption {
  17. string message = 1;
  18. grpc.gateway.protoc_gen_openapiv2.options.Schema option = 2;
  19. }
  20. // OpenAPIServiceOption represents OpenAPI options on a service
  21. message OpenAPIServiceOption {
  22. string service = 1; // ex: Service
  23. grpc.gateway.protoc_gen_openapiv2.options.Tag option = 2;
  24. }
  25. // OpenAPIFieldOption represents OpenAPI options on a field
  26. message OpenAPIFieldOption {
  27. string field = 1;
  28. grpc.gateway.protoc_gen_openapiv2.options.JSONSchema option = 2;
  29. }
  30. // OpenAPIOptions represents OpenAPI protobuf options
  31. message OpenAPIOptions {
  32. repeated OpenAPIFileOption file = 1;
  33. repeated OpenAPIMethodOption method = 2;
  34. repeated OpenAPIMessageOption message = 3;
  35. repeated OpenAPIServiceOption service = 4;
  36. repeated OpenAPIFieldOption field = 5;
  37. }
  38. // OpenAPIConfig represents a set of OpenAPI options
  39. message OpenAPIConfig {
  40. OpenAPIOptions openapi_options = 1;
  41. }