Add generated file

This PR adds generated files under pkg/client and vendor folder.
This commit is contained in:
xing-yang
2018-07-12 10:55:15 -07:00
parent 36b1de0341
commit e213d1890d
17729 changed files with 5090889 additions and 0 deletions

3
vendor/github.com/googleapis/gnostic/test/README.md generated vendored Normal file
View File

@@ -0,0 +1,3 @@
# test
This directory contains test data used to verify gnostic.

View File

@@ -0,0 +1,12 @@
Errors reading examples/v2.0/yaml/petstore.yaml
Invalid invocation of gnostic-plugin: foo=bar,:abc
Errors reading examples/v2.0/yaml/petstore.yaml
Invalid invocation of gnostic-plugin: ,foo=bar:abc
Errors reading examples/v2.0/yaml/petstore.yaml
Invalid invocation of gnostic-plugin: foo=:abc
Errors reading examples/v2.0/yaml/petstore.yaml
Invalid invocation of gnostic-plugin: =bar:abc
Errors reading examples/v2.0/yaml/petstore.yaml
Invalid invocation of gnostic-plugin: ,,:abc
Errors reading examples/v2.0/yaml/petstore.yaml
Invalid invocation of gnostic-plugin: foo=bar=baz:abc

View File

@@ -0,0 +1,16 @@
Errors reading examples/errors/petstore-badproperties.yaml
ERROR $root.info is missing required property: version
ERROR $root.info has invalid property: myproperty
ERROR $root.paths./pets.get.parameters.parameter.bodyParameter is missing required property: schema
ERROR $root.paths./pets.get.parameters.parameter.bodyParameter has invalid properties: type, format, myproperty
ERROR $root.paths./pets.get.parameters.parameter.bodyParameter has unexpected value for in: query (string)
ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.headerParameterSubSchema has invalid property: myproperty
ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.headerParameterSubSchema has unexpected value for in: query (string)
ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.formDataParameterSubSchema has invalid property: myproperty
ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.formDataParameterSubSchema has unexpected value for in: query (string)
ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.queryParameterSubSchema has invalid property: myproperty
ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.pathParameterSubSchema has invalid property: myproperty
ERROR $root.paths./pets.get.parameters.parameter.nonBodyParameter.pathParameterSubSchema has unexpected value for in: query (string)
ERROR $root.paths./pets.get.parameters.jsonReference is missing required property: $ref
ERROR $root.paths./pets.get.parameters.jsonReference has invalid properties: name, in, required, type, format, myproperty
ERROR $root.paths./pets.post has unexpected value for tags: pets (string)

View File

@@ -0,0 +1,2 @@
Errors reading examples/errors/petstore-missingversion.yaml
unable to identify OpenAPI version

View File

@@ -0,0 +1,3 @@
Errors reading examples/errors/petstore-unresolvedrefs.yaml
ERROR could not resolve #/definitions/Pet
ERROR could not resolve #/definitions/Error

View File

@@ -0,0 +1,96 @@
{
"swagger": "2.0",
"info": {
"title": "Google Example Library API",
"description": "A simple Google Example Library API.",
"version": "v1"
},
"host": "library-example.googleapis.com",
"x-sampleone-book" : {"code": 123, "message": 999},
"x-sampleone-shelf" : {"foo1": 123, "bar": 999},
"x-sampleone-mysimplestring" : "hello world",
"x-sampleone-mysimpleint64" : 12345,
"x-sampleone-mysimplenumber" : 111.222,
"x-sampleone-mysimpleboolean" : true,
"x-sampletwo-book" : {"code": 123, "message": 999},
"x-sampletwo-shelf" : {"foo1": 123, "bar": 999},
"x-unhandled" : {"code": 123, "message": 999},
"parameters" : {
"paramAtSwaggerScope": {
"name": "paramAtSwaggerScope",
"in": "query",
"description": "test",
"required": true,
"type": "integer",
"format": "int32"
}
},
"paths": {
"/v1/{sharedParameter}/pets": {
"post": {
"operationId": "simpleMethod",
"parameters": [
{
"name": "myBodyRef",
"in": "body",
"schema": {
"properties": {
"myStringA": {
"type": "string"
}
}
}
},
{
"name": "paramToOverride",
"in": "query",
"description": "New description",
"required": true,
"type": "string"
},
{
"$ref": "#/parameters/paramAtSwaggerScope"
}
],
"responses": {
"default": {
"description": "successful operation",
"schema": {
"$ref": "#/definitions/SimpleDef"
}
}
}
},
"parameters": [
{
"name": "sharedParameter",
"in": "path",
"description": "Shared parameter",
"required": true,
"type": "string"
},
{
"name": "paramToOverride",
"in": "query",
"description": "Description to override",
"required": true,
"type": "string"
}
]
}
},
"definitions": {
"SimpleDef": {
"properties": {
"myStringA": {
"type": "string"
}
}
}
}
}

View File

@@ -0,0 +1,387 @@
swagger: "2.0"
info: <
title: "Swagger Petstore"
version: "1.0.0"
license: <
name: "MIT"
>
>
host: "petstore.swagger.io"
base_path: "/v1"
schemes: "http"
consumes: "application/json"
produces: "application/json"
paths: <
path: <
name: "/pets"
value: <
get: <
tags: "pets"
summary: "List all pets"
operation_id: "listPets"
parameters: <
parameter: <
non_body_parameter: <
query_parameter_sub_schema: <
in: "query"
description: "How many items to return at one time (max 100)"
name: "limit"
type: "integer"
format: "int32"
>
>
>
>
responses: <
response_code: <
name: "200"
value: <
response: <
description: "An paged array of pets"
schema: <
schema: <
type: <
value: "array"
>
items: <
schema: <
required: "id"
required: "name"
properties: <
additional_properties: <
name: "id"
value: <
format: "int64"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "name"
value: <
type: <
value: "string"
>
>
>
additional_properties: <
name: "tag"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
headers: <
additional_properties: <
name: "x-next"
value: <
type: "string"
description: "A link to the next page of responses"
>
>
>
>
>
>
response_code: <
name: "default"
value: <
response: <
description: "unexpected error"
schema: <
schema: <
required: "code"
required: "message"
properties: <
additional_properties: <
name: "code"
value: <
format: "int32"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "message"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
>
>
post: <
tags: "pets"
summary: "Create a pet"
operation_id: "createPets"
responses: <
response_code: <
name: "201"
value: <
response: <
description: "Null response"
>
>
>
response_code: <
name: "default"
value: <
response: <
description: "unexpected error"
schema: <
schema: <
required: "code"
required: "message"
properties: <
additional_properties: <
name: "code"
value: <
format: "int32"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "message"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
>
>
>
>
path: <
name: "/pets/{petId}"
value: <
get: <
tags: "pets"
summary: "Info for a specific pet"
operation_id: "showPetById"
parameters: <
parameter: <
non_body_parameter: <
path_parameter_sub_schema: <
required: true
in: "path"
description: "The id of the pet to retrieve"
name: "petId"
type: "string"
>
>
>
>
responses: <
response_code: <
name: "200"
value: <
response: <
description: "Expected response to a valid request"
schema: <
schema: <
type: <
value: "array"
>
items: <
schema: <
required: "id"
required: "name"
properties: <
additional_properties: <
name: "id"
value: <
format: "int64"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "name"
value: <
type: <
value: "string"
>
>
>
additional_properties: <
name: "tag"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
>
>
response_code: <
name: "default"
value: <
response: <
description: "unexpected error"
schema: <
schema: <
required: "code"
required: "message"
properties: <
additional_properties: <
name: "code"
value: <
format: "int32"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "message"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
>
>
>
>
>
definitions: <
additional_properties: <
name: "Pet"
value: <
required: "id"
required: "name"
properties: <
additional_properties: <
name: "id"
value: <
format: "int64"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "name"
value: <
type: <
value: "string"
>
>
>
additional_properties: <
name: "tag"
value: <
type: <
value: "string"
>
>
>
>
>
>
additional_properties: <
name: "Pets"
value: <
type: <
value: "array"
>
items: <
schema: <
required: "id"
required: "name"
properties: <
additional_properties: <
name: "id"
value: <
format: "int64"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "name"
value: <
type: <
value: "string"
>
>
>
additional_properties: <
name: "tag"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
additional_properties: <
name: "Error"
value: <
required: "code"
required: "message"
properties: <
additional_properties: <
name: "code"
value: <
format: "int32"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "message"
value: <
type: <
value: "string"
>
>
>
>
>
>
>

View File

@@ -0,0 +1,468 @@
swagger: "2.0"
info: <
title: "Swagger Petstore"
version: "1.0.0"
description: "A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification"
terms_of_service: "http://helloreverb.com/terms/"
contact: <
name: "Wordnik API Team"
url: "http://madskristensen.net"
email: "foo@example.com"
>
license: <
name: "MIT"
url: "http://github.com/gruntjs/grunt/blob/master/LICENSE-MIT"
>
>
host: "petstore.swagger.wordnik.com"
base_path: "/api"
schemes: "http"
consumes: "application/json"
produces: "application/json"
paths: <
path: <
name: "/pets"
value: <
get: <
description: "Returns all pets from the system that the user has access to\nNam sed condimentum est. Maecenas tempor sagittis sapien, nec rhoncus sem sagittis sit amet. Aenean at gravida augue, ac iaculis sem. Curabitur odio lorem, ornare eget elementum nec, cursus id lectus. Duis mi turpis, pulvinar ac eros ac, tincidunt varius justo. In hac habitasse platea dictumst. Integer at adipiscing ante, a sagittis ligula. Aenean pharetra tempor ante molestie imperdiet. Vivamus id aliquam diam. Cras quis velit non tortor eleifend sagittis. Praesent at enim pharetra urna volutpat venenatis eget eget mauris. In eleifend fermentum facilisis. Praesent enim enim, gravida ac sodales sed, placerat id erat. Suspendisse lacus dolor, consectetur non augue vel, vehicula interdum libero. Morbi euismod sagittis libero sed lacinia.\n\nSed tempus felis lobortis leo pulvinar rutrum. Nam mattis velit nisl, eu condimentum ligula luctus nec. Phasellus semper velit eget aliquet faucibus. In a mattis elit. Phasellus vel urna viverra, condimentum lorem id, rhoncus nibh. Ut pellentesque posuere elementum. Sed a varius odio. Morbi rhoncus ligula libero, vel eleifend nunc tristique vitae. Fusce et sem dui. Aenean nec scelerisque tortor. Fusce malesuada accumsan magna vel tempus. Quisque mollis felis eu dolor tristique, sit amet auctor felis gravida. Sed libero lorem, molestie sed nisl in, accumsan tempor nisi. Fusce sollicitudin massa ut lacinia mattis. Sed vel eleifend lorem. Pellentesque vitae felis pretium, pulvinar elit eu, euismod sapien.\n"
operation_id: "findPets"
parameters: <
parameter: <
non_body_parameter: <
query_parameter_sub_schema: <
in: "query"
description: "tags to filter by"
name: "tags"
type: "array"
items: <
type: "string"
>
collection_format: "csv"
>
>
>
>
parameters: <
parameter: <
non_body_parameter: <
query_parameter_sub_schema: <
in: "query"
description: "maximum number of results to return"
name: "limit"
type: "integer"
format: "int32"
>
>
>
>
responses: <
response_code: <
name: "200"
value: <
response: <
description: "pet response"
schema: <
schema: <
type: <
value: "array"
>
items: <
schema: <
required: "id"
required: "name"
type: <
value: "object"
>
properties: <
additional_properties: <
name: "id"
value: <
format: "int64"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "name"
value: <
type: <
value: "string"
>
>
>
additional_properties: <
name: "tag"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
>
>
response_code: <
name: "default"
value: <
response: <
description: "unexpected error"
schema: <
schema: <
required: "code"
required: "message"
type: <
value: "object"
>
properties: <
additional_properties: <
name: "code"
value: <
format: "int32"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "message"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
>
>
post: <
description: "Creates a new pet in the store. Duplicates are allowed"
operation_id: "addPet"
parameters: <
parameter: <
body_parameter: <
description: "Pet to add to the store"
name: "pet"
in: "body"
required: true
schema: <
type: <
value: "object"
>
all_of: <
required: "id"
required: "name"
type: <
value: "object"
>
properties: <
additional_properties: <
name: "id"
value: <
format: "int64"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "name"
value: <
type: <
value: "string"
>
>
>
additional_properties: <
name: "tag"
value: <
type: <
value: "string"
>
>
>
>
>
all_of: <
required: "name"
properties: <
additional_properties: <
name: "description"
value: <
format: "int64"
type: <
value: "integer"
>
>
>
>
>
>
>
>
>
responses: <
response_code: <
name: "200"
value: <
response: <
description: "pet response"
schema: <
schema: <
required: "id"
required: "name"
type: <
value: "object"
>
properties: <
additional_properties: <
name: "id"
value: <
format: "int64"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "name"
value: <
type: <
value: "string"
>
>
>
additional_properties: <
name: "tag"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
response_code: <
name: "default"
value: <
response: <
description: "unexpected error"
schema: <
schema: <
required: "code"
required: "message"
type: <
value: "object"
>
properties: <
additional_properties: <
name: "code"
value: <
format: "int32"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "message"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
>
>
>
>
path: <
name: "/pets/{id}"
value: <
get: <
description: "Returns a user based on a single ID, if the user does not have access to the pet"
operation_id: "find pet by id"
parameters: <
parameter: <
non_body_parameter: <
path_parameter_sub_schema: <
required: true
in: "path"
description: "ID of pet to fetch"
name: "id"
type: "integer"
format: "int64"
>
>
>
>
responses: <
response_code: <
name: "200"
value: <
response: <
description: "pet response"
schema: <
schema: <
required: "id"
required: "name"
type: <
value: "object"
>
properties: <
additional_properties: <
name: "id"
value: <
format: "int64"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "name"
value: <
type: <
value: "string"
>
>
>
additional_properties: <
name: "tag"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
response_code: <
name: "default"
value: <
response: <
description: "unexpected error"
schema: <
schema: <
required: "code"
required: "message"
type: <
value: "object"
>
properties: <
additional_properties: <
name: "code"
value: <
format: "int32"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "message"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
>
>
delete: <
description: "deletes a single pet based on the ID supplied"
operation_id: "deletePet"
parameters: <
parameter: <
non_body_parameter: <
path_parameter_sub_schema: <
required: true
in: "path"
description: "ID of pet to delete"
name: "id"
type: "integer"
format: "int64"
>
>
>
>
responses: <
response_code: <
name: "204"
value: <
response: <
description: "pet deleted"
>
>
>
response_code: <
name: "default"
value: <
response: <
description: "unexpected error"
schema: <
schema: <
required: "code"
required: "message"
type: <
value: "object"
>
properties: <
additional_properties: <
name: "code"
value: <
format: "int32"
type: <
value: "integer"
>
>
>
additional_properties: <
name: "message"
value: <
type: <
value: "string"
>
>
>
>
>
>
>
>
>
>
>
>
>
>

View File

@@ -0,0 +1,268 @@
openapi: "3.0"
info: <
title: "OpenAPI Petstore"
license: <
name: "MIT"
>
version: "1.0.0"
>
servers: <
url: "https://petstore.openapis.org/v1"
description: "Development server"
>
paths: <
path: <
name: "/pets"
value: <
get: <
tags: "pets"
summary: "List all pets"
operation_id: "listPets"
parameters: <
parameter: <
name: "limit"
in: "query"
description: "How many items to return at one time (max 100)"
schema: <
schema: <
type: "integer"
format: "int32"
>
>
>
>
responses: <
default: <
response: <
description: "unexpected error"
content: <
additional_properties: <
name: "application/json"
value: <
schema: <
reference: <
_ref: "#/components/schemas/Error"
>
>
>
>
>
>
>
response_or_reference: <
name: "200"
value: <
response: <
description: "An paged array of pets"
headers: <
additional_properties: <
name: "x-next"
value: <
header: <
description: "A link to the next page of responses"
schema: <
schema: <
type: "string"
>
>
>
>
>
>
content: <
additional_properties: <
name: "application/json"
value: <
schema: <
reference: <
_ref: "#/components/schemas/Pets"
>
>
>
>
>
>
>
>
>
>
post: <
tags: "pets"
summary: "Create a pet"
operation_id: "createPets"
responses: <
default: <
response: <
description: "unexpected error"
content: <
additional_properties: <
name: "application/json"
value: <
schema: <
reference: <
_ref: "#/components/schemas/Error"
>
>
>
>
>
>
>
response_or_reference: <
name: "201"
value: <
response: <
description: "Null response"
>
>
>
>
>
>
>
path: <
name: "/pets/{petId}"
value: <
get: <
tags: "pets"
summary: "Info for a specific pet"
operation_id: "showPetById"
parameters: <
parameter: <
name: "petId"
in: "path"
description: "The id of the pet to retrieve"
required: true
schema: <
schema: <
type: "string"
>
>
>
>
responses: <
default: <
response: <
description: "unexpected error"
content: <
additional_properties: <
name: "application/json"
value: <
schema: <
reference: <
_ref: "#/components/schemas/Error"
>
>
>
>
>
>
>
response_or_reference: <
name: "200"
value: <
response: <
description: "Expected response to a valid request"
content: <
additional_properties: <
name: "application/json"
value: <
schema: <
reference: <
_ref: "#/components/schemas/Pets"
>
>
>
>
>
>
>
>
>
>
>
>
>
components: <
schemas: <
additional_properties: <
name: "Pet"
value: <
schema: <
required: "id"
required: "name"
properties: <
additional_properties: <
name: "id"
value: <
schema: <
type: "integer"
format: "int64"
>
>
>
additional_properties: <
name: "name"
value: <
schema: <
type: "string"
>
>
>
additional_properties: <
name: "tag"
value: <
schema: <
type: "string"
>
>
>
>
>
>
>
additional_properties: <
name: "Pets"
value: <
schema: <
type: "array"
items: <
schema_or_reference: <
reference: <
_ref: "#/components/schemas/Pet"
>
>
>
>
>
>
additional_properties: <
name: "Error"
value: <
schema: <
required: "code"
required: "message"
properties: <
additional_properties: <
name: "code"
value: <
schema: <
type: "integer"
format: "int32"
>
>
>
additional_properties: <
name: "message"
value: <
schema: <
type: "string"
>
>
>
>
>
>
>
>
>