Appendix: Extended Definition of Swagger for Custom Backends
On the basis of the basic Swagger definition, ROMA Connect defines the extended definition of APIs, such as the authentication mode and function script definition. This section describes the extended definitions of custom backends.
1: x-livedata-auth-type
Meaning: Swagger-based apiKey authentication format, which defines an authentication mode provided by the custom backend.
Scope of effect: Security Scheme Object
Example
securityDefinitions: customize-name-signature: type: "apiKey" name: "Authorization" in: "header" x-livedata-auth-type: "SIGNATURE" x-livedata-signature: key: "signatureKey" secret: "signatureSecret"
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
type |
Yes |
String |
Authentication type. Only apiKey is supported. |
name |
Yes |
String |
Name of the parameter used for authentication. Set this parameter to Authorization. |
in |
Yes |
String |
Location of the parameter. Only header is supported. |
description |
No |
String |
Description of the parameter. |
x-livedata-auth-type |
Yes |
String |
Custom backend authentication mode. The value can only be SIGNATURE. |
x-livedata-signature.key |
No |
String |
Key required for signature. |
x-livedata-signature.secret |
No |
String |
Secret required for signature. |
2: x-livedata-version
Meaning: Version number of the custom backend.
Scope of effect: Operation Object
Example
paths: '/path': get: x-livedata-version: '1.0.1'
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-livedata-version |
Yes |
String |
API version. |
3: x-livedata-status
Meaning: Custom backend status.
Scope of effect: Operation Object
Example
paths: '/path': get: x-livedata-status: 'DESIGNED'
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-livedata-status |
Yes |
String |
Status of the custom backend. The options are DESIGNED, DEVELOPED, TESTED, and DEPLOYED.
|
4: x-livedata-roma-app
Meaning: Integration application bound to the custom backend.
Scope of effect: Operation Object
Example
paths: '/path': get: x-livedata-roma-app: 'romaAppName'
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
x-livedata-roma-app |
Yes |
String |
Integration application bound to the custom backend. |
5: x-livedata-scripts
Meaning: Script of the custom backend definition.
Scope of effect: Operation Object
Example
paths: '/path': get: produces: - "application/json" responses: default: description: "default response" x-livedata-scripts: - type: "function" content: "custom-script-content" result: "func"
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
content |
Yes |
String |
Script statement. |
result |
Yes |
String |
Response. |
type |
Yes |
String |
Script type. The options are Function, SQL, and SP. |
datasources |
No |
Data source definition. |
5.1 x-livedata-scripts.datasources
Meaning: data source definition of the custom backend.
Scope of effect: x-livedata-scripts
Example
paths: '/users': get: produces: - "application/json" responses: default: description: "default response" x-livedata-scripts: - type: "function" content: "custom-script-content" result: "custom-script-result" datasource: name: "custom-datasource-name"
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
name |
Yes |
String |
Data source name. |
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot