From 4c695766b962fccefdcd6383e276796e9dc3ebb6 Mon Sep 17 00:00:00 2001 From: luxin Date: Wed, 28 Mar 2018 18:01:16 +0800 Subject: Modify swagger for CSIT Change-Id: I2af32cc7a541f2ca483252d1fcbe067c8eaf3f0b Issue-ID: VFC-644 Signed-off-by: luxin --- service/src/main/resources/swagger.json | 195 ++++++++++++++++++++++++++++++++ 1 file changed, 195 insertions(+) create mode 100644 service/src/main/resources/swagger.json (limited to 'service/src/main/resources') 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 -- cgit 1.2.3-korg