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.
17 import "google/protobuf/any.proto";
18 package openapiextension.v1;
20 // This option lets the proto compiler generate Java code inside the package
21 // name (see below) instead of inside an outer class. It creates a simpler
22 // developer experience by reducing one-level of name nesting and be
23 // consistent with most programming languages that don't support outer classes.
24 option java_multiple_files = true;
26 // The Java outer classname should be the filename in UpperCamelCase. This
27 // class is only used to hold proto descriptor, so developers don't need to
28 // work with it directly.
29 option java_outer_classname = "OpenAPIExtensionV1";
31 // The Java package name must be proto package name with proper prefix.
32 option java_package = "org.gnostic.v1";
34 // A reasonable prefix for the Objective-C symbols generated from the package.
35 // It should at a minimum be 3 characters long, all uppercase, and convention
36 // is to use an abbreviation of the package name. Something short, but
37 // hopefully unique enough to not conflict with things that may come along in
38 // the future. 'GPB' is reserved for the protocol buffer implementation itself.
40 option objc_class_prefix = "OAE"; // "OpenAPI Extension"
42 // The version number of OpenAPI compiler.
47 // A suffix for alpha, beta or rc release, e.g., "alpha-1", "rc2". It should
48 // be empty for mainline stable releases.
52 // An encoded Request is written to the ExtensionHandler's stdin.
53 message ExtensionHandlerRequest {
55 // The OpenAPI descriptions that were explicitly listed on the command line.
56 // The specifications will appear in the order they are specified to gnostic.
59 // The version number of openapi compiler.
60 Version compiler_version = 3;
63 // The extensions writes an encoded ExtensionHandlerResponse to stdout.
64 message ExtensionHandlerResponse {
66 // true if the extension is handled by the extension handler; false otherwise
69 // Error message. If non-empty, the extension handling failed.
70 // The extension handler process should exit with status code zero
71 // even if it reports an error in this way.
73 // This should be used to indicate errors which prevent the extension from
74 // operating as intended. Errors which indicate a problem in gnostic
75 // itself -- such as the input Document being unparseable -- should be
76 // reported by writing a message to stderr and exiting with a non-zero
78 repeated string error = 2;
81 google.protobuf.Any value = 3;
85 // version of the OpenAPI specification in which this extension was written.
88 // Name of the extension
89 string extension_name = 2;
91 // Must be a valid yaml for the proto