@@ -23,72 +23,90 @@ import "openapiv3/annotations.proto";
2323option go_package = "github.com/google/gnostic/apps/protoc-gen-openapi/examples/tests/openapiv3annotations/message/v1;message" ;
2424
2525option (openapi.v3.document ) = {
26- info : {
27- title : "Title from annotation" ;
28- version : "Version from annotation" ;
29- description : "Description from annotation" ;
30- contact : {
31- name : "Contact Name" ;
32- url : "https://github.com/google/gnostic" ;
33- 34- }
35- license : {
36- name : "Apache License" ;
37- url : "https://github.com/google/gnostic/blob/master/LICENSE" ;
26+ info : {
27+ title : "Title from annotation" ;
28+ version : "Version from annotation" ;
29+ description : "Description from annotation" ;
30+ contact : {
31+ name : "Contact Name" ;
32+ url : "https://github.com/google/gnostic" ;
33+ 34+ }
35+ license : {
36+ name : "Apache License" ;
37+ url : "https://github.com/google/gnostic/blob/master/LICENSE" ;
38+ }
3839 }
39- }
40- components : {
41- security_schemes : {
42- additional_properties : [
43- {
44- name : "BasicAuth" ;
45- value : {
46- security_scheme : {
47- type : "http" ;
48- scheme : "basic" ;
49- }
50- }
40+ components : {
41+ security_schemes : {
42+ additional_properties : [
43+ {
44+ name : "BasicAuth" ;
45+ value : {
46+ security_scheme : {
47+ type : "http" ;
48+ scheme : "basic" ;
49+ }
50+ }
51+ }
52+ ]
5153 }
52- ]
5354 }
54- }
5555};
5656
5757service Messaging1 {
58- rpc UpdateMessage (Message ) returns (Message ) {
59- option (google .api .http ) = {
60- patch : "/v1 /messages /{message_id }"
61- body: "*"
62- };
63- option(openapi.v3.operation) = {
64- security: [
65- {
66- additional_properties: [
67- {
68- name: "BasicAuth";
69- value: {}
70- }
58+ rpc UpdateMessage (Message ) returns (Message ) {
59+ option (google.api.http ) = {
60+ patch : "/v1/messages/{message_id}"
61+ body : "*"
62+ };
63+
64+ option (openapi.v3.operation ) = {
65+ tags : ["abc=def" ],
66+ specification_extension : [
67+ {
68+ name : "x-operation-id" ;
69+ value : {
70+ yaml : "updateMessage"
71+ };
72+ }
73+ ],
74+ parameters : [{
75+ parameter : {
76+ description : "jwt token" ,
77+ in : "header" ,
78+ name : "Authorization" ,
79+ required : true,
80+ },
81+ }],
82+ security : [
83+ {
84+ additional_properties : [
85+ {
86+ name : "BasicAuth" ;
87+ value : {}
88+ }
89+ ]
90+ }
7191 ]
72- }
73- ]
74- };
75- }
92+ };
93+ }
7694}
7795
7896service Messaging2 {
79- rpc UpdateMessage (Message ) returns (Message ) {}
97+ rpc UpdateMessage (Message ) returns (Message ) {}
8098}
8199
82100message Message {
83- option (openapi.v3.schema ) = {
84- title : "This is an overridden message schema title" ;
85- };
101+ option (openapi.v3.schema ) = {
102+ title : "This is an overridden message schema title" ;
103+ };
86104
87- int64 id = 1 ;
88- string label = 2 [
89- (openapi.v3.property ) = {
90- title : "this is an overriden field schema title" ;
91- max_length : 255 ;
92- }
93- ];
105+ int64 id = 1 ;
106+ string label = 2 [
107+ (openapi.v3.property ) = {
108+ title : "this is an overriden field schema title" ;
109+ max_length : 255 ;
110+ }
111+ ];
94112}
0 commit comments