1 // Copyright 2017 Google Inc. All Rights Reserved.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
15 // THIS FILE IS AUTOMATICALLY GENERATED.
21 import "google/protobuf/any.proto";
23 // This option lets the proto compiler generate Java code inside the package
24 // name (see below) instead of inside an outer class. It creates a simpler
25 // developer experience by reducing one-level of name nesting and be
26 // consistent with most programming languages that don't support outer classes.
27 option java_multiple_files = true;
29 // The Java outer classname should be the filename in UpperCamelCase. This
30 // class is only used to hold proto descriptor, so developers don't need to
31 // work with it directly.
32 option java_outer_classname = "OpenAPIProto";
34 // The Java package name must be proto package name with proper prefix.
35 option java_package = "org.openapi_v2";
37 // A reasonable prefix for the Objective-C symbols generated from the package.
38 // It should at a minimum be 3 characters long, all uppercase, and convention
39 // is to use an abbreviation of the package name. Something short, but
40 // hopefully unique enough to not conflict with things that may come along in
41 // the future. 'GPB' is reserved for the protocol buffer implementation itself.
42 option objc_class_prefix = "OAS";
44 message AdditionalPropertiesItem {
52 google.protobuf.Any value = 1;
56 message ApiKeySecurity {
60 string description = 4;
61 repeated NamedAny vendor_extension = 5;
64 message BasicAuthenticationSecurity {
66 string description = 2;
67 repeated NamedAny vendor_extension = 3;
70 message BodyParameter {
71 // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
72 string description = 1;
73 // The name of the parameter.
75 // Determines the location of the parameter.
77 // Determines whether or not this parameter is required or optional.
80 repeated NamedAny vendor_extension = 6;
83 // Contact information for the owners of the API.
85 // The identifying name of the contact person/organization.
87 // The URL pointing to the contact information.
89 // The email address of the contact person/organization.
91 repeated NamedAny vendor_extension = 4;
95 repeated NamedAny additional_properties = 1;
98 // One or more JSON objects describing the schemas being consumed and produced by the API.
100 repeated NamedSchema additional_properties = 1;
104 // The Swagger version of this document.
107 // The host (name or ip) of the API. Example: 'swagger.io'
109 // The base path to the API. Example: '/api'.
110 string base_path = 4;
111 // The transfer protocol of the API.
112 repeated string schemes = 5;
113 // A list of MIME types accepted by the API.
114 repeated string consumes = 6;
115 // A list of MIME types the API can produce.
116 repeated string produces = 7;
118 Definitions definitions = 9;
119 ParameterDefinitions parameters = 10;
120 ResponseDefinitions responses = 11;
121 repeated SecurityRequirement security = 12;
122 SecurityDefinitions security_definitions = 13;
123 repeated Tag tags = 14;
124 ExternalDocs external_docs = 15;
125 repeated NamedAny vendor_extension = 16;
129 repeated NamedAny additional_properties = 1;
132 // information about external documentation
133 message ExternalDocs {
134 string description = 1;
136 repeated NamedAny vendor_extension = 3;
139 // A deterministic version of a JSON Schema object.
143 string description = 3;
145 repeated string required = 5;
148 ExternalDocs external_docs = 8;
150 repeated NamedAny vendor_extension = 10;
153 message FormDataParameterSubSchema {
154 // Determines whether or not this parameter is required or optional.
156 // Determines the location of the parameter.
158 // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
159 string description = 3;
160 // The name of the parameter.
162 // allows sending a parameter by name only or with an empty value.
163 bool allow_empty_value = 5;
166 PrimitivesItems items = 8;
167 string collection_format = 9;
170 bool exclusive_maximum = 12;
172 bool exclusive_minimum = 14;
173 int64 max_length = 15;
174 int64 min_length = 16;
176 int64 max_items = 18;
177 int64 min_items = 19;
178 bool unique_items = 20;
179 repeated Any enum = 21;
180 double multiple_of = 22;
181 repeated NamedAny vendor_extension = 23;
187 PrimitivesItems items = 3;
188 string collection_format = 4;
191 bool exclusive_maximum = 7;
193 bool exclusive_minimum = 9;
194 int64 max_length = 10;
195 int64 min_length = 11;
197 int64 max_items = 13;
198 int64 min_items = 14;
199 bool unique_items = 15;
200 repeated Any enum = 16;
201 double multiple_of = 17;
202 string description = 18;
203 repeated NamedAny vendor_extension = 19;
206 message HeaderParameterSubSchema {
207 // Determines whether or not this parameter is required or optional.
209 // Determines the location of the parameter.
211 // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
212 string description = 3;
213 // The name of the parameter.
217 PrimitivesItems items = 7;
218 string collection_format = 8;
221 bool exclusive_maximum = 11;
223 bool exclusive_minimum = 13;
224 int64 max_length = 14;
225 int64 min_length = 15;
227 int64 max_items = 17;
228 int64 min_items = 18;
229 bool unique_items = 19;
230 repeated Any enum = 20;
231 double multiple_of = 21;
232 repeated NamedAny vendor_extension = 22;
236 repeated NamedHeader additional_properties = 1;
239 // General information about the API.
241 // A unique and precise title of the API.
243 // A semantic version number of the API.
245 // A longer description of the API. Should be different from the title. GitHub Flavored Markdown is allowed.
246 string description = 3;
247 // The terms of service for the API.
248 string terms_of_service = 4;
251 repeated NamedAny vendor_extension = 7;
255 repeated Schema schema = 1;
258 message JsonReference {
260 string description = 2;
264 // The name of the license type. It's encouraged to use an OSI compatible license.
266 // The URL pointing to the license.
268 repeated NamedAny vendor_extension = 3;
271 // Automatically-generated message used to represent maps of Any as ordered (name,value) pairs.
279 // Automatically-generated message used to represent maps of Header as ordered (name,value) pairs.
280 message NamedHeader {
287 // Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs.
288 message NamedParameter {
295 // Automatically-generated message used to represent maps of PathItem as ordered (name,value) pairs.
296 message NamedPathItem {
303 // Automatically-generated message used to represent maps of Response as ordered (name,value) pairs.
304 message NamedResponse {
311 // Automatically-generated message used to represent maps of ResponseValue as ordered (name,value) pairs.
312 message NamedResponseValue {
316 ResponseValue value = 2;
319 // Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs.
320 message NamedSchema {
327 // Automatically-generated message used to represent maps of SecurityDefinitionsItem as ordered (name,value) pairs.
328 message NamedSecurityDefinitionsItem {
332 SecurityDefinitionsItem value = 2;
335 // Automatically-generated message used to represent maps of string as ordered (name,value) pairs.
336 message NamedString {
343 // Automatically-generated message used to represent maps of StringArray as ordered (name,value) pairs.
344 message NamedStringArray {
348 StringArray value = 2;
351 message NonBodyParameter {
353 HeaderParameterSubSchema header_parameter_sub_schema = 1;
354 FormDataParameterSubSchema form_data_parameter_sub_schema = 2;
355 QueryParameterSubSchema query_parameter_sub_schema = 3;
356 PathParameterSubSchema path_parameter_sub_schema = 4;
360 message Oauth2AccessCodeSecurity {
363 Oauth2Scopes scopes = 3;
364 string authorization_url = 4;
365 string token_url = 5;
366 string description = 6;
367 repeated NamedAny vendor_extension = 7;
370 message Oauth2ApplicationSecurity {
373 Oauth2Scopes scopes = 3;
374 string token_url = 4;
375 string description = 5;
376 repeated NamedAny vendor_extension = 6;
379 message Oauth2ImplicitSecurity {
382 Oauth2Scopes scopes = 3;
383 string authorization_url = 4;
384 string description = 5;
385 repeated NamedAny vendor_extension = 6;
388 message Oauth2PasswordSecurity {
391 Oauth2Scopes scopes = 3;
392 string token_url = 4;
393 string description = 5;
394 repeated NamedAny vendor_extension = 6;
397 message Oauth2Scopes {
398 repeated NamedString additional_properties = 1;
402 repeated string tags = 1;
403 // A brief summary of the operation.
405 // A longer description of the operation, GitHub Flavored Markdown is allowed.
406 string description = 3;
407 ExternalDocs external_docs = 4;
408 // A unique identifier of the operation.
409 string operation_id = 5;
410 // A list of MIME types the API can produce.
411 repeated string produces = 6;
412 // A list of MIME types the API can consume.
413 repeated string consumes = 7;
414 // The parameters needed to send a valid API call.
415 repeated ParametersItem parameters = 8;
416 Responses responses = 9;
417 // The transfer protocol of the API.
418 repeated string schemes = 10;
419 bool deprecated = 11;
420 repeated SecurityRequirement security = 12;
421 repeated NamedAny vendor_extension = 13;
426 BodyParameter body_parameter = 1;
427 NonBodyParameter non_body_parameter = 2;
431 // One or more JSON representations for parameters
432 message ParameterDefinitions {
433 repeated NamedParameter additional_properties = 1;
436 message ParametersItem {
438 Parameter parameter = 1;
439 JsonReference json_reference = 2;
448 Operation delete = 5;
449 Operation options = 6;
452 // The parameters needed to send a valid API call.
453 repeated ParametersItem parameters = 9;
454 repeated NamedAny vendor_extension = 10;
457 message PathParameterSubSchema {
458 // Determines whether or not this parameter is required or optional.
460 // Determines the location of the parameter.
462 // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
463 string description = 3;
464 // The name of the parameter.
468 PrimitivesItems items = 7;
469 string collection_format = 8;
472 bool exclusive_maximum = 11;
474 bool exclusive_minimum = 13;
475 int64 max_length = 14;
476 int64 min_length = 15;
478 int64 max_items = 17;
479 int64 min_items = 18;
480 bool unique_items = 19;
481 repeated Any enum = 20;
482 double multiple_of = 21;
483 repeated NamedAny vendor_extension = 22;
486 // Relative paths to the individual endpoints. They must be relative to the 'basePath'.
488 repeated NamedAny vendor_extension = 1;
489 repeated NamedPathItem path = 2;
492 message PrimitivesItems {
495 PrimitivesItems items = 3;
496 string collection_format = 4;
499 bool exclusive_maximum = 7;
501 bool exclusive_minimum = 9;
502 int64 max_length = 10;
503 int64 min_length = 11;
505 int64 max_items = 13;
506 int64 min_items = 14;
507 bool unique_items = 15;
508 repeated Any enum = 16;
509 double multiple_of = 17;
510 repeated NamedAny vendor_extension = 18;
514 repeated NamedSchema additional_properties = 1;
517 message QueryParameterSubSchema {
518 // Determines whether or not this parameter is required or optional.
520 // Determines the location of the parameter.
522 // A brief description of the parameter. This could contain examples of use. GitHub Flavored Markdown is allowed.
523 string description = 3;
524 // The name of the parameter.
526 // allows sending a parameter by name only or with an empty value.
527 bool allow_empty_value = 5;
530 PrimitivesItems items = 8;
531 string collection_format = 9;
534 bool exclusive_maximum = 12;
536 bool exclusive_minimum = 14;
537 int64 max_length = 15;
538 int64 min_length = 16;
540 int64 max_items = 18;
541 int64 min_items = 19;
542 bool unique_items = 20;
543 repeated Any enum = 21;
544 double multiple_of = 22;
545 repeated NamedAny vendor_extension = 23;
549 string description = 1;
550 SchemaItem schema = 2;
552 Examples examples = 4;
553 repeated NamedAny vendor_extension = 5;
556 // One or more JSON representations for parameters
557 message ResponseDefinitions {
558 repeated NamedResponse additional_properties = 1;
561 message ResponseValue {
563 Response response = 1;
564 JsonReference json_reference = 2;
568 // Response objects names can either be any valid HTTP status code or 'default'.
570 repeated NamedResponseValue response_code = 1;
571 repeated NamedAny vendor_extension = 2;
574 // A deterministic version of a JSON Schema object.
579 string description = 4;
581 double multiple_of = 6;
583 bool exclusive_maximum = 8;
585 bool exclusive_minimum = 10;
586 int64 max_length = 11;
587 int64 min_length = 12;
589 int64 max_items = 14;
590 int64 min_items = 15;
591 bool unique_items = 16;
592 int64 max_properties = 17;
593 int64 min_properties = 18;
594 repeated string required = 19;
595 repeated Any enum = 20;
596 AdditionalPropertiesItem additional_properties = 21;
598 ItemsItem items = 23;
599 repeated Schema all_of = 24;
600 Properties properties = 25;
601 string discriminator = 26;
604 ExternalDocs external_docs = 29;
606 repeated NamedAny vendor_extension = 31;
612 FileSchema file_schema = 2;
616 message SecurityDefinitions {
617 repeated NamedSecurityDefinitionsItem additional_properties = 1;
620 message SecurityDefinitionsItem {
622 BasicAuthenticationSecurity basic_authentication_security = 1;
623 ApiKeySecurity api_key_security = 2;
624 Oauth2ImplicitSecurity oauth2_implicit_security = 3;
625 Oauth2PasswordSecurity oauth2_password_security = 4;
626 Oauth2ApplicationSecurity oauth2_application_security = 5;
627 Oauth2AccessCodeSecurity oauth2_access_code_security = 6;
631 message SecurityRequirement {
632 repeated NamedStringArray additional_properties = 1;
635 message StringArray {
636 repeated string value = 1;
641 string description = 2;
642 ExternalDocs external_docs = 3;
643 repeated NamedAny vendor_extension = 4;
647 repeated string value = 1;
650 // Any property starting with x- is valid.
651 message VendorExtension {
652 repeated NamedAny additional_properties = 1;
657 string namespace = 2;
661 repeated NamedAny vendor_extension = 6;