diff options
author | luxin <luxin7@huawei.com> | 2018-03-28 18:01:16 +0800 |
---|---|---|
committer | luxin <luxin7@huawei.com> | 2018-03-28 18:01:16 +0800 |
commit | 4c695766b962fccefdcd6383e276796e9dc3ebb6 (patch) | |
tree | 1286e57544931c0c26615352041cc7ea26088310 /service/src/main/resources | |
parent | a47a9c1f6a65deb36b5ed8918ddafcb003948230 (diff) |
Modify swagger for CSIT
Change-Id: I2af32cc7a541f2ca483252d1fcbe067c8eaf3f0b
Issue-ID: VFC-644
Signed-off-by: luxin <luxin7@huawei.com>
Diffstat (limited to 'service/src/main/resources')
-rw-r--r-- | service/src/main/resources/swagger.json | 195 |
1 files changed, 195 insertions, 0 deletions
diff --git a/service/src/main/resources/swagger.json b/service/src/main/resources/swagger.json new file mode 100644 index 0000000..9a1bf31 --- /dev/null +++ b/service/src/main/resources/swagger.json @@ -0,0 +1,195 @@ +{ + "swagger": "2.0", + "info": { + "title": "Multivimproxy API", + "description": "Multivimproxy API", + "version": "1.0.0" + }, + "tags": [ + { + "name": "Multivimproxy services" + } + ], + "basePath": "/api/multivimproxy/v1", + "paths": { + "/v3/auth/tokens": { + "post": { + "summary": "Password authentication", + "description": "Password authentication", + "consumes": [ + "application/json" + ], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "onap", + "in": "body", + "description": "Authentication info", + "required": true, + "schema": { + "$ref": "#/definitions/AuthInfo" + } + } + ], + "responses": { + "201": { + "description": "Resource was created and is ready to use.", + "schema": { + "$ref": "#/definitions/tokens" + } + }, + "401": { + "description": "User must authenticate before making a request." + }, + "404": { + "description": "The requested resource could not be found." + }, + "500": { + "description": "Failed to process the request", + "schema": { + "$ref": "#/definitions/Error" + } + } + } + } + } + }, + "definitions": { + "AuthInfo": { + "type": "object", + "description": "Authentication info.", + "required": [ + "auth" + ], + "properties": { + "auth": { + "$ref": "#/definitions/auth" + } + } + }, + "auth": { + "type": "object", + "description": "Authentication info.", + "required": [ + "identity" + ], + "properties": { + "identity": { + "$ref": "#/definitions/identity" + } + } + }, + "identity": { + "type": "object", + "description": "Authentication info.", + "required": [ + "methods", + "password" + ], + "properties": { + "methods": { + "type": "array", + "items": { + "type": "string" + } + }, + "password": { + "$ref": "#/definitions/user" + } + } + }, + "user": { + "type": "object", + "description": "Authentication info.", + "required": [ + "name", + "domain", + "password" + ], + "properties": { + "name": { + "type": "string" + }, + "domain": { + "$ref": "#/definitions/domain" + }, + "password": { + "type": "string" + } + } + }, + "domain": { + "type": "object", + "description": "Authentication info.", + "required": [ + "name" + ], + "properties": { + "name": { + "type": "string" + } + } + }, + "tokens": { + "type": "object", + "description": "Tokens info.", + "required": [ + "token" + ], + "properties": { + "auth": { + "$ref": "#/definitions/token" + } + } + }, + "token": { + "type": "object", + "description": "Tokens info.", + "required": [ + "methods", + "user" + ], + "properties": { + "methods": { + "type": "array", + "items": { + "type": "string" + } + }, + "user": { + "$ref": "#/definitions/users" + } + } + }, + "users": { + "type": "object", + "description": "Tokens info.", + "required": [ + "id", + "name" + ], + "properties": { + "id": { + "type": "string" + }, + "name": { + "type": "string" + } + } + }, + "Error": { + "type": "object", + "properties": { + "code": { + "type": "integer", + "format": "int32" + }, + "message": { + "type": "string" + } + } + } + } +}
\ No newline at end of file |