Added OCPI endpoints documentation
MODIFY
src/assets/server/rest/v1/docs/e-mobility-oas.json
src/assets/server/rest/v1/docs/e-mobility-oas.json
}
},
"/api/ocpi/endpoints": {
- "get": {
+ "post": {
"security": [
{
"bearerAuth": []
}
],
- "description": "Retrieve a list of Companies",
- "parameters": [
- {
- "$ref": "#/components/parameters/Search"
- },
- {
- "$ref": "#/components/parameters/Issuer"
- },
- {
- "$ref": "#/components/parameters/WithSite"
- },
- {
- "in": "query",
- "name": "WithLogo",
- "description": "With Logo",
+ "description": "Create an OCPI Endpoint",
+ "tags": [
+ "OCPI"
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
"schema": {
- "type": "boolean"
+ "$ref": "#/components/schemas/OCPIEndpoint"
+ }
+ }
}
},
- {
- "$ref": "#/components/parameters/LocLongitude"
- },
- {
- "$ref": "#/components/parameters/LocLatitude"
- },
- {
- "$ref": "#/components/parameters/LocMaxDistanceMeters"
- },
- {
- "$ref": "#/components/parameters/Skip"
+ "responses": {
+ "201": {
+ "description": "OCPI Endpoint created successfully",
+ "content": {
+ "application/json": {
+ "example": {
+ "id": "###",
+ "status": "Success"
+ }
+ }
+ }
},
- {
- "$ref": "#/components/parameters/SortFields"
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
},
- {
- "$ref": "#/components/parameters/Limit"
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
},
- {
- "$ref": "#/components/parameters/OnlyRecordCount"
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ }
+ }
+ }
},
+ "/api/ocpi/endpoints/{id}/ping": {
+ "put": {
+ "security": [
{
- "$ref": "#/components/parameters/ProjectFields"
+ "bearerAuth": []
}
],
+ "description": "Ping an OCPI Endpoint",
"tags": [
- "Companies"
+ "OCPI"
],
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/OCPIEndpointID"
+ }
+ ],
+ "requestBody": {
+ "content": {
+ "application/json": {
+ "schema": {
+ "$ref": "#/components/schemas/OCPIEndpoint"
+ }
+ }
+ }
+ },
"responses": {
"200": {
- "description": "Return companies list",
+ "description": "OCPI Endpoint is reachable",
"content": {
"application/json": {
"example": {
- "count": 1,
- "result": [
- {
- "address": {
- "address1": "###",
- "address2": "###",
- "postalCode": "###",
- "city": "###",
- "country": "###",
- "coordinates": [
- 7.01692790000004,
- 43.6123063
- ]
- },
- "createdOn": "2018-03-30T22:29:08.388Z",
- "name": "###",
- "lastChangedOn": "2020-03-15T10:36:56.784Z",
- "issuer": true,
- "id": "###",
- "logo": "###",
- "canRead": true,
- "canDelete": true,
- "canUpdate": true
- }
- ]
+ "status": "Success",
+ "statusCode": 200,
+ "statusText": "OK"
}
}
}
"$ref": "#/components/responses/BackendError"
}
}
+ }
},
- "post": {
+ "/api/ocpi/endpoints/{id}/cdrs/check": {
+ "put": {
"security": [
{
"bearerAuth": []
}
],
- "description": "Create an OCPI Endpoint",
+ "description": "Check OCPI Endpoint's CDRs",
"tags": [
"OCPI"
],
- "requestBody": {
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/OCPIEndpointID"
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "OCPI Endpoint's CDRs checked",
"content": {
"application/json": {
- "schema": {
- "$ref": "#/components/schemas/OCPIEndpoint"
+ "example": {
+ "status": "Success"
}
}
}
},
+ "401": {
+ "$ref": "#/components/responses/UnauthorizedError"
+ },
+ "403": {
+ "$ref": "#/components/responses/ForbiddenError"
+ },
+ "500": {
+ "$ref": "#/components/responses/BackendError"
+ }
+ }
+ }
+ },
+ "/api/ocpi/endpoints/{id}/locations/check": {
+ "put": {
+ "security": [
+ {
+ "bearerAuth": []
+ }
+ ],
+ "description": "Check OCPI Endpoint's locations",
+ "tags": [
+ "OCPI"
+ ],
+ "parameters": [
+ {
+ "$ref": "#/components/parameters/OCPIEndpointID"
+ }
+ ],
"responses": {
- "201": {
- "description": "OCPI Endpoint created successfully",
+ "200": {
+ "description": "OCPI Endpoint's locations checked",
"content": {
"application/json": {
"example": {
- "id": "###",
"status": "Success"
}
}
},
"OCPIEndpoint": {
"type": "object",
+ "required": [
+ "name",
+ "role",
+ "baseUrl",
+ "localToken",
+ "token"
+ ],
"properties": {
"id": {
- "type": "string"
+ "type": "string",
+ "readOnly": true
},
"name": {
"type": "string"
"schema": {
"type": "string"
}
+ },
+ "OCPIEndpointID": {
+ "in": "path",
+ "name": "id",
+ "description": "OCPI Endpoint ID",
+ "required": true,
+ "schema": {
+ "type": "string"
+ }
}
}
}

Added OCPI endpoints documentation