{ "swagger": "2.0", "info": { "description": "An KubeVela API.", "title": "KubeVela API", "contact": {}, "version": "0.0.1" }, "basePath": "/api", "paths": { "/envs/": { "get": { "consumes": [ "application/json" ], "produces": [ "application/json" ], "tags": [ "environments" ], "operationId": "listEnvironments", "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "array", "items": { "$ref": "#/definitions/apis.Environment" } } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "string" } } } ] } } } }, "post": { "tags": [ "environments" ], "operationId": "createEnvironment", "parameters": [ { "description": "body", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/apis.Environment" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "string" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "string" } } } ] } } } } }, "/envs/{envName}": { "get": { "tags": [ "environments" ], "operationId": "getEnvironment", "parameters": [ { "type": "string", "description": "envName", "name": "envName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "array", "items": { "$ref": "#/definitions/apis.Environment" } } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "string" } } } ] } } } }, "put": { "tags": [ "environments" ], "operationId": "updateEnvironment", "parameters": [ { "type": "string", "description": "envName", "name": "envName", "in": "path", "required": true }, { "description": "envName", "name": "body", "in": "body", "required": true, "schema": { "$ref": "#/definitions/apis.EnvironmentBody" } } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "string" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "string" } } } ] } } } }, "delete": { "tags": [ "environments" ], "operationId": "deleteEnvironment", "parameters": [ { "type": "string", "description": "envName", "name": "envName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "string" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "string" } } } ] } } } }, "patch": { "tags": [ "environments" ], "operationId": "setEnvironment", "parameters": [ { "type": "string", "description": "envName", "name": "envName", "in": "path", "required": true } ], "responses": { "200": { "description": "OK", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "string" } } } ] } }, "500": { "description": "Internal Server Error", "schema": { "allOf": [ { "$ref": "#/definitions/apis.Response" }, { "type": "object", "properties": { "code": { "type": "integer" }, "data": { "type": "string" } } } ] } } } } } }, "definitions": { "apis.Environment": { "type": "object", "required": [ "envName", "namespace" ], "properties": { "current": { "type": "string" }, "domain": { "type": "string" }, "email": { "type": "string" }, "envName": { "type": "string" }, "namespace": { "type": "string" } } }, "apis.EnvironmentBody": { "type": "object", "required": [ "namespace" ], "properties": { "namespace": { "type": "string" } } }, "apis.Response": { "type": "object", "properties": { "code": { "type": "integer" } } } } }