diff --git a/examples/clients/abe/examplepb_a_bit_of_everything.go b/examples/clients/abe/examplepb_a_bit_of_everything.go index a64597c7f47..a20c5c0db30 100644 --- a/examples/clients/abe/examplepb_a_bit_of_everything.go +++ b/examples/clients/abe/examplepb_a_bit_of_everything.go @@ -19,7 +19,7 @@ type ExamplepbABitOfEverything struct { SingleNested ABitOfEverythingNested `json:"single_nested,omitempty"` - Uuid string `json:"uuid,omitempty"` + Uuid string `json:"uuid"` Nested []ABitOfEverythingNested `json:"nested,omitempty"` diff --git a/examples/proto/examplepb/a_bit_of_everything.pb.go b/examples/proto/examplepb/a_bit_of_everything.pb.go index da41accc08d..58b4581ae25 100644 --- a/examples/proto/examplepb/a_bit_of_everything.pb.go +++ b/examples/proto/examplepb/a_bit_of_everything.pb.go @@ -53,7 +53,7 @@ func (x NumericEnum) String() string { return proto.EnumName(NumericEnum_name, int32(x)) } func (NumericEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_a70f672d918531b9, []int{0} + return fileDescriptor_a_bit_of_everything_ffe735e4b57f3795, []int{0} } // DeepEnum is one or zero. @@ -79,7 +79,7 @@ func (x ABitOfEverything_Nested_DeepEnum) String() string { return proto.EnumName(ABitOfEverything_Nested_DeepEnum_name, int32(x)) } func (ABitOfEverything_Nested_DeepEnum) EnumDescriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_a70f672d918531b9, []int{0, 0, 0} + return fileDescriptor_a_bit_of_everything_ffe735e4b57f3795, []int{0, 0, 0} } // Intentionaly complicated message type to cover many features of Protobuf. @@ -125,7 +125,7 @@ func (m *ABitOfEverything) Reset() { *m = ABitOfEverything{} } func (m *ABitOfEverything) String() string { return proto.CompactTextString(m) } func (*ABitOfEverything) ProtoMessage() {} func (*ABitOfEverything) Descriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_a70f672d918531b9, []int{0} + return fileDescriptor_a_bit_of_everything_ffe735e4b57f3795, []int{0} } func (m *ABitOfEverything) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ABitOfEverything.Unmarshal(m, b) @@ -449,7 +449,7 @@ func (m *ABitOfEverything_Nested) Reset() { *m = ABitOfEverything_Nested func (m *ABitOfEverything_Nested) String() string { return proto.CompactTextString(m) } func (*ABitOfEverything_Nested) ProtoMessage() {} func (*ABitOfEverything_Nested) Descriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_a70f672d918531b9, []int{0, 0} + return fileDescriptor_a_bit_of_everything_ffe735e4b57f3795, []int{0, 0} } func (m *ABitOfEverything_Nested) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_ABitOfEverything_Nested.Unmarshal(m, b) @@ -501,7 +501,7 @@ func (m *Body) Reset() { *m = Body{} } func (m *Body) String() string { return proto.CompactTextString(m) } func (*Body) ProtoMessage() {} func (*Body) Descriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_a70f672d918531b9, []int{1} + return fileDescriptor_a_bit_of_everything_ffe735e4b57f3795, []int{1} } func (m *Body) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_Body.Unmarshal(m, b) @@ -540,7 +540,7 @@ func (m *MessageWithBody) Reset() { *m = MessageWithBody{} } func (m *MessageWithBody) String() string { return proto.CompactTextString(m) } func (*MessageWithBody) ProtoMessage() {} func (*MessageWithBody) Descriptor() ([]byte, []int) { - return fileDescriptor_a_bit_of_everything_a70f672d918531b9, []int{2} + return fileDescriptor_a_bit_of_everything_ffe735e4b57f3795, []int{2} } func (m *MessageWithBody) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_MessageWithBody.Unmarshal(m, b) @@ -1203,148 +1203,151 @@ var _AnotherServiceWithNoBindings_serviceDesc = grpc.ServiceDesc{ } func init() { - proto.RegisterFile("examples/proto/examplepb/a_bit_of_everything.proto", fileDescriptor_a_bit_of_everything_a70f672d918531b9) -} - -var fileDescriptor_a_bit_of_everything_a70f672d918531b9 = []byte{ - // 2222 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcb, 0x73, 0x1b, 0x49, - 0x19, 0xf7, 0x48, 0xb6, 0x62, 0x7f, 0x7e, 0xc9, 0xed, 0x3c, 0x1c, 0xc5, 0x59, 0x77, 0x94, 0x2c, - 0xab, 0x78, 0xe3, 0x99, 0x44, 0x31, 0x5b, 0x89, 0x29, 0x08, 0xb2, 0xad, 0x4d, 0xbc, 0xd9, 0x38, - 0xce, 0x24, 0x1b, 0x52, 0xa9, 0x2c, 0xa6, 0x35, 0xd3, 0x96, 0x26, 0xd1, 0x4c, 0x0f, 0xd3, 0x3d, - 0xb6, 0x85, 0x31, 0x14, 0x50, 0x05, 0x45, 0x71, 0xa0, 0xca, 0xdc, 0x38, 0xec, 0x01, 0xaa, 0x28, - 0x2e, 0x1c, 0x38, 0x70, 0x81, 0x2a, 0x38, 0x71, 0xda, 0x23, 0x55, 0x1c, 0xb8, 0xc2, 0x81, 0x3f, - 0x83, 0xea, 0x9e, 0x19, 0x79, 0x24, 0x5b, 0x38, 0x4a, 0xb6, 0xf6, 0x62, 0x4f, 0x77, 0xff, 0xbe, - 0xf7, 0xa3, 0xbf, 0x16, 0x94, 0xe9, 0x2e, 0x71, 0xfd, 0x26, 0xe5, 0x86, 0x1f, 0x30, 0xc1, 0x8c, - 0x78, 0xe9, 0xd7, 0x0c, 0xb2, 0x59, 0x73, 0xc4, 0x26, 0xdb, 0xda, 0xa4, 0xdb, 0x34, 0x68, 0x89, - 0x86, 0xe3, 0xd5, 0x75, 0x85, 0x41, 0x73, 0xf5, 0xc0, 0xb7, 0xf4, 0x3a, 0x11, 0x74, 0x87, 0xb4, - 0xf4, 0x84, 0x81, 0xde, 0x26, 0x2d, 0xcc, 0xd6, 0x19, 0xab, 0x37, 0xa9, 0x41, 0x7c, 0xc7, 0x20, - 0x9e, 0xc7, 0x04, 0x11, 0x0e, 0xf3, 0x78, 0x44, 0x5e, 0xb8, 0x10, 0x9f, 0xaa, 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, 0x73, 0x30, 0xea, 0x78, 0xe2, 0x83, 0xc5, 0x18, 0x31, 0x84, 0xb5, 0x52, 0xd6, 0x04, - 0xb5, 0xd5, 0xe6, 0x11, 0xa6, 0x11, 0x39, 0xac, 0x95, 0x06, 0xcd, 0xd1, 0x30, 0x05, 0x89, 0x78, - 0xdc, 0x2c, 0xc7, 0x88, 0x53, 0x58, 0x2b, 0x0d, 0x29, 0x1e, 0x37, 0xcb, 0x11, 0xe0, 0x32, 0x8c, - 0x6f, 0x39, 0xbb, 0xd4, 0x6e, 0x33, 0x19, 0xc6, 0x5a, 0x29, 0x67, 0x8e, 0xc5, 0x9b, 0x9d, 0xa0, - 0x36, 0x9f, 0x11, 0xac, 0x95, 0x4e, 0xc5, 0xa0, 0x84, 0xd3, 0x45, 0x80, 0x1a, 0x63, 0xcd, 0x18, - 0x01, 0x58, 0x2b, 0x0d, 0x9b, 0x23, 0x72, 0xa7, 0xad, 0x2c, 0x17, 0x81, 0xe3, 0xd5, 0x63, 0xc0, - 0xa8, 0xf2, 0xff, 0x68, 0xb4, 0xd7, 0x56, 0xb6, 0xd6, 0x12, 0x94, 0xc7, 0x88, 0x8b, 0x58, 0x2b, - 0x8d, 0x99, 0xa0, 0xb6, 0x3a, 0x0c, 0x6e, 0xab, 0x31, 0x8e, 0xb5, 0xd2, 0x78, 0x64, 0x70, 0xa2, - 0xc5, 0x7d, 0x00, 0xea, 0x85, 0x6e, 0x0c, 0x98, 0xc0, 0x5a, 0x69, 0xa2, 0x7c, 0xed, 0xc4, 0x70, - 0xae, 0x87, 0x2e, 0x0d, 0x1c, 0xab, 0xea, 0x85, 0xae, 0x39, 0x22, 0xe9, 0x23, 0x66, 0xef, 0xc2, - 0x04, 0xef, 0x34, 0x7c, 0x12, 0x6b, 0xa5, 0x49, 0x73, 0x9c, 0x77, 0x58, 0xde, 0x86, 0xb5, 0x9d, - 0x98, 0xc7, 0x5a, 0x29, 0x9f, 0xc0, 0x52, 0xe1, 0xe2, 0x69, 0xed, 0xa7, 0xb0, 0x56, 0x9a, 0x32, - 0x47, 0x79, 0x4a, 0xfb, 0x18, 0xd2, 0xe6, 0x83, 0xb0, 0x56, 0x42, 0x11, 0x24, 0xe1, 0x52, 0x86, - 0x33, 0x01, 0xf5, 0x29, 0x11, 0xd4, 0xde, 0xec, 0x70, 0xe8, 0x34, 0xce, 0x96, 0x46, 0xcc, 0xe9, - 0xe4, 0xf0, 0x71, 0xca, 0xb1, 0xb7, 0x61, 0x94, 0x79, 0x54, 0x76, 0x24, 0xd9, 0x30, 0x66, 0x4e, - 0xab, 0x82, 0x3a, 0xab, 0x47, 0xc5, 0xac, 0x27, 0xc5, 0xac, 0x57, 0xe5, 0xe9, 0xbd, 0x01, 0x13, - 0x14, 0x58, 0xad, 0xd0, 0x65, 0x18, 0x8b, 0x48, 0x23, 0x59, 0x33, 0x67, 0x64, 0xd8, 0xee, 0x0d, - 0x98, 0x11, 0xc3, 0x48, 0x08, 0x7a, 0x01, 0x23, 0x2e, 0xf1, 0x63, 0x3d, 0xce, 0xaa, 0x12, 0xba, - 0xd3, 0x7f, 0x09, 0x3d, 0x20, 0xbe, 0x52, 0xb7, 0xea, 0x89, 0xa0, 0x65, 0x0e, 0xbb, 0xf1, 0x12, - 0xed, 0xc2, 0xb4, 0x4b, 0x7c, 0xbf, 0xdb, 0xde, 0x73, 0x4a, 0xce, 0xbd, 0x37, 0x92, 0xe3, 0x77, - 0xf8, 0x27, 0x12, 0x38, 0xe5, 0x76, 0xef, 0xa7, 0x24, 0x47, 0x65, 0x1d, 0x4b, 0x9e, 0x79, 0x3b, - 0xc9, 0x51, 0xab, 0x38, 0x2a, 0x39, 0xb5, 0x8f, 0x96, 0x60, 0xc6, 0x63, 0xde, 0x0a, 0xf3, 0xb6, - 0xa9, 0x27, 0x3b, 0x26, 0x69, 0xae, 0x13, 0x37, 0xea, 0x0b, 0x33, 0x05, 0x55, 0x39, 0x3d, 0xcf, - 0xd1, 0x0a, 0x4c, 0xb6, 0xdb,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7c, 0xbf, 0xb9, 0xfe, 0x7c, 0xa4, 0x1d, 0xb9, 0x5a, 0x4e, 0x95, 0xdb, 0xcd, - 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x8d, 0xfc, 0xf9, 0xc9, 0xea, 0x18, 0x00, 0x00, + proto.RegisterFile("examples/proto/examplepb/a_bit_of_everything.proto", fileDescriptor_a_bit_of_everything_ffe735e4b57f3795) +} + +var fileDescriptor_a_bit_of_everything_ffe735e4b57f3795 = []byte{ + // 2265 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xbc, 0x58, 0xcd, 0x73, 0x1b, 0x49, + 0xd9, 0xf7, 0x48, 0xb2, 0x62, 0x3f, 0xfe, 0x92, 0xdb, 0xd9, 0xc4, 0xd1, 0x7a, 0xd7, 0x1d, 0x6d, + 0xf6, 0x5d, 0xad, 0x77, 0x35, 0x63, 0x2b, 0x7e, 0xb7, 0x12, 0x53, 0xb0, 0xc8, 0xb6, 0x36, 0xf1, + 0x66, 0xe3, 0x38, 0x93, 0x6c, 0x48, 0x85, 0x04, 0x57, 0x4b, 0xd3, 0x92, 0x26, 0xd1, 0x4c, 0x0f, + 0xd3, 0x3d, 0xb6, 0x85, 0x31, 0x14, 0x50, 0x05, 0x05, 0x1c, 0xa8, 0x32, 0x37, 0x0e, 0x7b, 0xa1, + 0x8a, 0xe2, 0xc2, 0x81, 0x03, 0x27, 0x0e, 0x14, 0x87, 0x3d, 0xed, 0x0d, 0xaa, 0x38, 0x70, 0x85, + 0x03, 0x7f, 0x04, 0x07, 0xaa, 0x7b, 0x66, 0x94, 0x91, 0x6c, 0xe1, 0x28, 0xa1, 0xf6, 0x62, 0x4f, + 0x77, 0xff, 0x9e, 0xef, 0x8f, 0x7e, 0x5a, 0x50, 0xa6, 0x07, 0xc4, 0xf1, 0xda, 0x94, 0x1b, 0x9e, + 0xcf, 0x04, 0x33, 0xa2, 0xa5, 0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, + 0x11, 0x60, 0x42, 0x86, 0xd4, 0x9c, 0x08, 0xf7, 0xba, 0xca, 0xd6, 0x3a, 0x82, 0xf2, 0x08, 0xf1, + 0x06, 0xd6, 0x8a, 0x93, 0x26, 0xa8, 0xad, 0x1e, 0x83, 0xbb, 0x6a, 0x4c, 0x61, 0xad, 0x38, 0x15, + 0x1a, 0x1c, 0x6b, 0x71, 0x0b, 0x80, 0xba, 0x81, 0x13, 0x01, 0xa6, 0xb1, 0x56, 0x9c, 0x2e, 0xbf, + 0x7f, 0x66, 0x38, 0xb7, 0x03, 0x87, 0xfa, 0x76, 0xbd, 0xea, 0x06, 0x8e, 0x39, 0x2e, 0xe9, 0x43, + 0x66, 0x6f, 0xc3, 0x34, 0xef, 0x35, 0x7c, 0x06, 0x6b, 0xc5, 0x19, 0x73, 0x8a, 0xf7, 0x58, 0xde, + 0x85, 0x75, 0x9d, 0x98, 0xc3, 0x5a, 0x31, 0x17, 0xc3, 0x12, 0xe1, 0xe2, 0x49, 0xed, 0x67, 0xb1, + 0x56, 0x9c, 0x35, 0x27, 0x78, 0x42, 0xfb, 0x08, 0xd2, 0xe5, 0x83, 0xb0, 0x56, 0x44, 0x21, 0x24, + 0xe6, 0x52, 0x86, 0xd7, 0x7c, 0xea, 0x51, 0x22, 0xa8, 0xb5, 0xdb, 0xe3, 0xd0, 0x39, 0x9c, 0x2e, + 0x8e, 0x9b, 0x73, 0xf1, 0xe1, 0xbd, 0x84, 0x63, 0xaf, 0xc3, 0x04, 0x73, 0xa9, 0x6c, 0x72, 0xb2, + 0x07, 0xcd, 0x9f, 0x57, 0x35, 0x7a, 0x41, 0x0f, 0xfb, 0x83, 0x1e, 0xf7, 0x07, 0xbd, 0x2a, 0x4f, + 0x6f, 0x8e, 0x98, 0xa0, 0xc0, 0x6a, 0x85, 0xde, 0x82, 0xc9, 0x90, 0x34, 0x94, 0x35, 0xff, 0x9a, + 0x0c, 0xdb, 0xcd, 0x11, 0x33, 0x64, 0x18, 0x0a, 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0xc5, 0xd1, 0x4b, 0x04, 0xc4, 0x60, 0x24, 0x10, 0x2d, 0x43, 0xfe, + 0x61, 0xbe, 0xfd, 0x1d, 0xba, 0xb6, 0x38, 0x18, 0x24, 0xd8, 0x33, 0xea, 0xae, 0x7f, 0x1f, 0xf2, + 0xe1, 0x04, 0x86, 0xd0, 0x0d, 0x9f, 0xb8, 0x82, 0x63, 0xb9, 0x88, 0xbc, 0x07, 0x0b, 0xd1, 0x5c, + 0x86, 0xe6, 0xa2, 0x43, 0xb5, 0x8a, 0x4f, 0x37, 0x60, 0x94, 0x58, 0x8e, 0xed, 0xa2, 0xb5, 0x1e, + 0x52, 0xd7, 0xea, 0x81, 0xa9, 0x60, 0x48, 0x98, 0xcd, 0x85, 0xbc, 0x28, 0xf6, 0x28, 0xb6, 0xdd, + 0x06, 0xf3, 0x1d, 0x15, 0xef, 0xda, 0x22, 0x4c, 0x25, 0x5d, 0x31, 0xd2, 0x3f, 0x2b, 0xd6, 0xde, + 0x1d, 0x38, 0x2d, 0xf6, 0x43, 0xfd, 0x2d, 0xb8, 0x78, 0xfb, 0x79, 0x73, 0x48, 0xe6, 0xfc, 0xb0, + 0xb9, 0xfe, 0x68, 0xbc, 0x1b, 0xb9, 0x5a, 0x56, 0x95, 0xdb, 0xd5, 0xff, 0x04, 0x00, 0x00, 0xff, + 0xff, 0xd3, 0xfa, 0x70, 0x7c, 0x44, 0x19, 0x00, 0x00, } diff --git a/examples/proto/examplepb/a_bit_of_everything.proto b/examples/proto/examplepb/a_bit_of_everything.proto index 94fe07214e3..3ee84c9bf0b 100644 --- a/examples/proto/examplepb/a_bit_of_everything.proto +++ b/examples/proto/examplepb/a_bit_of_everything.proto @@ -132,6 +132,7 @@ message ABitOfEverything { json_schema: { title: "A bit of everything" description: "Intentionaly complicated message type to cover many features of Protobuf." + required: ["uuid"] } external_docs: { url: "https://github.com/grpc-ecosystem/grpc-gateway"; @@ -155,7 +156,7 @@ message ABitOfEverything { } Nested single_nested = 25; - string uuid = 1; + string uuid = 1 [(grpc.gateway.protoc_gen_swagger.options.openapiv2_field) = {pattern: "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}"}]; repeated Nested nested = 2; float float_value = 3; double double_value = 4; diff --git a/examples/proto/examplepb/a_bit_of_everything.swagger.json b/examples/proto/examplepb/a_bit_of_everything.swagger.json index babfb987a8e..0968e2d4de6 100644 --- a/examples/proto/examplepb/a_bit_of_everything.swagger.json +++ b/examples/proto/examplepb/a_bit_of_everything.swagger.json @@ -1001,7 +1001,8 @@ "$ref": "#/definitions/ABitOfEverythingNested" }, "uuid": { - "type": "string" + "type": "string", + "pattern": "[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}" }, "nested": { "type": "array", @@ -1121,7 +1122,10 @@ "externalDocs": { "description": "Find out more about ABitOfEverything", "url": "https://github.com/grpc-ecosystem/grpc-gateway" - } + }, + "required": [ + "uuid" + ] }, "examplepbBody": { "type": "object", diff --git a/protoc-gen-swagger/genswagger/template.go b/protoc-gen-swagger/genswagger/template.go index 3489736abd3..005a3474f61 100644 --- a/protoc-gen-swagger/genswagger/template.go +++ b/protoc-gen-swagger/genswagger/template.go @@ -251,6 +251,20 @@ func renderMessagesAsDefinition(messages messageMap, d swaggerDefinitionsObject, // Warning: Make sure not to overwrite any fields already set on the schema type. schema.ExternalDocs = protoSchema.ExternalDocs + schema.MultipleOf = protoSchema.MultipleOf + schema.Maximum = protoSchema.Maximum + schema.ExclusiveMaximum = protoSchema.ExclusiveMaximum + schema.Minimum = protoSchema.Minimum + schema.ExclusiveMinimum = protoSchema.ExclusiveMinimum + schema.MaxLength = protoSchema.MaxLength + schema.MinLength = protoSchema.MinLength + schema.Pattern = protoSchema.Pattern + schema.MaxItems = protoSchema.MaxItems + schema.MinItems = protoSchema.MinItems + schema.UniqueItems = protoSchema.UniqueItems + schema.MaxProperties = protoSchema.MaxProperties + schema.MinProperties = protoSchema.MinProperties + schema.Required = protoSchema.Required if protoSchema.schemaCore.Type != "" || protoSchema.schemaCore.Ref != "" { schema.schemaCore = protoSchema.schemaCore } @@ -318,6 +332,7 @@ func schemaOfField(f *descriptor.Field, reg *descriptor.Registry, refs refMap) s core = schemaCore{Type: ft.String(), Format: "UNKNOWN"} } } + switch aggregate { case array: return swaggerSchemaObject{ @@ -334,7 +349,13 @@ func schemaOfField(f *descriptor.Field, reg *descriptor.Registry, refs refMap) s AdditionalProperties: &swaggerSchemaObject{schemaCore: core}, } default: - return swaggerSchemaObject{schemaCore: core} + ret := swaggerSchemaObject{ + schemaCore: core, + } + if j, err := extractJSONSchemaFromFieldDescriptor(fd); err == nil { + updateSwaggerObjectFromJSONSchema(&ret, j) + } + return ret } } @@ -1263,28 +1284,73 @@ func extractSwaggerOptionFromFileDescriptor(file *pbdescriptor.FileDescriptorPro return opts, nil } -func swaggerSchemaFromProtoSchema(s *swagger_options.Schema, reg *descriptor.Registry, refs refMap) swaggerSchemaObject { - ret := swaggerSchemaObject{ - ExternalDocs: protoExternalDocumentationToSwaggerExternalDocumentation(s.GetExternalDocs()), - Title: s.GetJsonSchema().GetTitle(), - Description: s.GetJsonSchema().GetDescription(), - // TODO(johanbrandhorst): Add more fields? +func extractJSONSchemaFromFieldDescriptor(fd *pbdescriptor.FieldDescriptorProto) (*swagger_options.JSONSchema, error) { + if fd.Options == nil { + return nil, nil } - if s.GetJsonSchema().GetRef() != "" { - swaggerName := fullyQualifiedNameToSwaggerName(s.GetJsonSchema().GetRef(), reg) + if !proto.HasExtension(fd.Options, swagger_options.E_Openapiv2Field) { + return nil, nil + } + ext, err := proto.GetExtension(fd.Options, swagger_options.E_Openapiv2Field) + if err != nil { + return nil, err + } + opts, ok := ext.(*swagger_options.JSONSchema) + if !ok { + return nil, fmt.Errorf("extension is %T; want a JSONSchema object", ext) + } + return opts, nil +} + +func protoJSONSchemaToSwaggerSchemaCore(j *swagger_options.JSONSchema, reg *descriptor.Registry, refs refMap) schemaCore { + ret := schemaCore{} + + if j.GetRef() != "" { + swaggerName := fullyQualifiedNameToSwaggerName(j.GetRef(), reg) if swaggerName != "" { - ret.schemaCore.Ref = "#/definitions/" + swaggerName + ret.Ref = "#/definitions/" + swaggerName if refs != nil { - refs[s.GetJsonSchema().GetRef()] = struct{}{} + refs[j.GetRef()] = struct{}{} } } else { - ret.schemaCore.Ref += s.GetJsonSchema().GetRef() + ret.Ref += j.GetRef() } } else { - f, t := protoJSONSchemaTypeToFormat(s.GetJsonSchema().GetType()) - ret.schemaCore.Format = f - ret.schemaCore.Type = t + f, t := protoJSONSchemaTypeToFormat(j.GetType()) + ret.Format = f + ret.Type = t } + + return ret +} + +func updateSwaggerObjectFromJSONSchema(s *swaggerSchemaObject, j *swagger_options.JSONSchema) { + s.Title = j.GetTitle() + s.Description = j.GetDescription() + s.MultipleOf = j.GetMultipleOf() + s.Maximum = j.GetMaximum() + s.ExclusiveMaximum = j.GetExclusiveMaximum() + s.Minimum = j.GetMinimum() + s.ExclusiveMinimum = j.GetExclusiveMinimum() + s.MaxLength = j.GetMaxLength() + s.MinLength = j.GetMinLength() + s.Pattern = j.GetPattern() + s.MaxItems = j.GetMaxItems() + s.MinItems = j.GetMinItems() + s.UniqueItems = j.GetUniqueItems() + s.MaxProperties = j.GetMaxProperties() + s.MinProperties = j.GetMinProperties() + s.Required = j.GetRequired() +} + +func swaggerSchemaFromProtoSchema(s *swagger_options.Schema, reg *descriptor.Registry, refs refMap) swaggerSchemaObject { + ret := swaggerSchemaObject{ + ExternalDocs: protoExternalDocumentationToSwaggerExternalDocumentation(s.GetExternalDocs()), + } + + ret.schemaCore = protoJSONSchemaToSwaggerSchemaCore(s.GetJsonSchema(), reg, refs) + updateSwaggerObjectFromJSONSchema(&ret, s.GetJsonSchema()) + return ret } diff --git a/protoc-gen-swagger/genswagger/types.go b/protoc-gen-swagger/genswagger/types.go index 4a68a254a6b..d34e0bbf270 100644 --- a/protoc-gen-swagger/genswagger/types.go +++ b/protoc-gen-swagger/genswagger/types.go @@ -204,6 +204,21 @@ type swaggerSchemaObject struct { Title string `json:"title,omitempty"` ExternalDocs *swaggerExternalDocumentationObject `json:"externalDocs,omitempty"` + + MultipleOf float64 `json:"multiple_of,omitempty"` + Maximum float64 `json:"maximum,omitempty"` + ExclusiveMaximum bool `json:"exclusive_maximum,omitempty"` + Minimum float64 `json:"minimum,omitempty"` + ExclusiveMinimum bool `json:"exclusive_minimum,omitempty"` + MaxLength uint64 `json:"max_length,omitempty"` + MinLength uint64 `json:"min_length,omitempty"` + Pattern string `json:"pattern,omitempty"` + MaxItems uint64 `json:"max_items,omitempty"` + MinItems uint64 `json:"min_items,omitempty"` + UniqueItems bool `json:"unique_items,omitempty"` + MaxProperties uint64 `json:"max_properties,omitempty"` + MinProperties uint64 `json:"min_properties,omitempty"` + Required []string `json:"required,omitempty"` } // http://swagger.io/specification/#referenceObject diff --git a/protoc-gen-swagger/options/annotations.pb.go b/protoc-gen-swagger/options/annotations.pb.go index b8fffb69a0e..a743078b45c 100644 --- a/protoc-gen-swagger/options/annotations.pb.go +++ b/protoc-gen-swagger/options/annotations.pb.go @@ -55,37 +55,49 @@ var E_Openapiv2Tag = &proto.ExtensionDesc{ Filename: "protoc-gen-swagger/options/annotations.proto", } +var E_Openapiv2Field = &proto.ExtensionDesc{ + ExtendedType: (*descriptor.FieldOptions)(nil), + ExtensionType: (*JSONSchema)(nil), + Field: 1042, + Name: "grpc.gateway.protoc_gen_swagger.options.openapiv2_field", + Tag: "bytes,1042,opt,name=openapiv2_field,json=openapiv2Field", + Filename: "protoc-gen-swagger/options/annotations.proto", +} + func init() { proto.RegisterExtension(E_Openapiv2Swagger) proto.RegisterExtension(E_Openapiv2Operation) proto.RegisterExtension(E_Openapiv2Schema) proto.RegisterExtension(E_Openapiv2Tag) + proto.RegisterExtension(E_Openapiv2Field) } func init() { - proto.RegisterFile("protoc-gen-swagger/options/annotations.proto", fileDescriptor_annotations_a3ffb1266b13d7a2) + proto.RegisterFile("protoc-gen-swagger/options/annotations.proto", fileDescriptor_annotations_24d91a1b8877b604) } -var fileDescriptor_annotations_a3ffb1266b13d7a2 = []byte{ - // 311 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x41, 0x4b, 0x03, 0x31, - 0x10, 0x85, 0xe9, 0x45, 0x64, 0x55, 0xac, 0xeb, 0x45, 0x8a, 0x68, 0x6f, 0x8a, 0xb4, 0x89, 0xd4, - 0xdb, 0xde, 0x54, 0xf0, 0x26, 0x85, 0x6d, 0x4f, 0x5e, 0x4a, 0x9a, 0x8e, 0xd3, 0x40, 0x9b, 0x09, - 0x49, 0xda, 0x52, 0xe8, 0xd1, 0x5f, 0xe0, 0x2f, 0x16, 0x93, 0xed, 0x56, 0xd6, 0x2a, 0x7b, 0xdb, - 0x99, 0x9d, 0xf7, 0xbe, 0xc7, 0x23, 0x49, 0xc7, 0x58, 0xf2, 0x24, 0xbb, 0x08, 0xba, 0xeb, 0x56, - 0x02, 0x11, 0x2c, 0x27, 0xe3, 0x15, 0x69, 0xc7, 0x85, 0xd6, 0xe4, 0x45, 0xf8, 0x66, 0xe1, 0x2c, - 0xbd, 0x41, 0x6b, 0x24, 0x43, 0xe1, 0x61, 0x25, 0xd6, 0x71, 0x27, 0x47, 0x08, 0x7a, 0x54, 0x48, - 0x59, 0x21, 0x6d, 0xdd, 0xfd, 0x63, 0x4b, 0x06, 0xb4, 0x30, 0x6a, 0xd9, 0x8b, 0x06, 0xad, 0x36, - 0x12, 0xe1, 0x0c, 0x78, 0x98, 0xc6, 0x8b, 0x77, 0x3e, 0x01, 0x27, 0xad, 0x32, 0x9e, 0x6c, 0xbc, - 0xc8, 0x36, 0xc9, 0x59, 0x29, 0xda, 0xa2, 0xd2, 0x4b, 0x16, 0x75, 0x6c, 0xab, 0x63, 0x2f, 0x6a, - 0x06, 0xfd, 0x08, 0xb9, 0xf8, 0x3c, 0x6c, 0x37, 0x6e, 0x8f, 0x7a, 0xf7, 0xac, 0x66, 0x62, 0x36, - 0x88, 0x73, 0xde, 0x2c, 0x49, 0xc5, 0x26, 0xfb, 0x68, 0x24, 0xe7, 0x3b, 0x3c, 0x19, 0xb0, 0xa1, - 0x93, 0xf4, 0xea, 0x57, 0x80, 0x57, 0xf0, 0x53, 0x9a, 0x54, 0x22, 0xf4, 0x6a, 0x47, 0xe8, 0x6f, - 0xad, 0xf3, 0xb4, 0xe4, 0x95, 0xbb, 0x6c, 0x93, 0x34, 0x7f, 0x94, 0x20, 0xa7, 0x30, 0x17, 0xe9, - 0xf5, 0x9e, 0x08, 0xce, 0x09, 0xac, 0xd6, 0xc0, 0xeb, 0xd7, 0x10, 0x8c, 0xf3, 0xd3, 0x5d, 0x0b, - 0x61, 0x91, 0xb9, 0xe4, 0x64, 0x47, 0xf7, 0x02, 0xf7, 0xa0, 0x07, 0x60, 0x97, 0x4a, 0x56, 0xd1, - 0x9d, 0xda, 0xe8, 0xa1, 0xc0, 0xfc, 0xb8, 0x84, 0x0c, 0x05, 0x3e, 0x3d, 0xbf, 0x3d, 0xa2, 0xf2, - 0xd3, 0xc5, 0x98, 0x49, 0x9a, 0xf3, 0x6f, 0x9f, 0x2e, 0x48, 0x72, 0x6b, 0xe7, 0xa1, 0x18, 0x0b, - 0x5b, 0xfe, 0xf7, 0x73, 0x1b, 0x1f, 0x84, 0x7f, 0x0f, 0x5f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x80, - 0x7f, 0xc1, 0x6a, 0xea, 0x02, 0x00, 0x00, +var fileDescriptor_annotations_24d91a1b8877b604 = []byte{ + // 346 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x92, 0x4f, 0x4f, 0xea, 0x40, + 0x14, 0xc5, 0xc3, 0xe6, 0xe5, 0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 0x37, 0xa7, 0x69, 0x25, + 0x42, 0xaf, 0x76, 0x84, 0xc1, 0xce, 0x3a, 0x0e, 0x0b, 0x5e, 0xb1, 0x8b, 0xb6, 0x41, 0xf3, 0x4b, + 0x09, 0x72, 0x0e, 0x0b, 0x11, 0x5e, 0xee, 0x89, 0x60, 0xad, 0xc0, 0x6a, 0x0d, 0xbc, 0x7e, 0x0d, + 0xde, 0x38, 0x3e, 0x2a, 0x5b, 0xf0, 0x8b, 0xc8, 0x06, 0x07, 0x25, 0xdd, 0x09, 0xdc, 0x83, 0x1e, + 0x82, 0x59, 0x29, 0x59, 0x45, 0x77, 0x6a, 0xa3, 0x47, 0x02, 0xe3, 0xff, 0x05, 0x64, 0x24, 0x30, + 0xda, 0x06, 0x65, 0x8e, 0xf1, 0x4c, 0x41, 0x32, 0x0d, 0xcf, 0xf7, 0xfc, 0x75, 0x48, 0xaa, 0x9d, + 0xf7, 0x6b, 0x43, 0x9f, 0x86, 0x83, 0x97, 0xfc, 0x9b, 0x0f, 0x0b, 0x96, 0xb7, 0xbc, 0x7f, 0x78, + 0xbd, 0x43, 0xe5, 0xe6, 0xcb, 0x09, 0x93, 0xb4, 0xe0, 0x9f, 0x86, 0x5d, 0x90, 0x64, 0x37, 0xd6, + 0x41, 0x3e, 0xe6, 0xfe, 0xfc, 0xe7, 0xcb, 0x3e, 0xf9, 0xe3, 0xdf, 0xf5, 0x3f, 0x02, 0x00, 0x00, + 0xff, 0xff, 0x4b, 0xc4, 0x41, 0xfb, 0x68, 0x03, 0x00, 0x00, } diff --git a/protoc-gen-swagger/options/annotations.proto b/protoc-gen-swagger/options/annotations.proto index 8746192b7a8..2c0f594470e 100644 --- a/protoc-gen-swagger/options/annotations.proto +++ b/protoc-gen-swagger/options/annotations.proto @@ -35,3 +35,10 @@ extend google.protobuf.ServiceOptions { // different descriptor messages. Tag openapiv2_tag = 1042; } +extend google.protobuf.FieldOptions { + // ID assigned by protobuf-global-extension-registry@google.com for grpc-gateway project. + // + // All IDs are the same, as assigned. It is okay that they are the same, as they extend + // different descriptor messages. + JSONSchema openapiv2_field = 1042; +}