This repository has been archived by the owner on Jun 30, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
300 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
251 changes: 251 additions & 0 deletions
251
...rc/test/resources/com/google/api/server/spi/swagger/foo_with_description_endpoint.swagger
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,251 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"version": "1.0.0", | ||
"title": "swagger-test.appspot.com" | ||
}, | ||
"host": "swagger-test.appspot.com", | ||
"basePath": "/api", | ||
"schemes": [ | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/foo/v1/foos": { | ||
"get": { | ||
"description": "list desc", | ||
"operationId": "FooListFoos", | ||
"parameters": [ | ||
{ | ||
"name": "n", | ||
"in": "query", | ||
"required": true, | ||
"type": "integer", | ||
"format": "int32" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "A successful response", | ||
"schema": { | ||
"$ref": "#/definitions/CollectionResponse_FooDescription" | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"google_id_token-3a26ea04": [] | ||
}, | ||
{ | ||
"google_id_token_https-3a26ea04": [] | ||
} | ||
] | ||
}, | ||
"post": { | ||
"operationId": "FooToplevel", | ||
"parameters": [], | ||
"responses": { | ||
"200": { | ||
"description": "A successful response", | ||
"schema": { | ||
"$ref": "#/definitions/CollectionResponse_FooDescription" | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"google_id_token-3a26ea04": [] | ||
}, | ||
{ | ||
"google_id_token_https-3a26ea04": [] | ||
} | ||
] | ||
} | ||
}, | ||
"/foo/v1/foos/{id}": { | ||
"get": { | ||
"description": "get desc", | ||
"operationId": "FooGetFoo", | ||
"parameters": [ | ||
{ | ||
"name": "id", | ||
"in": "path", | ||
"description": "id desc", | ||
"required": true, | ||
"type": "string" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "A successful response", | ||
"schema": { | ||
"$ref": "#/definitions/FooDescription" | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"google_id_token-3a26ea04": [] | ||
}, | ||
{ | ||
"google_id_token_https-3a26ea04": [] | ||
} | ||
] | ||
}, | ||
"post": { | ||
"description": "update desc", | ||
"operationId": "FooUpdateFoo", | ||
"parameters": [ | ||
{ | ||
"name": "id", | ||
"in": "path", | ||
"description": "id desc", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"in": "body", | ||
"name": "body", | ||
"required": false, | ||
"schema": { | ||
"$ref": "#/definitions/FooDescription" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "A successful response", | ||
"schema": { | ||
"$ref": "#/definitions/FooDescription" | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"google_id_token-3a26ea04": [] | ||
}, | ||
{ | ||
"google_id_token_https-3a26ea04": [] | ||
} | ||
] | ||
}, | ||
"put": { | ||
"description": "create desc", | ||
"operationId": "FooCreateFoo", | ||
"parameters": [ | ||
{ | ||
"name": "id", | ||
"in": "path", | ||
"description": "id desc", | ||
"required": true, | ||
"type": "string" | ||
}, | ||
{ | ||
"in": "body", | ||
"name": "body", | ||
"required": false, | ||
"schema": { | ||
"$ref": "#/definitions/FooDescription" | ||
} | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "A successful response", | ||
"schema": { | ||
"$ref": "#/definitions/FooDescription" | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"google_id_token-3a26ea04": [] | ||
}, | ||
{ | ||
"google_id_token_https-3a26ea04": [] | ||
} | ||
] | ||
}, | ||
"delete": { | ||
"description": "delete desc", | ||
"operationId": "FooDeleteFoo", | ||
"parameters": [ | ||
{ | ||
"name": "id", | ||
"in": "path", | ||
"description": "id desc", | ||
"required": true, | ||
"type": "string" | ||
} | ||
], | ||
"responses": { | ||
"200": { | ||
"description": "A successful response", | ||
"schema": { | ||
"$ref": "#/definitions/FooDescription" | ||
} | ||
} | ||
}, | ||
"security": [ | ||
{ | ||
"google_id_token-3a26ea04": [] | ||
}, | ||
{ | ||
"google_id_token_https-3a26ea04": [] | ||
} | ||
] | ||
} | ||
} | ||
}, | ||
"securityDefinitions": { | ||
"google_id_token-3a26ea04": { | ||
"type": "oauth2", | ||
"authorizationUrl": "", | ||
"flow": "implicit", | ||
"x-google-issuer": "accounts.google.com", | ||
"x-google-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs", | ||
"x-google-audiences": "audience" | ||
}, | ||
"google_id_token_https-3a26ea04": { | ||
"type": "oauth2", | ||
"authorizationUrl": "", | ||
"flow": "implicit", | ||
"x-google-issuer": "https://accounts.google.com", | ||
"x-google-jwks_uri": "https://www.googleapis.com/oauth2/v1/certs", | ||
"x-google-audiences": "audience" | ||
} | ||
}, | ||
"definitions": { | ||
"CollectionResponse_FooDescription": { | ||
"properties": { | ||
"items": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/FooDescription" | ||
} | ||
}, | ||
"nextPageToken": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"FooDescription": { | ||
"properties": { | ||
"name": { | ||
"description": "description of name", | ||
"type": "string" | ||
}, | ||
"value": { | ||
"type": "integer", | ||
"format": "int32", | ||
"description": "description of value" | ||
} | ||
} | ||
} | ||
} | ||
} |