Added connection documentation
MODIFY
src/assets/server/rest/v1/docs/e-mobility-oas.json
src/assets/server/rest/v1/docs/e-mobility-oas.json
{
"name": "Tags",
"description": "Tags API"
+ },
+ {
+ "name": "Connections",
+ "description": "Integration connection API"
}
],
"paths": {
}
}
}
+ },
+ "/api/connections": {
+ "get": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Get integration connections",
+ "parameters": [
+ {
+ "in": "query",
+ "name": "UserID",
+ "description": "User ID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
+ }
+ ],
+ "tags": [
+ "Connections"
+ ],
+ "responses": {
+ "200": {
+ "description": "Return connections list",
+ "content": {
+ "application/json": {
+ "example": {
+ "count": 1,
+ "result": [
+ {
+ "id": "###",
+ "connectorId": "###",
+ "createdAt": "###",
+ "validUntil": "###",
+ "lastChangedOn": "###",
+ "createdOn": "###",
+ "createdBy": {
+ "name": "###",
+ "firstName": "###"
+ },
+ "lastChangedBy": {
+ "name": "###",
+ "firstName": "###"
+ }
+ }
+ ]
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ }
+ }
+ },
+ "post": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Create an integration connection",
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "connectorId": {
+ "type": "number"
+ },
+ "userId": {
+ "type": "string"
+ },
+ "data": {
+ "type": "object"
+ }
+ }
+ }
+ }
+ }
+ },
+ "tags": [
+ "Connections"
+ ],
+ "responses": {
+ "200": {
+ "description": "Connection created successfully",
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "Success",
+ "id": "###"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ }
+ }
+ }
+ },
+ "/api/connections/{id}": {
+ "get": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Get integration connection",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/connectionID"
+ }
+ ],
+ "tags": [
+ "Connections"
+ ],
+ "responses": {
+ "200": {
+ "description": "Return connection",
+ "content": {
+ "application/json": {
+ "example": {
+ "id": "###",
+ "connectorId": "###",
+ "createdAt": "###",
+ "validUntil": "###",
+ "lastChangedOn": "###",
+ "createdOn": "###",
+ "createdBy": {
+ "name": "###",
+ "firstName": "###"
+ },
+ "lastChangedBy": {
+ "name": "###",
+ "firstName": "###"
+ }
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ },
+ "550": {
+ "$ref": "#/components/responses/ResourceDoesNotExists"
+ }
+ }
+ },
+ "delete": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Dlete an integration connection",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/connectionID"
+ }
+ ],
+ "tags": [
+ "Connections"
+ ],
+ "responses": {
+ "200": {
+ "description": "Connection successfully deleted",
+ "content": {
+ "application/json": {
+ "example": {
+ "status": "Success"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ },
+ "550": {
+ "$ref": "#/components/responses/ResourceDoesNotExists"
+ }
+ }
+ }
}
},
"components": {
"schema": {
"type": "boolean"
}
+ },
+ "connectionID": {
+ "in": "path",
+ "name": "id",
+ "description": "Connection ID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
}
}

MODIFY
src/assets/server/rest/v1/schemas/connections/connection-create.json
src/assets/server/rest/v1/schemas/connections/connection-create.json
"$ref": "chargingstation.json#/definitions/connector/properties/connectorId"
},
"userId": {
- "type": "user.json#/definitions/id"
+ "$ref": "user.json#/definitions/id"
},
"data": {
"type": "object",

MODIFY
src/types/Server.ts
src/types/Server.ts
@@ -524,7 +524,7 @@ export enum ServerRoute {
REST_TENANT = 'tenants/:id',
REST_CONNECTIONS = 'connections',
- REST_CONNECTION = 'connection/:id',
+ REST_CONNECTION = 'connections/:id',
// BILLING URLs for CRUD operations on PAYMENT METHODS
REST_BILLING_PAYMENT_METHODS = 'users/:userID/payment-methods',

Added connection documentation