vendor files

This commit is contained in:
Serguei Bezverkhi
2018-01-09 13:57:14 -05:00
parent 558bc6c02a
commit 7b24313bd6
16547 changed files with 4527373 additions and 0 deletions

View File

@ -0,0 +1,16 @@
# API Discovery Format
This directory contains a Protocol Buffer-language model
and related code for supporting Google's API Discovery Format.
Gnostic applications and plugins can use Discovery.proto
to generate Protocol Buffer support code for their preferred languages.
Discovery.go is used by Gnostic to read JSON and YAML Discovery
descriptions into the Protocol Buffer-based datastructures
generated from Discovery.proto.
Discovery.proto and Discovery.go are generated by the Gnostic
compiler generator, and Discovery.pb.go is generated by
protoc, the Protocol Buffer compiler, and protoc-gen-go, the
Protocol Buffer Go code generation plugin.

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,451 @@
{
"title": "A JSON Schema for the Google API Discovery Format.",
"id": "http://openapis.org/v3/schema.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"description": "This is the root document object of the Discovery Format.",
"required": [
"kind",
"discoveryVersion"
],
"additionalProperties": false,
"properties": {
"kind": {
"type": "string"
},
"discoveryVersion": {
"type": "string"
},
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"version": {
"type": "string"
},
"revision": {
"type": "string"
},
"title": {
"type": "string"
},
"description": {
"type": "string"
},
"icons": {
"$ref": "#/definitions/icons"
},
"documentationLink": {
"type": "string"
},
"labels": {
"type": "array",
"items": {
"type": "string"
}
},
"protocol": {
"type": "string"
},
"baseUrl": {
"type": "string"
},
"basePath": {
"type": "string"
},
"rootUrl": {
"type": "string"
},
"servicePath": {
"type": "string"
},
"batchPath": {
"type": "string"
},
"parameters": {
"$ref": "#/definitions/parameters"
},
"auth": {
"$ref": "#/definitions/auth"
},
"features": {
"type": "array",
"items": {
"type": "string"
}
},
"schemas": {
"$ref": "#/definitions/schemas"
},
"methods": {
"$ref": "#/definitions/methods"
},
"resources": {
"$ref": "#/definitions/resources"
},
"etag": {
"type": "string"
},
"ownerDomain": {
"type": "string"
},
"ownerName": {
"type": "string"
},
"version_module": {
"type": "boolean"
},
"canonicalName": {
"type": "string"
},
"fullyEncodeReservedExpansion": {
"type": "boolean"
},
"packagePath": {
"type": "string"
}
},
"definitions": {
"icons": {
"type": "object",
"description": "Icons that represent the API.",
"required": [
"x16",
"x32"
],
"additionalProperties": false,
"properties": {
"x16": {
"type": "string"
},
"x32": {
"type": "string"
}
}
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/parameter"
}
},
"parameter": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"$ref": {
"type": "string"
},
"description": {
"type": "string"
},
"default": {
"type": "string"
},
"required": {
"type": "boolean"
},
"format": {
"type": "string"
},
"pattern": {
"type": "string"
},
"minimum": {
"type": "string"
},
"maximum": {
"type": "string"
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"enumDescriptions": {
"type": "array",
"items": {
"type": "string"
}
},
"repeated": {
"type": "boolean"
},
"location": {
"type": "string"
},
"properties": {
"$ref": "#/definitions/schemas"
},
"additionalProperties": {
"$ref": "#/definitions/schema"
},
"items": {
"$ref": "#/definitions/schema"
},
"annotations": {
"$ref": "#/definitions/annotations"
}
}
},
"auth": {
"type": "object",
"properties": {
"oauth2": {
"type": "object",
"properties": {
"scopes": {
"$ref": "#/definitions/scopes"
}
}
}
}
},
"schemas": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/schema"
}
},
"schema": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"type": {
"type": "string"
},
"description": {
"type": "string"
},
"default": {
"type": "string"
},
"required": {
"type": "boolean"
},
"format": {
"type": "string"
},
"pattern": {
"type": "string"
},
"minimum": {
"type": "string"
},
"maximum": {
"type": "string"
},
"enum": {
"type": "array",
"items": {
"type": "string"
}
},
"enumDescriptions": {
"type": "array",
"items": {
"type": "string"
}
},
"repeated": {
"type": "boolean"
},
"location": {
"type": "string"
},
"properties": {
"$ref": "#/definitions/schemas"
},
"additionalProperties": {
"$ref": "#/definitions/schema"
},
"items": {
"$ref": "#/definitions/schema"
},
"$ref": {
"type": "string"
},
"annotations": {
"$ref": "#/definitions/annotations"
},
"readOnly": {
"type": "boolean"
}
}
},
"methods": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/method"
}
},
"method": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"path": {
"type": "string"
},
"httpMethod": {
"type": "string"
},
"description": {
"type": "string"
},
"parameters": {
"$ref": "#/definitions/parameters"
},
"parameterOrder": {
"type": "array",
"items": {
"type": "string"
}
},
"request": {
"type": "object",
"properties": {
"$ref": {
"type": "string"
},
"parameterName": {
"type": "string"
}
}
},
"response": {
"type": "object",
"properties": {
"$ref": {
"type": "string"
}
}
},
"scopes": {
"type": "array",
"items": {
"type": "string"
}
},
"supportsMediaDownload": {
"type": "boolean"
},
"supportsMediaUpload": {
"type": "boolean"
},
"useMediaDownloadService": {
"type": "boolean"
},
"mediaUpload": {
"$ref": "#/definitions/mediaUpload"
},
"supportsSubscription": {
"type": "boolean"
},
"flatPath": {
"type": "string"
},
"etagRequired": {
"type": "boolean"
}
}
},
"resources": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/resource"
}
},
"resource": {
"type": "object",
"properties": {
"methods": {
"$ref": "#/definitions/methods"
},
"resources": {
"$ref": "#/definitions/resources"
}
}
},
"annotations": {
"type": "object",
"properties": {
"required": {
"type": "array",
"items": {
"type": "string"
}
}
}
},
"scopes": {
"type": "object",
"additionalProperties": {
"$ref": "#/definitions/scope"
}
},
"scope": {
"type": "object",
"properties": {
"description": {
"type": "string"
}
}
},
"mediaUpload": {
"type": "object",
"properties": {
"accept": {
"type": "array",
"items": {
"type": "string"
}
},
"maxSize": {
"type": "string"
},
"protocols": {
"type": "object",
"properties": {
"simple": {
"type": "object",
"properties": {
"multipart": {
"type": "boolean"
},
"path": {
"type": "string"
}
}
},
"resumable": {
"type": "object",
"properties": {
"multipart": {
"type": "boolean"
},
"path": {
"type": "string"
}
}
}
}
},
"supportsSubscription": {
"type": "boolean"
}
}
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,265 @@
// Copyright 2017 Google Inc. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
// THIS FILE IS AUTOMATICALLY GENERATED.
syntax = "proto3";
package discovery.v1;
import "google/protobuf/any.proto";
// This option lets the proto compiler generate Java code inside the package
// name (see below) instead of inside an outer class. It creates a simpler
// developer experience by reducing one-level of name nesting and be
// consistent with most programming languages that don't support outer classes.
option java_multiple_files = true;
// The Java outer classname should be the filename in UpperCamelCase. This
// class is only used to hold proto descriptor, so developers don't need to
// work with it directly.
option java_outer_classname = "OpenAPIProto";
// The Java package name must be proto package name with proper prefix.
option java_package = "org.discovery_v1";
// A reasonable prefix for the Objective-C symbols generated from the package.
// It should at a minimum be 3 characters long, all uppercase, and convention
// is to use an abbreviation of the package name. Something short, but
// hopefully unique enough to not conflict with things that may come along in
// the future. 'GPB' is reserved for the protocol buffer implementation itself.
option objc_class_prefix = "OAS";
message Annotations {
repeated string required = 1;
}
message Any {
google.protobuf.Any value = 1;
string yaml = 2;
}
message Auth {
Oauth2 oauth2 = 1;
}
message Document {
string kind = 1;
string discovery_version = 2;
string id = 3;
string name = 4;
string version = 5;
string revision = 6;
string title = 7;
string description = 8;
Icons icons = 9;
string documentation_link = 10;
repeated string labels = 11;
string protocol = 12;
string base_url = 13;
string base_path = 14;
string root_url = 15;
string service_path = 16;
string batch_path = 17;
Parameters parameters = 18;
Auth auth = 19;
repeated string features = 20;
Schemas schemas = 21;
Methods methods = 22;
Resources resources = 23;
string etag = 24;
string owner_domain = 25;
string owner_name = 26;
bool version_module = 27;
string canonical_name = 28;
bool fully_encode_reserved_expansion = 29;
string package_path = 30;
}
// Icons that represent the API.
message Icons {
string x16 = 1;
string x32 = 2;
}
message MediaUpload {
repeated string accept = 1;
string max_size = 2;
Protocols protocols = 3;
bool supports_subscription = 4;
}
message Method {
string id = 1;
string path = 2;
string http_method = 3;
string description = 4;
Parameters parameters = 5;
repeated string parameter_order = 6;
Request request = 7;
Response response = 8;
repeated string scopes = 9;
bool supports_media_download = 10;
bool supports_media_upload = 11;
bool use_media_download_service = 12;
MediaUpload media_upload = 13;
bool supports_subscription = 14;
string flat_path = 15;
bool etag_required = 16;
}
message Methods {
repeated NamedMethod additional_properties = 1;
}
// Automatically-generated message used to represent maps of Method as ordered (name,value) pairs.
message NamedMethod {
// Map key
string name = 1;
// Mapped value
Method value = 2;
}
// Automatically-generated message used to represent maps of Parameter as ordered (name,value) pairs.
message NamedParameter {
// Map key
string name = 1;
// Mapped value
Parameter value = 2;
}
// Automatically-generated message used to represent maps of Resource as ordered (name,value) pairs.
message NamedResource {
// Map key
string name = 1;
// Mapped value
Resource value = 2;
}
// Automatically-generated message used to represent maps of Schema as ordered (name,value) pairs.
message NamedSchema {
// Map key
string name = 1;
// Mapped value
Schema value = 2;
}
// Automatically-generated message used to represent maps of Scope as ordered (name,value) pairs.
message NamedScope {
// Map key
string name = 1;
// Mapped value
Scope value = 2;
}
message Oauth2 {
Scopes scopes = 1;
}
message Parameter {
string id = 1;
string type = 2;
string _ref = 3;
string description = 4;
string default = 5;
bool required = 6;
string format = 7;
string pattern = 8;
string minimum = 9;
string maximum = 10;
repeated string enum = 11;
repeated string enum_descriptions = 12;
bool repeated = 13;
string location = 14;
Schemas properties = 15;
Schema additional_properties = 16;
Schema items = 17;
Annotations annotations = 18;
}
message Parameters {
repeated NamedParameter additional_properties = 1;
}
message Protocols {
Simple simple = 1;
Resumable resumable = 2;
}
message Request {
string _ref = 1;
string parameter_name = 2;
}
message Resource {
Methods methods = 1;
Resources resources = 2;
}
message Resources {
repeated NamedResource additional_properties = 1;
}
message Response {
string _ref = 1;
}
message Resumable {
bool multipart = 1;
string path = 2;
}
message Schema {
string id = 1;
string type = 2;
string description = 3;
string default = 4;
bool required = 5;
string format = 6;
string pattern = 7;
string minimum = 8;
string maximum = 9;
repeated string enum = 10;
repeated string enum_descriptions = 11;
bool repeated = 12;
string location = 13;
Schemas properties = 14;
Schema additional_properties = 15;
Schema items = 16;
string _ref = 17;
Annotations annotations = 18;
bool read_only = 19;
}
message Schemas {
repeated NamedSchema additional_properties = 1;
}
message Scope {
string description = 1;
}
message Scopes {
repeated NamedScope additional_properties = 1;
}
message Simple {
bool multipart = 1;
string path = 2;
}
message StringArray {
repeated string value = 1;
}

View File

@ -0,0 +1,297 @@
title: A JSON Schema for the Google API Discovery Format.
id: http://openapis.org/v3/schema.json#
$schema: http://json-schema.org/draft-04/schema#
type: object
description: This is the root document object of the Discovery Format.
required:
- kind
- discoveryVersion
additionalProperties: false
properties:
kind:
type: string
discoveryVersion:
type: string
id:
type: string
name:
type: string
version:
type: string
revision:
type: string
title:
type: string
description:
type: string
icons:
$ref: '#/definitions/icons'
documentationLink:
type: string
labels:
type: array
items:
type: string
protocol:
type: string
baseUrl:
type: string
basePath:
type: string
rootUrl:
type: string
servicePath:
type: string
batchPath:
type: string
parameters:
$ref: '#/definitions/parameters'
auth:
$ref: '#/definitions/auth'
features:
type: array
items:
type: string
schemas:
$ref: '#/definitions/schemas'
methods:
$ref: '#/definitions/methods'
resources:
$ref: '#/definitions/resources'
etag:
type: string
ownerDomain:
type: string
ownerName:
type: string
version_module:
type: boolean
canonicalName:
type: string
fullyEncodeReservedExpansion:
type: boolean
packagePath:
type: string
definitions:
icons:
type: object
description: Icons that represent the API.
required:
- x16
- x32
additionalProperties: false
properties:
x16:
type: string
x32:
type: string
parameters:
type: object
additionalProperties:
$ref: '#/definitions/parameter'
parameter:
type: object
properties:
id:
type: string
type:
type: string
$ref:
type: string
description:
type: string
default:
type: string
required:
type: boolean
format:
type: string
pattern:
type: string
minimum:
type: string
maximum:
type: string
enum:
type: array
items:
type: string
enumDescriptions:
type: array
items:
type: string
repeated:
type: boolean
location:
type: string
properties:
$ref: '#/definitions/schemas'
additionalProperties:
$ref: '#/definitions/schema'
items:
$ref: '#/definitions/schema'
annotations:
$ref: '#/definitions/annotations'
auth:
type: object
properties:
oauth2:
type: object
properties:
scopes:
$ref: '#/definitions/scopes'
schemas:
type: object
additionalProperties:
$ref: '#/definitions/schema'
schema:
type: object
properties:
id:
type: string
type:
type: string
description:
type: string
default:
type: string
required:
type: boolean
format:
type: string
pattern:
type: string
minimum:
type: string
maximum:
type: string
enum:
type: array
items:
type: string
enumDescriptions:
type: array
items:
type: string
repeated:
type: boolean
location:
type: string
properties:
$ref: '#/definitions/schemas'
additionalProperties:
$ref: '#/definitions/schema'
items:
$ref: '#/definitions/schema'
$ref:
type: string
annotations:
$ref: '#/definitions/annotations'
readOnly:
type: boolean
methods:
type: object
additionalProperties:
$ref: '#/definitions/method'
method:
type: object
properties:
id:
type: string
path:
type: string
httpMethod:
type: string
description:
type: string
parameters:
$ref: '#/definitions/parameters'
parameterOrder:
type: array
items:
type: string
request:
type: object
properties:
$ref:
type: string
parameterName:
type: string
response:
type: object
properties:
$ref:
type: string
scopes:
type: array
items:
type: string
supportsMediaDownload:
type: boolean
supportsMediaUpload:
type: boolean
useMediaDownloadService:
type: boolean
mediaUpload:
$ref: '#/definitions/mediaUpload'
supportsSubscription:
type: boolean
flatPath:
type: string
etagRequired:
type: boolean
resources:
type: object
additionalProperties:
$ref: '#/definitions/resource'
resource:
type: object
properties:
methods:
$ref: '#/definitions/methods'
resources:
$ref: '#/definitions/resources'
annotations:
type: object
properties:
required:
type: array
items:
type: string
scopes:
type: object
additionalProperties:
$ref: '#/definitions/scope'
scope:
type: object
properties:
description:
type: string
mediaUpload:
type: object
properties:
accept:
type: array
items:
type: string
maxSize:
type: string
protocols:
type: object
properties:
simple:
type: object
properties:
multipart:
type: boolean
path:
type: string
resumable:
type: object
properties:
multipart:
type: boolean
path:
type: string
supportsSubscription:
type: boolean