Appendix: Extended Definition of Swagger for Custom Backends
Overview
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, which is a character string encoded using Base64. The actual script needs to be decoded using Base64. |
|
result |
Yes |
String |
Return object. The execution result of the statement will be encapsulated in the object and returned. This parameter is valid only for data backends, not function backends. |
|
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. |
Last Article: Adding Public Configurations for a Custom Backend
Next Article: Control Policy Management
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.