Added settings getMany/getOne/create doc
MODIFY
src/assets/server/rest/v1/docs/e-mobility-oas.json
src/assets/server/rest/v1/docs/e-mobility-oas.json
{
"name": "OCPI",
"description": "OCPI API"
+ },
+ {
+ "name": "Settings",
+ "description": "Settings API"
}
],
"paths": {
}
}
},
- "/api/assets/{id}/consumptions": {
- "post": {
- "security": [
- {
- "bearerAuth": []
- }
- ],
- "description": "Push latest asset consumption",
- "parameters": [
- {
- "$ref": "#/components/parameters/assetID"
- }
- ],
- "tags": [
- "Assets"
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/AssetConsumption"
- }
- }
- }
- },
- "responses": {
- "201": {
- "description": "Asset consumption created successfully",
- "content": {
- "application/json": {
- "example": {
- "consumption": "###",
- "status": "Success"
- }
- }
- }
- },
- "401": {
- "$ref": "#/components/responses/UnauthorizedError"
- },
- "403": {
- "$ref": "#/components/responses/ForbiddenError"
- },
- "500": {
- "$ref": "#/components/responses/BackendError"
- },
- "550": {
- "description": "Asset does not exist"
- }
- }
- }
- },
"/api/charging-profiles": {
"get": {
"security": [
}
}
}
+ },
+ "/api/settings": {
+ "get": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Retrieve a list of Settings",
+ "parameters": [
+ {
+ "in": "query",
+ "name": "Identifier",
+ "description": "Setting Identifier",
+ "schema": {
+ "type": "string"
+ }
+ },
+ {
+ "$ref": "#/components/parameters/Search"
+ },
+ {
+ "$ref": "#/components/parameters/Skip"
+ },
+ {
+ "$ref": "#/components/parameters/SortFields"
+ },
+ {
+ "$ref": "#/components/parameters/Limit"
+ },
+ {
+ "$ref": "#/components/parameters/OnlyRecordCount"
+ },
+ {
+ "$ref": "#/components/parameters/ProjectFields"
+ }
+ ],
+ "tags": [
+ "Settings"
+ ],
+ "responses": {
+ "200": {
+ "description": "Return Settings list",
+ "content": {
+ "application/json": {
+ "example": {
+ "count": 1,
+ "result": [
+ {
+ "backupSensitiveData": null,
+ "content": {
+ "type": "crypto",
+ "crypto": {
+ "key": "###",
+ "keyProperties": {
+ "blockCypher": "aes",
+ "blockSize": 256,
+ "operationMode": "gcm"
+ }
+ }
+ },
+ "createdBy": null,
+ "identifier": "crypto",
+ "lastChangedBy": null,
+ "lastChangedOn": "2021-11-09T13:30:47.173Z",
+ "sensitiveData": null,
+ "id": "###"
+ }
+ ]
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ }
+ }
+ },
+ "post": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Create a Setting",
+ "tags": [
+ "Settings"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/Setting"
+ }
+ }
+ }
+ },
+ "responses": {
+ "201": {
+ "description": "Setting created successfully",
+ "content": {
+ "application/json": {
+ "example": {
+ "id": "###",
+ "status": "Success"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ }
+ }
+ }
+ },
+ "/api/settings/{id}": {
+ "get": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Retrieve a Setting",
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/SettingID"
+ }
+ ],
+ "tags": [
+ "Settings"
+ ],
+ "responses": {
+ "200": {
+ "description": "Return Setting",
+ "content": {
+ "application/json": {
+ "example": {
+ "backupSensitiveData": null,
+ "content": {
+ "type": "crypto",
+ "crypto": {
+ "key": "###",
+ "keyProperties": {
+ "blockCypher": "aes",
+ "blockSize": 256,
+ "operationMode": "gcm"
+ }
+ }
+ },
+ "createdBy": null,
+ "identifier": "crypto",
+ "lastChangedBy": null,
+ "lastChangedOn": "2021-11-09T13:30:47.173Z",
+ "sensitiveData": null,
+ "id": "###"
+ }
+ }
+ }
+ },
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ },
+ "550": {
+ "$ref": "#/components/responses/ResourceDoesNotExists"
+ }
+ }
+ }
}
},
"components": {
"type": "boolean"
}
}
- }
},
- "parameters": {
- "Limit": {
- "in": "query",
- "name": "Limit",
- "description": "Limit the number of records",
- "example": 100,
- "required": false,
- "schema": {
- "type": "integer"
- }
+ "Setting": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "readOnly": true
},
- "Skip": {
- "in": "query",
- "name": "Skip",
- "description": "Skip number of records",
- "example": 0,
- "required": false,
- "schema": {
- "type": "integer"
- }
+ "identifier": {
+ "type": "string"
},
- "SortFields": {
- "in": "query",
- "name": "SortFields",
- "description": "Sorted fields",
- "example": "id",
- "required": false,
- "schema": {
+ "sensitiveData": {
+ "type": "array",
+ "items": {
"type": "string"
}
},
- "ProjectFields": {
- "in": "query",
- "name": "ProjectFields",
- "description": "Pipe separated projected fields",
- "example": "",
- "required": false,
- "schema": {
+ "content": {
+ "type": "object",
+ "properties": {
+ "type": {
"type": "string"
- }
},
- "Search": {
- "in": "query",
- "name": "Search",
- "description": "Search",
- "required": false,
- "schema": {
+ "links": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string"
- }
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "role": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ }
+ }
+ }
+ },
+ "sac": {
+ "type": "object",
+ "properties": {
+ "mainUrl": {
+ "type": "string"
+ },
+ "timezone": {
+ "type": "string"
+ }
+ }
+ },
+ "ocpi": {
+ "type": "object",
+ "properties": {
+ "businessDetails": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "website": {
+ "type": "string"
+ },
+ "logo": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "thumbnail": {
+ "type": "string"
+ },
+ "category": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "width": {
+ "type": "number"
+ },
+ "height": {
+ "type": "number"
+ }
+ }
+ }
+ }
+ },
+ "cpo": {
+ "type": "object",
+ "properties": {
+ "countryCode": {
+ "type": "string"
+ },
+ "partyID": {
+ "type": "string"
+ }
+ }
+ },
+ "emsp": {
+ "type": "object",
+ "properties": {
+ "countryCode": {
+ "type": "string"
+ },
+ "partyID": {
+ "type": "string"
+ }
+ }
+ },
+ "currency": {
+ "type": "string"
+ }
+ }
+ },
+ "oicp": {
+ "type": "object",
+ "properties": {
+ "businessDetails": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string"
+ },
+ "website": {
+ "type": "string"
+ },
+ "logo": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "thumbnail": {
+ "type": "string"
+ },
+ "category": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "width": {
+ "type": "number"
+ },
+ "height": {
+ "type": "number"
+ }
+ }
+ }
+ }
+ },
+ "cpo": {
+ "type": "object",
+ "properties": {
+ "countryCode": {
+ "type": "string"
+ },
+ "partyID": {
+ "type": "string"
+ },
+ "key": {
+ "type": "string"
+ },
+ "cert": {
+ "type": "string"
+ }
+ }
+ },
+ "emsp": {
+ "type": "object",
+ "properties": {
+ "countryCode": {
+ "type": "string"
+ },
+ "partyID": {
+ "type": "string"
+ },
+ "key": {
+ "type": "string"
+ },
+ "cert": {
+ "type": "string"
+ }
+ }
+ },
+ "currency": {
+ "type": "string"
+ }
+ }
+ },
+ "concur": {
+ "type": "object",
+ "properties": {
+ "authenticationUrl": {
+ "type": "string"
+ },
+ "apiUrl": {
+ "type": "string"
+ },
+ "appUrl": {
+ "type": "string"
+ },
+ "clientId": {
+ "type": "string"
+ },
+ "clientSecret": {
+ "type": "string"
+ },
+ "paymentTypeId": {
+ "type": "string"
+ },
+ "expenseTypeCode": {
+ "type": "string"
+ },
+ "policyId": {
+ "type": "string"
+ },
+ "reportName": {
+ "type": "string"
+ }
+ }
+ },
+ "convergentCharging": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "chargeableItemName": {
+ "type": "string"
+ },
+ "user": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ }
+ },
+ "simple": {
+ "type": "object",
+ "properties": {
+ "price": {
+ "type": "number"
+ },
+ "currency": {
+ "type": "string"
+ }
+ }
+ },
+ "billing": {
+ "type": "object",
+ "properties": {
+ "isTransactionBillingActivated": {
+ "type": "boolean"
+ },
+ "immediateBillingAllowed": {
+ "type": "boolean"
+ },
+ "periodicBillingAllowed": {
+ "type": "boolean"
+ },
+ "taxID": {
+ "type": "string"
+ }
+ }
+ },
+ "stripe": {
+ "type": "object",
+ "properties": {
+ "url": {
+ "type": "string"
+ },
+ "secretKey": {
+ "type": "string"
+ },
+ "publicKey": {
+ "type": "string"
+ }
+ }
+ },
+ "sapSmartCharging": {
+ "type": "object",
+ "properties": {
+ "optimizerUrl": {
+ "type": "string"
+ },
+ "user": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ },
+ "stickyLimitation": {
+ "type": "boolean"
+ },
+ "limitBufferDC": {
+ "type": "number"
+ },
+ "limitBufferAC": {
+ "type": "number"
+ }
+ }
+ },
+ "asset": {
+ "type": "object",
+ "properties": {
+ "connections": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "url": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "refreshIntervalMins": {
+ "type": "string"
+ },
+ "schneiderConnection": {
+ "type": "object",
+ "properties": {
+ "user": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ }
+ },
+ "greenComConnection": {
+ "type": "object",
+ "properties": {
+ "clientId": {
+ "type": "string"
+ },
+ "clientSecret": {
+ "type": "string"
+ }
+ }
+ },
+ "iothinkConnection": {
+ "type": "object",
+ "properties": {
+ "user": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ }
+ },
+ "witConnection": {
+ "type": "object",
+ "properties": {
+ "authenticationUrl": {
+ "type": "string"
+ },
+ "clientId": {
+ "type": "string"
+ },
+ "clientSecret": {
+ "type": "string"
+ },
+ "user": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ }
+ },
+ "lacroix": {
+ "type": "object",
+ "properties": {
+ "user": {
+ "type": "string"
+ },
+ "password": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "carConnector": {
+ "type": "object",
+ "properties": {
+ "connections": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string"
+ },
+ "name": {
+ "type": "string"
+ },
+ "description": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "mercedesConnection": {
+ "type": "object",
+ "properties": {
+ "authenticationUrl": {
+ "type": "string"
+ },
+ "apiUrl": {
+ "type": "string"
+ },
+ "clientId": {
+ "type": "string"
+ },
+ "clientSecret": {
+ "type": "string"
+ }
+ }
+ },
+ "tronityConnection": {
+ "type": "object",
+ "properties": {
+ "apiUrl": {
+ "type": "string"
+ },
+ "clientId": {
+ "type": "string"
+ },
+ "clientSecret": {
+ "type": "string"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "crypto": {
+ "type": "object",
+ "properties": {
+ "key": {
+ "type": "string"
+ },
+ "keyProperties": {
+ "type": "object",
+ "properties": {
+ "blockCypher": {
+ "type": "string"
+ },
+ "blockSize": {
+ "type": "number"
+ },
+ "operationMode": {
+ "type": "number"
+ }
+ }
+ },
+ "formerKey": {
+ "type": "string"
+ },
+ "formerKeyProperties": {
+ "type": "object",
+ "properties": {
+ "blockCypher": {
+ "type": "string"
+ },
+ "blockSize": {
+ "type": "number"
+ },
+ "operationMode": {
+ "type": "number"
+ }
+ }
+ }
+ }
+ },
+ "user": {
+ "type": "object",
+ "properties": {
+ "autoActivateAccountAfterValidation": {
+ "type": "boolean"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "parameters": {
+ "Limit": {
+ "in": "query",
+ "name": "Limit",
+ "description": "Limit the number of records",
+ "example": 100,
+ "required": false,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "Skip": {
+ "in": "query",
+ "name": "Skip",
+ "description": "Skip number of records",
+ "example": 0,
+ "required": false,
+ "schema": {
+ "type": "integer"
+ }
+ },
+ "SortFields": {
+ "in": "query",
+ "name": "SortFields",
+ "description": "Sorted fields",
+ "example": "id",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "ProjectFields": {
+ "in": "query",
+ "name": "ProjectFields",
+ "description": "Pipe separated projected fields",
+ "example": "",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
+ },
+ "Search": {
+ "in": "query",
+ "name": "Search",
+ "description": "Search",
+ "required": false,
+ "schema": {
+ "type": "string"
+ }
},
"ErrorTypes": {
"in": "query",
"schema": {
"type": "string"
}
+ },
+ "SettingID": {
+ "in": "path",
+ "name": "id",
+ "description": "Setting ID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
}
}

Added settings getMany/getOne/create doc