From 96a4c69414937490a20a4c33b8b3fe782ab57d83 Mon Sep 17 00:00:00 2001 From: Jed Liu Date: Tue, 2 Jul 2024 15:11:48 -0400 Subject: [PATCH] POA-1341 Add path_param_alg field to HTTPMethodMetadata (#13) Tracks which path-parameter inference algorithm was used to produce a given Method. --- go/api_spec/method.pb.go | 382 +++++++++++++++++++++--------------- proto/api_spec/method.proto | 12 ++ py/api_spec/method_pb2.py | 67 +++++-- ts/api_spec/api_type_pb.js | 14 +- ts/api_spec/method_pb.d.ts | 11 ++ ts/api_spec/method_pb.js | 75 +++++-- ts/api_spec/sequence_pb.js | 23 ++- ts/api_spec/spec_pb.js | 17 +- ts/api_spec/types_pb.js | 14 +- ts/api_spec/witness_pb.js | 14 +- 10 files changed, 412 insertions(+), 217 deletions(-) diff --git a/go/api_spec/method.pb.go b/go/api_spec/method.pb.go index 9f4c9b7..c6e989e 100644 --- a/go/api_spec/method.pb.go +++ b/go/api_spec/method.pb.go @@ -136,6 +136,62 @@ func (HTTPBody_ContentType) EnumDescriptor() ([]byte, []int) { return file_method_proto_rawDescGZIP(), []int{22, 0} } +// Identifies the path parameter inference algorithm used to create this +// method. This is `unknown` for witnesses (which do not have any associated +// inference algorithm) and for methods that were created before the +// introduction of this field. +type HTTPMethodMeta_PathParameterInferenceAlgorithm int32 + +const ( + HTTPMethodMeta_UNKNOWN HTTPMethodMeta_PathParameterInferenceAlgorithm = 0 + HTTPMethodMeta_v1 HTTPMethodMeta_PathParameterInferenceAlgorithm = 1 + HTTPMethodMeta_v2 HTTPMethodMeta_PathParameterInferenceAlgorithm = 2 + HTTPMethodMeta_v3 HTTPMethodMeta_PathParameterInferenceAlgorithm = 3 +) + +// Enum value maps for HTTPMethodMeta_PathParameterInferenceAlgorithm. +var ( + HTTPMethodMeta_PathParameterInferenceAlgorithm_name = map[int32]string{ + 0: "UNKNOWN", + 1: "v1", + 2: "v2", + 3: "v3", + } + HTTPMethodMeta_PathParameterInferenceAlgorithm_value = map[string]int32{ + "UNKNOWN": 0, + "v1": 1, + "v2": 2, + "v3": 3, + } +) + +func (x HTTPMethodMeta_PathParameterInferenceAlgorithm) Enum() *HTTPMethodMeta_PathParameterInferenceAlgorithm { + p := new(HTTPMethodMeta_PathParameterInferenceAlgorithm) + *p = x + return p +} + +func (x HTTPMethodMeta_PathParameterInferenceAlgorithm) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (HTTPMethodMeta_PathParameterInferenceAlgorithm) Descriptor() protoreflect.EnumDescriptor { + return file_method_proto_enumTypes[2].Descriptor() +} + +func (HTTPMethodMeta_PathParameterInferenceAlgorithm) Type() protoreflect.EnumType { + return &file_method_proto_enumTypes[2] +} + +func (x HTTPMethodMeta_PathParameterInferenceAlgorithm) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use HTTPMethodMeta_PathParameterInferenceAlgorithm.Descriptor instead. +func (HTTPMethodMeta_PathParameterInferenceAlgorithm) EnumDescriptor() ([]byte, []int) { + return file_method_proto_rawDescGZIP(), []int{31, 0} +} + type Bool struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2211,7 +2267,8 @@ type HTTPMethodMeta struct { // // This measurement is from the last byte of the HTTP request to the // first byte of the HTTP response, ignoring time spent in transmission. - ProcessingLatency float32 `protobuf:"fixed32,4,opt,name=processing_latency,json=processingLatency,proto3" json:"processing_latency,omitempty"` + ProcessingLatency float32 `protobuf:"fixed32,4,opt,name=processing_latency,json=processingLatency,proto3" json:"processing_latency,omitempty"` + PathParamAlg HTTPMethodMeta_PathParameterInferenceAlgorithm `protobuf:"varint,5,opt,name=path_param_alg,json=pathParamAlg,proto3,enum=api_spec.HTTPMethodMeta_PathParameterInferenceAlgorithm" json:"path_param_alg,omitempty"` } func (x *HTTPMethodMeta) Reset() { @@ -2274,6 +2331,13 @@ func (x *HTTPMethodMeta) GetProcessingLatency() float32 { return 0 } +func (x *HTTPMethodMeta) GetPathParamAlg() HTTPMethodMeta_PathParameterInferenceAlgorithm { + if x != nil { + return x.PathParamAlg + } + return HTTPMethodMeta_UNKNOWN +} + type MethodMeta struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2669,7 +2733,7 @@ var file_method_proto_rawDesc = []byte{ 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x11, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x41, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, 0x52, 0x07, 0x61, 0x70, 0x69, 0x54, 0x79, 0x70, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x47, 0x52, 0x50, 0x43, 0x4d, - 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x22, 0x90, 0x01, 0x0a, 0x0e, 0x48, 0x54, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x22, 0xb8, 0x02, 0x0a, 0x0e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x70, 0x61, 0x74, 0x68, 0x5f, 0x74, 0x65, 0x6d, @@ -2678,40 +2742,50 @@ var file_method_proto_rawDesc = []byte{ 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x68, 0x6f, 0x73, 0x74, 0x12, 0x2d, 0x0a, 0x12, 0x70, 0x72, 0x6f, 0x63, 0x65, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x5f, 0x6c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x02, 0x52, 0x11, 0x70, 0x72, 0x6f, 0x63, 0x65, - 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x22, 0x74, 0x0a, 0x0a, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x04, 0x67, 0x72, - 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x2e, 0x47, 0x52, 0x50, 0x43, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, - 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x67, 0x72, 0x70, 0x63, 0x12, 0x2e, 0x0a, 0x04, 0x68, 0x74, - 0x74, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, - 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x68, 0x74, 0x74, 0x70, 0x42, 0x06, 0x0a, 0x04, 0x6d, 0x65, - 0x74, 0x61, 0x22, 0xdc, 0x02, 0x0a, 0x06, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x22, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x5f, - 0x73, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x49, 0x44, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x61, 0x72, 0x67, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x2e, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x04, 0x61, 0x72, 0x67, - 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, - 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x12, 0x28, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, - 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x1a, 0x47, 0x0a, 0x09, 0x41, 0x72, - 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, - 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, - 0x70, 0x65, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, - 0x02, 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x0e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, - 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, - 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, - 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x61, 0x6b, 0x69, 0x74, 0x61, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, - 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x75, 0x70, 0x65, 0x72, 0x73, 0x74, 0x61, 0x72, - 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x6f, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x62, - 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x73, 0x73, 0x69, 0x6e, 0x67, 0x4c, 0x61, 0x74, 0x65, 0x6e, 0x63, 0x79, 0x12, 0x5e, 0x0a, 0x0e, + 0x70, 0x61, 0x74, 0x68, 0x5f, 0x70, 0x61, 0x72, 0x61, 0x6d, 0x5f, 0x61, 0x6c, 0x67, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x38, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, + 0x48, 0x54, 0x54, 0x50, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x2e, 0x50, + 0x61, 0x74, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x65, + 0x72, 0x65, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x52, 0x0c, + 0x70, 0x61, 0x74, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x41, 0x6c, 0x67, 0x22, 0x46, 0x0a, 0x1f, + 0x50, 0x61, 0x74, 0x68, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x65, 0x74, 0x65, 0x72, 0x49, 0x6e, 0x66, + 0x65, 0x72, 0x65, 0x6e, 0x63, 0x65, 0x41, 0x6c, 0x67, 0x6f, 0x72, 0x69, 0x74, 0x68, 0x6d, 0x12, + 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x4b, 0x4e, 0x4f, 0x57, 0x4e, 0x10, 0x00, 0x12, 0x06, 0x0a, 0x02, + 0x76, 0x31, 0x10, 0x01, 0x12, 0x06, 0x0a, 0x02, 0x76, 0x32, 0x10, 0x02, 0x12, 0x06, 0x0a, 0x02, + 0x76, 0x33, 0x10, 0x03, 0x22, 0x74, 0x0a, 0x0a, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, + 0x74, 0x61, 0x12, 0x2e, 0x0a, 0x04, 0x67, 0x72, 0x70, 0x63, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x47, 0x52, 0x50, 0x43, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x67, 0x72, + 0x70, 0x63, 0x12, 0x2e, 0x0a, 0x04, 0x68, 0x74, 0x74, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x48, 0x54, 0x54, 0x50, + 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x48, 0x00, 0x52, 0x04, 0x68, 0x74, + 0x74, 0x70, 0x42, 0x06, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, 0x22, 0xdc, 0x02, 0x0a, 0x06, 0x4d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x22, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, + 0x68, 0x6f, 0x64, 0x49, 0x44, 0x52, 0x02, 0x69, 0x64, 0x12, 0x2e, 0x0a, 0x04, 0x61, 0x72, 0x67, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, + 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x04, 0x61, 0x72, 0x67, 0x73, 0x12, 0x3d, 0x0a, 0x09, 0x72, 0x65, 0x73, + 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, + 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x2e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x72, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x12, 0x28, 0x0a, 0x04, 0x6d, 0x65, 0x74, 0x61, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, + 0x63, 0x2e, 0x4d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x4d, 0x65, 0x74, 0x61, 0x52, 0x04, 0x6d, 0x65, + 0x74, 0x61, 0x1a, 0x47, 0x0a, 0x09, 0x41, 0x72, 0x67, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, + 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, + 0x79, 0x12, 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x0e, 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, + 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0x4c, 0x0a, 0x0e, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, + 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, + 0x24, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x0e, + 0x2e, 0x61, 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x2e, 0x44, 0x61, 0x74, 0x61, 0x52, 0x05, + 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x42, 0x2c, 0x5a, 0x2a, 0x61, 0x6b, 0x69, + 0x74, 0x61, 0x73, 0x6f, 0x66, 0x74, 0x77, 0x61, 0x72, 0x65, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, + 0x75, 0x70, 0x65, 0x72, 0x73, 0x74, 0x61, 0x72, 0x2f, 0x70, 0x62, 0x2f, 0x67, 0x6f, 0x2f, 0x61, + 0x70, 0x69, 0x5f, 0x73, 0x70, 0x65, 0x63, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -2726,128 +2800,130 @@ func file_method_proto_rawDescGZIP() []byte { return file_method_proto_rawDescData } -var file_method_proto_enumTypes = make([]protoimpl.EnumInfo, 2) +var file_method_proto_enumTypes = make([]protoimpl.EnumInfo, 3) var file_method_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_method_proto_goTypes = []interface{}{ - (HTTPAuth_HTTPAuthType)(0), // 0: api_spec.HTTPAuth.HTTPAuthType - (HTTPBody_ContentType)(0), // 1: api_spec.HTTPBody.ContentType - (*Bool)(nil), // 2: api_spec.Bool - (*Bytes)(nil), // 3: api_spec.Bytes - (*String)(nil), // 4: api_spec.String - (*Int32)(nil), // 5: api_spec.Int32 - (*Int64)(nil), // 6: api_spec.Int64 - (*Uint32)(nil), // 7: api_spec.Uint32 - (*Uint64)(nil), // 8: api_spec.Uint64 - (*Double)(nil), // 9: api_spec.Double - (*Float)(nil), // 10: api_spec.Float - (*Primitive)(nil), // 11: api_spec.Primitive - (*List)(nil), // 12: api_spec.List - (*Struct)(nil), // 13: api_spec.Struct - (*MapData)(nil), // 14: api_spec.MapData - (*None)(nil), // 15: api_spec.None - (*Optional)(nil), // 16: api_spec.Optional - (*OneOf)(nil), // 17: api_spec.OneOf - (*GRPCMeta)(nil), // 18: api_spec.GRPCMeta - (*HTTPPath)(nil), // 19: api_spec.HTTPPath - (*HTTPQuery)(nil), // 20: api_spec.HTTPQuery - (*HTTPHeader)(nil), // 21: api_spec.HTTPHeader - (*HTTPAuth)(nil), // 22: api_spec.HTTPAuth - (*HTTPCookie)(nil), // 23: api_spec.HTTPCookie - (*HTTPBody)(nil), // 24: api_spec.HTTPBody - (*HTTPMultipart)(nil), // 25: api_spec.HTTPMultipart - (*HTTPEmpty)(nil), // 26: api_spec.HTTPEmpty - (*HTTPMeta)(nil), // 27: api_spec.HTTPMeta - (*DataMeta)(nil), // 28: api_spec.DataMeta - (*ExampleValue)(nil), // 29: api_spec.ExampleValue - (*Data)(nil), // 30: api_spec.Data - (*MethodID)(nil), // 31: api_spec.MethodID - (*GRPCMethodMeta)(nil), // 32: api_spec.GRPCMethodMeta - (*HTTPMethodMeta)(nil), // 33: api_spec.HTTPMethodMeta - (*MethodMeta)(nil), // 34: api_spec.MethodMeta - (*Method)(nil), // 35: api_spec.Method - nil, // 36: api_spec.Primitive.FormatsEntry - nil, // 37: api_spec.Struct.FieldsEntry - nil, // 38: api_spec.OneOf.OptionsEntry - nil, // 39: api_spec.Data.ExampleValuesEntry - nil, // 40: api_spec.Method.ArgsEntry - nil, // 41: api_spec.Method.ResponsesEntry - (*BoolType)(nil), // 42: api_spec.BoolType - (*BytesType)(nil), // 43: api_spec.BytesType - (*StringType)(nil), // 44: api_spec.StringType - (*Int32Type)(nil), // 45: api_spec.Int32Type - (*Int64Type)(nil), // 46: api_spec.Int64Type - (*Uint32Type)(nil), // 47: api_spec.Uint32Type - (*Uint64Type)(nil), // 48: api_spec.Uint64Type - (*DoubleType)(nil), // 49: api_spec.DoubleType - (*FloatType)(nil), // 50: api_spec.FloatType - (*AkitaAnnotations)(nil), // 51: api_spec.AkitaAnnotations - (ApiType)(0), // 52: api_spec.ApiType + (HTTPAuth_HTTPAuthType)(0), // 0: api_spec.HTTPAuth.HTTPAuthType + (HTTPBody_ContentType)(0), // 1: api_spec.HTTPBody.ContentType + (HTTPMethodMeta_PathParameterInferenceAlgorithm)(0), // 2: api_spec.HTTPMethodMeta.PathParameterInferenceAlgorithm + (*Bool)(nil), // 3: api_spec.Bool + (*Bytes)(nil), // 4: api_spec.Bytes + (*String)(nil), // 5: api_spec.String + (*Int32)(nil), // 6: api_spec.Int32 + (*Int64)(nil), // 7: api_spec.Int64 + (*Uint32)(nil), // 8: api_spec.Uint32 + (*Uint64)(nil), // 9: api_spec.Uint64 + (*Double)(nil), // 10: api_spec.Double + (*Float)(nil), // 11: api_spec.Float + (*Primitive)(nil), // 12: api_spec.Primitive + (*List)(nil), // 13: api_spec.List + (*Struct)(nil), // 14: api_spec.Struct + (*MapData)(nil), // 15: api_spec.MapData + (*None)(nil), // 16: api_spec.None + (*Optional)(nil), // 17: api_spec.Optional + (*OneOf)(nil), // 18: api_spec.OneOf + (*GRPCMeta)(nil), // 19: api_spec.GRPCMeta + (*HTTPPath)(nil), // 20: api_spec.HTTPPath + (*HTTPQuery)(nil), // 21: api_spec.HTTPQuery + (*HTTPHeader)(nil), // 22: api_spec.HTTPHeader + (*HTTPAuth)(nil), // 23: api_spec.HTTPAuth + (*HTTPCookie)(nil), // 24: api_spec.HTTPCookie + (*HTTPBody)(nil), // 25: api_spec.HTTPBody + (*HTTPMultipart)(nil), // 26: api_spec.HTTPMultipart + (*HTTPEmpty)(nil), // 27: api_spec.HTTPEmpty + (*HTTPMeta)(nil), // 28: api_spec.HTTPMeta + (*DataMeta)(nil), // 29: api_spec.DataMeta + (*ExampleValue)(nil), // 30: api_spec.ExampleValue + (*Data)(nil), // 31: api_spec.Data + (*MethodID)(nil), // 32: api_spec.MethodID + (*GRPCMethodMeta)(nil), // 33: api_spec.GRPCMethodMeta + (*HTTPMethodMeta)(nil), // 34: api_spec.HTTPMethodMeta + (*MethodMeta)(nil), // 35: api_spec.MethodMeta + (*Method)(nil), // 36: api_spec.Method + nil, // 37: api_spec.Primitive.FormatsEntry + nil, // 38: api_spec.Struct.FieldsEntry + nil, // 39: api_spec.OneOf.OptionsEntry + nil, // 40: api_spec.Data.ExampleValuesEntry + nil, // 41: api_spec.Method.ArgsEntry + nil, // 42: api_spec.Method.ResponsesEntry + (*BoolType)(nil), // 43: api_spec.BoolType + (*BytesType)(nil), // 44: api_spec.BytesType + (*StringType)(nil), // 45: api_spec.StringType + (*Int32Type)(nil), // 46: api_spec.Int32Type + (*Int64Type)(nil), // 47: api_spec.Int64Type + (*Uint32Type)(nil), // 48: api_spec.Uint32Type + (*Uint64Type)(nil), // 49: api_spec.Uint64Type + (*DoubleType)(nil), // 50: api_spec.DoubleType + (*FloatType)(nil), // 51: api_spec.FloatType + (*AkitaAnnotations)(nil), // 52: api_spec.AkitaAnnotations + (ApiType)(0), // 53: api_spec.ApiType } var file_method_proto_depIdxs = []int32{ - 42, // 0: api_spec.Bool.type:type_name -> api_spec.BoolType - 43, // 1: api_spec.Bytes.type:type_name -> api_spec.BytesType - 44, // 2: api_spec.String.type:type_name -> api_spec.StringType - 45, // 3: api_spec.Int32.type:type_name -> api_spec.Int32Type - 46, // 4: api_spec.Int64.type:type_name -> api_spec.Int64Type - 47, // 5: api_spec.Uint32.type:type_name -> api_spec.Uint32Type - 48, // 6: api_spec.Uint64.type:type_name -> api_spec.Uint64Type - 49, // 7: api_spec.Double.type:type_name -> api_spec.DoubleType - 50, // 8: api_spec.Float.type:type_name -> api_spec.FloatType - 2, // 9: api_spec.Primitive.bool_value:type_name -> api_spec.Bool - 3, // 10: api_spec.Primitive.bytes_value:type_name -> api_spec.Bytes - 4, // 11: api_spec.Primitive.string_value:type_name -> api_spec.String - 5, // 12: api_spec.Primitive.int32_value:type_name -> api_spec.Int32 - 6, // 13: api_spec.Primitive.int64_value:type_name -> api_spec.Int64 - 7, // 14: api_spec.Primitive.uint32_value:type_name -> api_spec.Uint32 - 8, // 15: api_spec.Primitive.uint64_value:type_name -> api_spec.Uint64 - 9, // 16: api_spec.Primitive.double_value:type_name -> api_spec.Double - 10, // 17: api_spec.Primitive.float_value:type_name -> api_spec.Float - 51, // 18: api_spec.Primitive.akita_annotations:type_name -> api_spec.AkitaAnnotations - 36, // 19: api_spec.Primitive.formats:type_name -> api_spec.Primitive.FormatsEntry - 30, // 20: api_spec.List.elems:type_name -> api_spec.Data - 37, // 21: api_spec.Struct.fields:type_name -> api_spec.Struct.FieldsEntry - 14, // 22: api_spec.Struct.map_type:type_name -> api_spec.MapData - 30, // 23: api_spec.MapData.key:type_name -> api_spec.Data - 30, // 24: api_spec.MapData.value:type_name -> api_spec.Data - 30, // 25: api_spec.Optional.data:type_name -> api_spec.Data - 15, // 26: api_spec.Optional.none:type_name -> api_spec.None - 38, // 27: api_spec.OneOf.options:type_name -> api_spec.OneOf.OptionsEntry + 43, // 0: api_spec.Bool.type:type_name -> api_spec.BoolType + 44, // 1: api_spec.Bytes.type:type_name -> api_spec.BytesType + 45, // 2: api_spec.String.type:type_name -> api_spec.StringType + 46, // 3: api_spec.Int32.type:type_name -> api_spec.Int32Type + 47, // 4: api_spec.Int64.type:type_name -> api_spec.Int64Type + 48, // 5: api_spec.Uint32.type:type_name -> api_spec.Uint32Type + 49, // 6: api_spec.Uint64.type:type_name -> api_spec.Uint64Type + 50, // 7: api_spec.Double.type:type_name -> api_spec.DoubleType + 51, // 8: api_spec.Float.type:type_name -> api_spec.FloatType + 3, // 9: api_spec.Primitive.bool_value:type_name -> api_spec.Bool + 4, // 10: api_spec.Primitive.bytes_value:type_name -> api_spec.Bytes + 5, // 11: api_spec.Primitive.string_value:type_name -> api_spec.String + 6, // 12: api_spec.Primitive.int32_value:type_name -> api_spec.Int32 + 7, // 13: api_spec.Primitive.int64_value:type_name -> api_spec.Int64 + 8, // 14: api_spec.Primitive.uint32_value:type_name -> api_spec.Uint32 + 9, // 15: api_spec.Primitive.uint64_value:type_name -> api_spec.Uint64 + 10, // 16: api_spec.Primitive.double_value:type_name -> api_spec.Double + 11, // 17: api_spec.Primitive.float_value:type_name -> api_spec.Float + 52, // 18: api_spec.Primitive.akita_annotations:type_name -> api_spec.AkitaAnnotations + 37, // 19: api_spec.Primitive.formats:type_name -> api_spec.Primitive.FormatsEntry + 31, // 20: api_spec.List.elems:type_name -> api_spec.Data + 38, // 21: api_spec.Struct.fields:type_name -> api_spec.Struct.FieldsEntry + 15, // 22: api_spec.Struct.map_type:type_name -> api_spec.MapData + 31, // 23: api_spec.MapData.key:type_name -> api_spec.Data + 31, // 24: api_spec.MapData.value:type_name -> api_spec.Data + 31, // 25: api_spec.Optional.data:type_name -> api_spec.Data + 16, // 26: api_spec.Optional.none:type_name -> api_spec.None + 39, // 27: api_spec.OneOf.options:type_name -> api_spec.OneOf.OptionsEntry 0, // 28: api_spec.HTTPAuth.type:type_name -> api_spec.HTTPAuth.HTTPAuthType 1, // 29: api_spec.HTTPBody.content_type:type_name -> api_spec.HTTPBody.ContentType - 19, // 30: api_spec.HTTPMeta.path:type_name -> api_spec.HTTPPath - 20, // 31: api_spec.HTTPMeta.query:type_name -> api_spec.HTTPQuery - 21, // 32: api_spec.HTTPMeta.header:type_name -> api_spec.HTTPHeader - 23, // 33: api_spec.HTTPMeta.cookie:type_name -> api_spec.HTTPCookie - 24, // 34: api_spec.HTTPMeta.body:type_name -> api_spec.HTTPBody - 26, // 35: api_spec.HTTPMeta.empty:type_name -> api_spec.HTTPEmpty - 22, // 36: api_spec.HTTPMeta.auth:type_name -> api_spec.HTTPAuth - 25, // 37: api_spec.HTTPMeta.multipart:type_name -> api_spec.HTTPMultipart - 18, // 38: api_spec.DataMeta.grpc:type_name -> api_spec.GRPCMeta - 27, // 39: api_spec.DataMeta.http:type_name -> api_spec.HTTPMeta - 11, // 40: api_spec.Data.primitive:type_name -> api_spec.Primitive - 13, // 41: api_spec.Data.struct:type_name -> api_spec.Struct - 12, // 42: api_spec.Data.list:type_name -> api_spec.List - 16, // 43: api_spec.Data.optional:type_name -> api_spec.Optional - 17, // 44: api_spec.Data.oneof:type_name -> api_spec.OneOf - 28, // 45: api_spec.Data.meta:type_name -> api_spec.DataMeta - 39, // 46: api_spec.Data.example_values:type_name -> api_spec.Data.ExampleValuesEntry - 52, // 47: api_spec.MethodID.api_type:type_name -> api_spec.ApiType - 32, // 48: api_spec.MethodMeta.grpc:type_name -> api_spec.GRPCMethodMeta - 33, // 49: api_spec.MethodMeta.http:type_name -> api_spec.HTTPMethodMeta - 31, // 50: api_spec.Method.id:type_name -> api_spec.MethodID - 40, // 51: api_spec.Method.args:type_name -> api_spec.Method.ArgsEntry - 41, // 52: api_spec.Method.responses:type_name -> api_spec.Method.ResponsesEntry - 34, // 53: api_spec.Method.meta:type_name -> api_spec.MethodMeta - 30, // 54: api_spec.Struct.FieldsEntry.value:type_name -> api_spec.Data - 30, // 55: api_spec.OneOf.OptionsEntry.value:type_name -> api_spec.Data - 29, // 56: api_spec.Data.ExampleValuesEntry.value:type_name -> api_spec.ExampleValue - 30, // 57: api_spec.Method.ArgsEntry.value:type_name -> api_spec.Data - 30, // 58: api_spec.Method.ResponsesEntry.value:type_name -> api_spec.Data - 59, // [59:59] is the sub-list for method output_type - 59, // [59:59] is the sub-list for method input_type - 59, // [59:59] is the sub-list for extension type_name - 59, // [59:59] is the sub-list for extension extendee - 0, // [0:59] is the sub-list for field type_name + 20, // 30: api_spec.HTTPMeta.path:type_name -> api_spec.HTTPPath + 21, // 31: api_spec.HTTPMeta.query:type_name -> api_spec.HTTPQuery + 22, // 32: api_spec.HTTPMeta.header:type_name -> api_spec.HTTPHeader + 24, // 33: api_spec.HTTPMeta.cookie:type_name -> api_spec.HTTPCookie + 25, // 34: api_spec.HTTPMeta.body:type_name -> api_spec.HTTPBody + 27, // 35: api_spec.HTTPMeta.empty:type_name -> api_spec.HTTPEmpty + 23, // 36: api_spec.HTTPMeta.auth:type_name -> api_spec.HTTPAuth + 26, // 37: api_spec.HTTPMeta.multipart:type_name -> api_spec.HTTPMultipart + 19, // 38: api_spec.DataMeta.grpc:type_name -> api_spec.GRPCMeta + 28, // 39: api_spec.DataMeta.http:type_name -> api_spec.HTTPMeta + 12, // 40: api_spec.Data.primitive:type_name -> api_spec.Primitive + 14, // 41: api_spec.Data.struct:type_name -> api_spec.Struct + 13, // 42: api_spec.Data.list:type_name -> api_spec.List + 17, // 43: api_spec.Data.optional:type_name -> api_spec.Optional + 18, // 44: api_spec.Data.oneof:type_name -> api_spec.OneOf + 29, // 45: api_spec.Data.meta:type_name -> api_spec.DataMeta + 40, // 46: api_spec.Data.example_values:type_name -> api_spec.Data.ExampleValuesEntry + 53, // 47: api_spec.MethodID.api_type:type_name -> api_spec.ApiType + 2, // 48: api_spec.HTTPMethodMeta.path_param_alg:type_name -> api_spec.HTTPMethodMeta.PathParameterInferenceAlgorithm + 33, // 49: api_spec.MethodMeta.grpc:type_name -> api_spec.GRPCMethodMeta + 34, // 50: api_spec.MethodMeta.http:type_name -> api_spec.HTTPMethodMeta + 32, // 51: api_spec.Method.id:type_name -> api_spec.MethodID + 41, // 52: api_spec.Method.args:type_name -> api_spec.Method.ArgsEntry + 42, // 53: api_spec.Method.responses:type_name -> api_spec.Method.ResponsesEntry + 35, // 54: api_spec.Method.meta:type_name -> api_spec.MethodMeta + 31, // 55: api_spec.Struct.FieldsEntry.value:type_name -> api_spec.Data + 31, // 56: api_spec.OneOf.OptionsEntry.value:type_name -> api_spec.Data + 30, // 57: api_spec.Data.ExampleValuesEntry.value:type_name -> api_spec.ExampleValue + 31, // 58: api_spec.Method.ArgsEntry.value:type_name -> api_spec.Data + 31, // 59: api_spec.Method.ResponsesEntry.value:type_name -> api_spec.Data + 60, // [60:60] is the sub-list for method output_type + 60, // [60:60] is the sub-list for method input_type + 60, // [60:60] is the sub-list for extension type_name + 60, // [60:60] is the sub-list for extension extendee + 0, // [0:60] is the sub-list for field type_name } func init() { file_method_proto_init() } @@ -3312,7 +3388,7 @@ func file_method_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_method_proto_rawDesc, - NumEnums: 2, + NumEnums: 3, NumMessages: 40, NumExtensions: 0, NumServices: 0, diff --git a/proto/api_spec/method.proto b/proto/api_spec/method.proto index c156c56..2f1f7cf 100644 --- a/proto/api_spec/method.proto +++ b/proto/api_spec/method.proto @@ -306,6 +306,18 @@ message HTTPMethodMeta { // This measurement is from the last byte of the HTTP request to the // first byte of the HTTP response, ignoring time spent in transmission. float processing_latency = 4; + + // Identifies the path parameter inference algorithm used to create this + // method. This is `unknown` for witnesses (which do not have any associated + // inference algorithm) and for methods that were created before the + // introduction of this field. + enum PathParameterInferenceAlgorithm { + UNKNOWN = 0; + v1 = 1; + v2 = 2; + v3 = 3; + } + PathParameterInferenceAlgorithm path_param_alg = 5; } message MethodMeta { diff --git a/py/api_spec/method_pb2.py b/py/api_spec/method_pb2.py index b4ae61c..8a547ad 100644 --- a/py/api_spec/method_pb2.py +++ b/py/api_spec/method_pb2.py @@ -21,7 +21,7 @@ syntax='proto3', serialized_options=b'Z*akitasoftware.com/superstar/pb/go/api_spec', create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0cmethod.proto\x12\x08\x61pi_spec\x1a\x0e\x61pi_type.proto\x1a\x0btypes.proto\"7\n\x04\x42ool\x12 \n\x04type\x18\x01 \x01(\x0b\x32\x12.api_spec.BoolType\x12\r\n\x05value\x18\x02 \x01(\x08\"9\n\x05\x42ytes\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.BytesType\x12\r\n\x05value\x18\x02 \x01(\x0c\";\n\x06String\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.StringType\x12\r\n\x05value\x18\x02 \x01(\t\"9\n\x05Int32\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.Int32Type\x12\r\n\x05value\x18\x02 \x01(\x05\"9\n\x05Int64\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.Int64Type\x12\r\n\x05value\x18\x02 \x01(\x03\";\n\x06Uint32\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.Uint32Type\x12\r\n\x05value\x18\x02 \x01(\r\";\n\x06Uint64\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.Uint64Type\x12\r\n\x05value\x18\x02 \x01(\x04\";\n\x06\x44ouble\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.DoubleType\x12\r\n\x05value\x18\x02 \x01(\x01\"9\n\x05\x46loat\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.FloatType\x12\r\n\x05value\x18\x02 \x01(\x02\"\xe3\x04\n\tPrimitive\x12\x11\n\ttype_hint\x18\x01 \x01(\t\x12$\n\nbool_value\x18\x02 \x01(\x0b\x32\x0e.api_spec.BoolH\x00\x12&\n\x0b\x62ytes_value\x18\x03 \x01(\x0b\x32\x0f.api_spec.BytesH\x00\x12(\n\x0cstring_value\x18\x04 \x01(\x0b\x32\x10.api_spec.StringH\x00\x12&\n\x0bint32_value\x18\x05 \x01(\x0b\x32\x0f.api_spec.Int32H\x00\x12&\n\x0bint64_value\x18\x06 \x01(\x0b\x32\x0f.api_spec.Int64H\x00\x12(\n\x0cuint32_value\x18\x07 \x01(\x0b\x32\x10.api_spec.Uint32H\x00\x12(\n\x0cuint64_value\x18\x08 \x01(\x0b\x32\x10.api_spec.Uint64H\x00\x12(\n\x0c\x64ouble_value\x18\t \x01(\x0b\x32\x10.api_spec.DoubleH\x00\x12&\n\x0b\x66loat_value\x18\n \x01(\x0b\x32\x0f.api_spec.FloatH\x00\x12\x35\n\x11\x61kita_annotations\x18\x0b \x01(\x0b\x32\x1a.api_spec.AkitaAnnotations\x12\x1d\n\x15\x63ontains_random_value\x18\x0c \x01(\x08\x12\x31\n\x07\x66ormats\x18\r \x03(\x0b\x32 .api_spec.Primitive.FormatsEntry\x12\x13\n\x0b\x66ormat_kind\x18\x0e \x01(\t\x1a.\n\x0c\x46ormatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x42\x07\n\x05value\"%\n\x04List\x12\x1d\n\x05\x65lems\x18\x01 \x03(\x0b\x32\x0e.api_spec.Data\"\x9a\x01\n\x06Struct\x12,\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1c.api_spec.Struct.FieldsEntry\x12#\n\x08map_type\x18\x02 \x01(\x0b\x32\x11.api_spec.MapData\x1a=\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\"E\n\x07MapData\x12\x1b\n\x03key\x18\x01 \x01(\x0b\x32\x0e.api_spec.Data\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data\"\x06\n\x04None\"S\n\x08Optional\x12\x1e\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x0e.api_spec.DataH\x00\x12\x1e\n\x04none\x18\x02 \x01(\x0b\x32\x0e.api_spec.NoneH\x00\x42\x07\n\x05value\"\x92\x01\n\x05OneOf\x12-\n\x07options\x18\x01 \x03(\x0b\x32\x1c.api_spec.OneOf.OptionsEntry\x12\x1a\n\x12potential_conflict\x18\x02 \x01(\x08\x1a>\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\"\n\n\x08GRPCMeta\"\x17\n\x08HTTPPath\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x18\n\tHTTPQuery\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x19\n\nHTTPHeader\x12\x0b\n\x03key\x18\x01 \x01(\t\"m\n\x08HTTPAuth\x12-\n\x04type\x18\x01 \x01(\x0e\x32\x1f.api_spec.HTTPAuth.HTTPAuthType\"2\n\x0cHTTPAuthType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\n\n\x06\x42\x45\x41RER\x10\x02\"\x19\n\nHTTPCookie\x12\x0b\n\x03key\x18\x01 \x01(\t\"\xe0\x01\n\x08HTTPBody\x12\x34\n\x0c\x63ontent_type\x18\x01 \x01(\x0e\x32\x1e.api_spec.HTTPBody.ContentType\x12\x12\n\nother_type\x18\x02 \x01(\t\"\x89\x01\n\x0b\x43ontentType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x14\n\x10\x46ORM_URL_ENCODED\x10\x02\x12\x10\n\x0cOCTET_STREAM\x10\x03\x12\x07\n\x03PDF\x10\x04\x12\x0e\n\nTEXT_PLAIN\x10\x05\x12\x08\n\x04YAML\x10\x06\x12\r\n\tTEXT_HTML\x10\x07\x12\t\n\x05OTHER\x10\x08\"\x1d\n\rHTTPMultipart\x12\x0c\n\x04type\x18\x01 \x01(\t\"\x0b\n\tHTTPEmpty\"\xe3\x02\n\x08HTTPMeta\x12\"\n\x04path\x18\x01 \x01(\x0b\x32\x12.api_spec.HTTPPathH\x00\x12$\n\x05query\x18\x02 \x01(\x0b\x32\x13.api_spec.HTTPQueryH\x00\x12&\n\x06header\x18\x03 \x01(\x0b\x32\x14.api_spec.HTTPHeaderH\x00\x12&\n\x06\x63ookie\x18\x04 \x01(\x0b\x32\x14.api_spec.HTTPCookieH\x00\x12\"\n\x04\x62ody\x18\x05 \x01(\x0b\x32\x12.api_spec.HTTPBodyH\x00\x12$\n\x05\x65mpty\x18\x06 \x01(\x0b\x32\x13.api_spec.HTTPEmptyH\x00\x12\"\n\x04\x61uth\x18\x08 \x01(\x0b\x32\x12.api_spec.HTTPAuthH\x00\x12,\n\tmultipart\x18\t \x01(\x0b\x32\x17.api_spec.HTTPMultipartH\x00\x12\x15\n\rresponse_code\x18\x07 \x01(\x05\x42\n\n\x08location\"Z\n\x08\x44\x61taMeta\x12\"\n\x04grpc\x18\x01 \x01(\x0b\x32\x12.api_spec.GRPCMetaH\x00\x12\"\n\x04http\x18\x02 \x01(\x0b\x32\x12.api_spec.HTTPMetaH\x00\x42\x06\n\x04meta\"\x0e\n\x0c\x45xampleValue\"\x84\x03\n\x04\x44\x61ta\x12(\n\tprimitive\x18\x01 \x01(\x0b\x32\x13.api_spec.PrimitiveH\x00\x12\"\n\x06struct\x18\x02 \x01(\x0b\x32\x10.api_spec.StructH\x00\x12\x1e\n\x04list\x18\x03 \x01(\x0b\x32\x0e.api_spec.ListH\x00\x12&\n\x08optional\x18\x04 \x01(\x0b\x32\x12.api_spec.OptionalH\x00\x12 \n\x05oneof\x18\x06 \x01(\x0b\x32\x0f.api_spec.OneOfH\x00\x12 \n\x04meta\x18\x05 \x01(\x0b\x32\x12.api_spec.DataMeta\x12\x10\n\x08nullable\x18\x07 \x01(\x08\x12\x39\n\x0e\x65xample_values\x18\x08 \x03(\x0b\x32!.api_spec.Data.ExampleValuesEntry\x1aL\n\x12\x45xampleValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.api_spec.ExampleValue:\x02\x38\x01\x42\x07\n\x05value\"=\n\x08MethodID\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x08\x61pi_type\x18\x02 \x01(\x0e\x32\x11.api_spec.ApiType\"\x10\n\x0eGRPCMethodMeta\"a\n\x0eHTTPMethodMeta\x12\x0e\n\x06method\x18\x01 \x01(\t\x12\x15\n\rpath_template\x18\x02 \x01(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x1a\n\x12processing_latency\x18\x04 \x01(\x02\"h\n\nMethodMeta\x12(\n\x04grpc\x18\x01 \x01(\x0b\x32\x18.api_spec.GRPCMethodMetaH\x00\x12(\n\x04http\x18\x02 \x01(\x0b\x32\x18.api_spec.HTTPMethodMetaH\x00\x42\x06\n\x04meta\"\xa9\x02\n\x06Method\x12\x1e\n\x02id\x18\x01 \x01(\x0b\x32\x12.api_spec.MethodID\x12(\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1a.api_spec.Method.ArgsEntry\x12\x32\n\tresponses\x18\x03 \x03(\x0b\x32\x1f.api_spec.Method.ResponsesEntry\x12\"\n\x04meta\x18\x04 \x01(\x0b\x32\x14.api_spec.MethodMeta\x1a;\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\x1a@\n\x0eResponsesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\x42,Z*akitasoftware.com/superstar/pb/go/api_specb\x06proto3' + serialized_pb=b'\n\x0cmethod.proto\x12\x08\x61pi_spec\x1a\x0e\x61pi_type.proto\x1a\x0btypes.proto\"7\n\x04\x42ool\x12 \n\x04type\x18\x01 \x01(\x0b\x32\x12.api_spec.BoolType\x12\r\n\x05value\x18\x02 \x01(\x08\"9\n\x05\x42ytes\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.BytesType\x12\r\n\x05value\x18\x02 \x01(\x0c\";\n\x06String\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.StringType\x12\r\n\x05value\x18\x02 \x01(\t\"9\n\x05Int32\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.Int32Type\x12\r\n\x05value\x18\x02 \x01(\x05\"9\n\x05Int64\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.Int64Type\x12\r\n\x05value\x18\x02 \x01(\x03\";\n\x06Uint32\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.Uint32Type\x12\r\n\x05value\x18\x02 \x01(\r\";\n\x06Uint64\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.Uint64Type\x12\r\n\x05value\x18\x02 \x01(\x04\";\n\x06\x44ouble\x12\"\n\x04type\x18\x01 \x01(\x0b\x32\x14.api_spec.DoubleType\x12\r\n\x05value\x18\x02 \x01(\x01\"9\n\x05\x46loat\x12!\n\x04type\x18\x01 \x01(\x0b\x32\x13.api_spec.FloatType\x12\r\n\x05value\x18\x02 \x01(\x02\"\xe3\x04\n\tPrimitive\x12\x11\n\ttype_hint\x18\x01 \x01(\t\x12$\n\nbool_value\x18\x02 \x01(\x0b\x32\x0e.api_spec.BoolH\x00\x12&\n\x0b\x62ytes_value\x18\x03 \x01(\x0b\x32\x0f.api_spec.BytesH\x00\x12(\n\x0cstring_value\x18\x04 \x01(\x0b\x32\x10.api_spec.StringH\x00\x12&\n\x0bint32_value\x18\x05 \x01(\x0b\x32\x0f.api_spec.Int32H\x00\x12&\n\x0bint64_value\x18\x06 \x01(\x0b\x32\x0f.api_spec.Int64H\x00\x12(\n\x0cuint32_value\x18\x07 \x01(\x0b\x32\x10.api_spec.Uint32H\x00\x12(\n\x0cuint64_value\x18\x08 \x01(\x0b\x32\x10.api_spec.Uint64H\x00\x12(\n\x0c\x64ouble_value\x18\t \x01(\x0b\x32\x10.api_spec.DoubleH\x00\x12&\n\x0b\x66loat_value\x18\n \x01(\x0b\x32\x0f.api_spec.FloatH\x00\x12\x35\n\x11\x61kita_annotations\x18\x0b \x01(\x0b\x32\x1a.api_spec.AkitaAnnotations\x12\x1d\n\x15\x63ontains_random_value\x18\x0c \x01(\x08\x12\x31\n\x07\x66ormats\x18\r \x03(\x0b\x32 .api_spec.Primitive.FormatsEntry\x12\x13\n\x0b\x66ormat_kind\x18\x0e \x01(\t\x1a.\n\x0c\x46ormatsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\r\n\x05value\x18\x02 \x01(\x08:\x02\x38\x01\x42\x07\n\x05value\"%\n\x04List\x12\x1d\n\x05\x65lems\x18\x01 \x03(\x0b\x32\x0e.api_spec.Data\"\x9a\x01\n\x06Struct\x12,\n\x06\x66ields\x18\x01 \x03(\x0b\x32\x1c.api_spec.Struct.FieldsEntry\x12#\n\x08map_type\x18\x02 \x01(\x0b\x32\x11.api_spec.MapData\x1a=\n\x0b\x46ieldsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\"E\n\x07MapData\x12\x1b\n\x03key\x18\x01 \x01(\x0b\x32\x0e.api_spec.Data\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data\"\x06\n\x04None\"S\n\x08Optional\x12\x1e\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32\x0e.api_spec.DataH\x00\x12\x1e\n\x04none\x18\x02 \x01(\x0b\x32\x0e.api_spec.NoneH\x00\x42\x07\n\x05value\"\x92\x01\n\x05OneOf\x12-\n\x07options\x18\x01 \x03(\x0b\x32\x1c.api_spec.OneOf.OptionsEntry\x12\x1a\n\x12potential_conflict\x18\x02 \x01(\x08\x1a>\n\x0cOptionsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\"\n\n\x08GRPCMeta\"\x17\n\x08HTTPPath\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x18\n\tHTTPQuery\x12\x0b\n\x03key\x18\x01 \x01(\t\"\x19\n\nHTTPHeader\x12\x0b\n\x03key\x18\x01 \x01(\t\"m\n\x08HTTPAuth\x12-\n\x04type\x18\x01 \x01(\x0e\x32\x1f.api_spec.HTTPAuth.HTTPAuthType\"2\n\x0cHTTPAuthType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\t\n\x05\x42\x41SIC\x10\x01\x12\n\n\x06\x42\x45\x41RER\x10\x02\"\x19\n\nHTTPCookie\x12\x0b\n\x03key\x18\x01 \x01(\t\"\xe0\x01\n\x08HTTPBody\x12\x34\n\x0c\x63ontent_type\x18\x01 \x01(\x0e\x32\x1e.api_spec.HTTPBody.ContentType\x12\x12\n\nother_type\x18\x02 \x01(\t\"\x89\x01\n\x0b\x43ontentType\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x08\n\x04JSON\x10\x01\x12\x14\n\x10\x46ORM_URL_ENCODED\x10\x02\x12\x10\n\x0cOCTET_STREAM\x10\x03\x12\x07\n\x03PDF\x10\x04\x12\x0e\n\nTEXT_PLAIN\x10\x05\x12\x08\n\x04YAML\x10\x06\x12\r\n\tTEXT_HTML\x10\x07\x12\t\n\x05OTHER\x10\x08\"\x1d\n\rHTTPMultipart\x12\x0c\n\x04type\x18\x01 \x01(\t\"\x0b\n\tHTTPEmpty\"\xe3\x02\n\x08HTTPMeta\x12\"\n\x04path\x18\x01 \x01(\x0b\x32\x12.api_spec.HTTPPathH\x00\x12$\n\x05query\x18\x02 \x01(\x0b\x32\x13.api_spec.HTTPQueryH\x00\x12&\n\x06header\x18\x03 \x01(\x0b\x32\x14.api_spec.HTTPHeaderH\x00\x12&\n\x06\x63ookie\x18\x04 \x01(\x0b\x32\x14.api_spec.HTTPCookieH\x00\x12\"\n\x04\x62ody\x18\x05 \x01(\x0b\x32\x12.api_spec.HTTPBodyH\x00\x12$\n\x05\x65mpty\x18\x06 \x01(\x0b\x32\x13.api_spec.HTTPEmptyH\x00\x12\"\n\x04\x61uth\x18\x08 \x01(\x0b\x32\x12.api_spec.HTTPAuthH\x00\x12,\n\tmultipart\x18\t \x01(\x0b\x32\x17.api_spec.HTTPMultipartH\x00\x12\x15\n\rresponse_code\x18\x07 \x01(\x05\x42\n\n\x08location\"Z\n\x08\x44\x61taMeta\x12\"\n\x04grpc\x18\x01 \x01(\x0b\x32\x12.api_spec.GRPCMetaH\x00\x12\"\n\x04http\x18\x02 \x01(\x0b\x32\x12.api_spec.HTTPMetaH\x00\x42\x06\n\x04meta\"\x0e\n\x0c\x45xampleValue\"\x84\x03\n\x04\x44\x61ta\x12(\n\tprimitive\x18\x01 \x01(\x0b\x32\x13.api_spec.PrimitiveH\x00\x12\"\n\x06struct\x18\x02 \x01(\x0b\x32\x10.api_spec.StructH\x00\x12\x1e\n\x04list\x18\x03 \x01(\x0b\x32\x0e.api_spec.ListH\x00\x12&\n\x08optional\x18\x04 \x01(\x0b\x32\x12.api_spec.OptionalH\x00\x12 \n\x05oneof\x18\x06 \x01(\x0b\x32\x0f.api_spec.OneOfH\x00\x12 \n\x04meta\x18\x05 \x01(\x0b\x32\x12.api_spec.DataMeta\x12\x10\n\x08nullable\x18\x07 \x01(\x08\x12\x39\n\x0e\x65xample_values\x18\x08 \x03(\x0b\x32!.api_spec.Data.ExampleValuesEntry\x1aL\n\x12\x45xampleValuesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12%\n\x05value\x18\x02 \x01(\x0b\x32\x16.api_spec.ExampleValue:\x02\x38\x01\x42\x07\n\x05value\"=\n\x08MethodID\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x08\x61pi_type\x18\x02 \x01(\x0e\x32\x11.api_spec.ApiType\"\x10\n\x0eGRPCMethodMeta\"\xfb\x01\n\x0eHTTPMethodMeta\x12\x0e\n\x06method\x18\x01 \x01(\t\x12\x15\n\rpath_template\x18\x02 \x01(\t\x12\x0c\n\x04host\x18\x03 \x01(\t\x12\x1a\n\x12processing_latency\x18\x04 \x01(\x02\x12P\n\x0epath_param_alg\x18\x05 \x01(\x0e\x32\x38.api_spec.HTTPMethodMeta.PathParameterInferenceAlgorithm\"F\n\x1fPathParameterInferenceAlgorithm\x12\x0b\n\x07UNKNOWN\x10\x00\x12\x06\n\x02v1\x10\x01\x12\x06\n\x02v2\x10\x02\x12\x06\n\x02v3\x10\x03\"h\n\nMethodMeta\x12(\n\x04grpc\x18\x01 \x01(\x0b\x32\x18.api_spec.GRPCMethodMetaH\x00\x12(\n\x04http\x18\x02 \x01(\x0b\x32\x18.api_spec.HTTPMethodMetaH\x00\x42\x06\n\x04meta\"\xa9\x02\n\x06Method\x12\x1e\n\x02id\x18\x01 \x01(\x0b\x32\x12.api_spec.MethodID\x12(\n\x04\x61rgs\x18\x02 \x03(\x0b\x32\x1a.api_spec.Method.ArgsEntry\x12\x32\n\tresponses\x18\x03 \x03(\x0b\x32\x1f.api_spec.Method.ResponsesEntry\x12\"\n\x04meta\x18\x04 \x01(\x0b\x32\x14.api_spec.MethodMeta\x1a;\n\tArgsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\x1a@\n\x0eResponsesEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12\x1d\n\x05value\x18\x02 \x01(\x0b\x32\x0e.api_spec.Data:\x02\x38\x01\x42,Z*akitasoftware.com/superstar/pb/go/api_specb\x06proto3' , dependencies=[api__type__pb2.DESCRIPTOR,types__pb2.DESCRIPTOR,]) @@ -117,6 +117,41 @@ ) _sym_db.RegisterEnumDescriptor(_HTTPBODY_CONTENTTYPE) +_HTTPMETHODMETA_PATHPARAMETERINFERENCEALGORITHM = _descriptor.EnumDescriptor( + name='PathParameterInferenceAlgorithm', + full_name='api_spec.HTTPMethodMeta.PathParameterInferenceAlgorithm', + filename=None, + file=DESCRIPTOR, + create_key=_descriptor._internal_create_key, + values=[ + _descriptor.EnumValueDescriptor( + name='UNKNOWN', index=0, number=0, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='v1', index=1, number=1, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='v2', index=2, number=2, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + _descriptor.EnumValueDescriptor( + name='v3', index=3, number=3, + serialized_options=None, + type=None, + create_key=_descriptor._internal_create_key), + ], + containing_type=None, + serialized_options=None, + serialized_start=3334, + serialized_end=3404, +) +_sym_db.RegisterEnumDescriptor(_HTTPMETHODMETA_PATHPARAMETERINFERENCEALGORITHM) + _BOOL = _descriptor.Descriptor( name='Bool', @@ -1598,11 +1633,19 @@ message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='path_param_alg', full_name='api_spec.HTTPMethodMeta.path_param_alg', index=4, + number=5, type=14, cpp_type=8, label=1, + has_default_value=False, default_value=0, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), ], extensions=[ ], nested_types=[], enum_types=[ + _HTTPMETHODMETA_PATHPARAMETERINFERENCEALGORITHM, ], serialized_options=None, is_extendable=False, @@ -1610,8 +1653,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3152, - serialized_end=3249, + serialized_start=3153, + serialized_end=3404, ) @@ -1654,8 +1697,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=3251, - serialized_end=3355, + serialized_start=3406, + serialized_end=3510, ) @@ -1693,8 +1736,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3530, - serialized_end=3589, + serialized_start=3685, + serialized_end=3744, ) _METHOD_RESPONSESENTRY = _descriptor.Descriptor( @@ -1731,8 +1774,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3591, - serialized_end=3655, + serialized_start=3746, + serialized_end=3810, ) _METHOD = _descriptor.Descriptor( @@ -1783,8 +1826,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=3358, - serialized_end=3655, + serialized_start=3513, + serialized_end=3810, ) _BOOL.fields_by_name['type'].message_type = types__pb2._BOOLTYPE @@ -1922,6 +1965,8 @@ _DATA.fields_by_name['oneof']) _DATA.fields_by_name['oneof'].containing_oneof = _DATA.oneofs_by_name['value'] _METHODID.fields_by_name['api_type'].enum_type = api__type__pb2._APITYPE +_HTTPMETHODMETA.fields_by_name['path_param_alg'].enum_type = _HTTPMETHODMETA_PATHPARAMETERINFERENCEALGORITHM +_HTTPMETHODMETA_PATHPARAMETERINFERENCEALGORITHM.containing_type = _HTTPMETHODMETA _METHODMETA.fields_by_name['grpc'].message_type = _GRPCMETHODMETA _METHODMETA.fields_by_name['http'].message_type = _HTTPMETHODMETA _METHODMETA.oneofs_by_name['meta'].fields.append( diff --git a/ts/api_spec/api_type_pb.js b/ts/api_spec/api_type_pb.js index 4919b98..b87502d 100644 --- a/ts/api_spec/api_type_pb.js +++ b/ts/api_spec/api_type_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); goog.exportSymbol('proto.api_spec.ApiType', null, global); /** diff --git a/ts/api_spec/method_pb.d.ts b/ts/api_spec/method_pb.d.ts index e4a1a03..c092826 100644 --- a/ts/api_spec/method_pb.d.ts +++ b/ts/api_spec/method_pb.d.ts @@ -967,6 +967,8 @@ export class HTTPMethodMeta extends jspb.Message { setHost(value: string): HTTPMethodMeta; getProcessingLatency(): number; setProcessingLatency(value: number): HTTPMethodMeta; + getPathParamAlg(): HTTPMethodMeta.PathParameterInferenceAlgorithm; + setPathParamAlg(value: HTTPMethodMeta.PathParameterInferenceAlgorithm): HTTPMethodMeta; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): HTTPMethodMeta.AsObject; @@ -984,7 +986,16 @@ export namespace HTTPMethodMeta { pathTemplate: string, host: string, processingLatency: number, + pathParamAlg: HTTPMethodMeta.PathParameterInferenceAlgorithm, } + + export enum PathParameterInferenceAlgorithm { + UNKNOWN = 0, + V1 = 1, + V2 = 2, + V3 = 3, + } + } export class MethodMeta extends jspb.Message { diff --git a/ts/api_spec/method_pb.js b/ts/api_spec/method_pb.js index 85c5ef1..ee7c33b 100644 --- a/ts/api_spec/method_pb.js +++ b/ts/api_spec/method_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var api_type_pb = require('./api_type_pb.js'); goog.object.extend(proto, api_type_pb); @@ -46,6 +46,7 @@ goog.exportSymbol('proto.api_spec.HTTPHeader', null, global); goog.exportSymbol('proto.api_spec.HTTPMeta', null, global); goog.exportSymbol('proto.api_spec.HTTPMeta.LocationCase', null, global); goog.exportSymbol('proto.api_spec.HTTPMethodMeta', null, global); +goog.exportSymbol('proto.api_spec.HTTPMethodMeta.PathParameterInferenceAlgorithm', null, global); goog.exportSymbol('proto.api_spec.HTTPMultipart', null, global); goog.exportSymbol('proto.api_spec.HTTPPath', null, global); goog.exportSymbol('proto.api_spec.HTTPQuery', null, global); @@ -3179,7 +3180,8 @@ proto.api_spec.Primitive.prototype.getFormatsMap = function(opt_noLazyCreate) { */ proto.api_spec.Primitive.prototype.clearFormatsMap = function() { this.getFormatsMap().clear(); - return this;}; + return this; +}; /** @@ -3504,7 +3506,8 @@ proto.api_spec.Struct.prototype.getFieldsMap = function(opt_noLazyCreate) { */ proto.api_spec.Struct.prototype.clearFieldsMap = function() { this.getFieldsMap().clear(); - return this;}; + return this; +}; /** @@ -4217,7 +4220,8 @@ proto.api_spec.OneOf.prototype.getOptionsMap = function(opt_noLazyCreate) { */ proto.api_spec.OneOf.prototype.clearOptionsMap = function() { this.getOptionsMap().clear(); - return this;}; + return this; +}; /** @@ -6798,7 +6802,8 @@ proto.api_spec.Data.prototype.getExampleValuesMap = function(opt_noLazyCreate) { */ proto.api_spec.Data.prototype.clearExampleValuesMap = function() { this.getExampleValuesMap().clear(); - return this;}; + return this; +}; @@ -7097,7 +7102,8 @@ proto.api_spec.HTTPMethodMeta.toObject = function(includeInstance, msg) { method: jspb.Message.getFieldWithDefault(msg, 1, ""), pathTemplate: jspb.Message.getFieldWithDefault(msg, 2, ""), host: jspb.Message.getFieldWithDefault(msg, 3, ""), - processingLatency: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0) + processingLatency: jspb.Message.getFloatingPointFieldWithDefault(msg, 4, 0.0), + pathParamAlg: jspb.Message.getFieldWithDefault(msg, 5, 0) }; if (includeInstance) { @@ -7150,6 +7156,10 @@ proto.api_spec.HTTPMethodMeta.deserializeBinaryFromReader = function(msg, reader var value = /** @type {number} */ (reader.readFloat()); msg.setProcessingLatency(value); break; + case 5: + var value = /** @type {!proto.api_spec.HTTPMethodMeta.PathParameterInferenceAlgorithm} */ (reader.readEnum()); + msg.setPathParamAlg(value); + break; default: reader.skipField(); break; @@ -7207,9 +7217,26 @@ proto.api_spec.HTTPMethodMeta.serializeBinaryToWriter = function(message, writer f ); } + f = message.getPathParamAlg(); + if (f !== 0.0) { + writer.writeEnum( + 5, + f + ); + } }; +/** + * @enum {number} + */ +proto.api_spec.HTTPMethodMeta.PathParameterInferenceAlgorithm = { + UNKNOWN: 0, + V1: 1, + V2: 2, + V3: 3 +}; + /** * optional string method = 1; * @return {string} @@ -7282,6 +7309,24 @@ proto.api_spec.HTTPMethodMeta.prototype.setProcessingLatency = function(value) { }; +/** + * optional PathParameterInferenceAlgorithm path_param_alg = 5; + * @return {!proto.api_spec.HTTPMethodMeta.PathParameterInferenceAlgorithm} + */ +proto.api_spec.HTTPMethodMeta.prototype.getPathParamAlg = function() { + return /** @type {!proto.api_spec.HTTPMethodMeta.PathParameterInferenceAlgorithm} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {!proto.api_spec.HTTPMethodMeta.PathParameterInferenceAlgorithm} value + * @return {!proto.api_spec.HTTPMethodMeta} returns this + */ +proto.api_spec.HTTPMethodMeta.prototype.setPathParamAlg = function(value) { + return jspb.Message.setProto3EnumField(this, 5, value); +}; + + /** * Oneof group definitions for this message. Each group defines the field @@ -7716,7 +7761,8 @@ proto.api_spec.Method.prototype.getArgsMap = function(opt_noLazyCreate) { */ proto.api_spec.Method.prototype.clearArgsMap = function() { this.getArgsMap().clear(); - return this;}; + return this; +}; /** @@ -7738,7 +7784,8 @@ proto.api_spec.Method.prototype.getResponsesMap = function(opt_noLazyCreate) { */ proto.api_spec.Method.prototype.clearResponsesMap = function() { this.getResponsesMap().clear(); - return this;}; + return this; +}; /** diff --git a/ts/api_spec/sequence_pb.js b/ts/api_spec/sequence_pb.js index 0500a62..faa75cb 100644 --- a/ts/api_spec/sequence_pb.js +++ b/ts/api_spec/sequence_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var method_pb = require('./method_pb.js'); goog.object.extend(proto, method_pb); @@ -2714,7 +2714,8 @@ proto.api_spec.StructTemplate.prototype.getFieldTemplatesMap = function(opt_noLa */ proto.api_spec.StructTemplate.prototype.clearFieldTemplatesMap = function() { this.getFieldTemplatesMap().clear(); - return this;}; + return this; +}; @@ -3699,7 +3700,8 @@ proto.api_spec.MethodTemplate.prototype.getArgTemplatesMap = function(opt_noLazy */ proto.api_spec.MethodTemplate.prototype.clearArgTemplatesMap = function() { this.getArgTemplatesMap().clear(); - return this;}; + return this; +}; /** @@ -3721,7 +3723,8 @@ proto.api_spec.MethodTemplate.prototype.getResponsesMap = function(opt_noLazyCre */ proto.api_spec.MethodTemplate.prototype.clearResponsesMap = function() { this.getResponsesMap().clear(); - return this;}; + return this; +}; /** diff --git a/ts/api_spec/spec_pb.js b/ts/api_spec/spec_pb.js index 0eaf077..9bb0ef6 100644 --- a/ts/api_spec/spec_pb.js +++ b/ts/api_spec/spec_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var method_pb = require('./method_pb.js'); goog.object.extend(proto, method_pb); @@ -257,7 +257,8 @@ proto.api_spec.APISpec.prototype.getTagsMap = function(opt_noLazyCreate) { */ proto.api_spec.APISpec.prototype.clearTagsMap = function() { this.getTagsMap().clear(); - return this;}; + return this; +}; diff --git a/ts/api_spec/types_pb.js b/ts/api_spec/types_pb.js index c8abebc..227a7db 100644 --- a/ts/api_spec/types_pb.js +++ b/ts/api_spec/types_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.object.extend(proto, google_protobuf_wrappers_pb); diff --git a/ts/api_spec/witness_pb.js b/ts/api_spec/witness_pb.js index c5d4742..4810a9f 100644 --- a/ts/api_spec/witness_pb.js +++ b/ts/api_spec/witness_pb.js @@ -13,13 +13,13 @@ var jspb = require('google-protobuf'); var goog = jspb; -var global = (function() { - if (this) { return this; } - if (typeof window !== 'undefined') { return window; } - if (typeof global !== 'undefined') { return global; } - if (typeof self !== 'undefined') { return self; } - return Function('return this')(); -}.call(null)); +var global = + (typeof globalThis !== 'undefined' && globalThis) || + (typeof window !== 'undefined' && window) || + (typeof global !== 'undefined' && global) || + (typeof self !== 'undefined' && self) || + (function () { return this; }).call(null) || + Function('return this')(); var method_pb = require('./method_pb.js'); goog.object.extend(proto, method_pb);