diff --git a/openapi.yaml b/openapi.yaml index ce0b5680..a355d4f6 100644 --- a/openapi.yaml +++ b/openapi.yaml @@ -8640,6 +8640,30 @@ paths: application/json: schema: $ref: '#/components/schemas/WorkfeedConfigListResponse' + examples: + default: + summary: Workfeed module configuration + value: + success: true + data: + - module: workfeed + variable: enabled + type: bool + value: true + - module: workfeed + variable: api_url + type: string + value: https://api.workfeed.io + - module: workfeed + variable: api_key + type: string + value: wf_live_xxxxxxxxxxxxxxxxx + - module: workfeed + variable: CompanyID + type: string + value: "123456" + meta: [] + includes: [] post: tags: [Config] summary: Update Workfeed config @@ -10106,18 +10130,56 @@ components: - type: string required: [module, variable, type, value] - WorkfeedConfigEntry: + WorkfeedConfigEnabledEntry: type: object properties: module: { type: string, enum: [workfeed] } - variable: { type: string, enum: [enabled, api_url, api_key] } - type: { type: string, enum: [bool, string] } - value: - oneOf: - - type: boolean - - type: string + variable: { type: string, enum: [enabled] } + type: { type: string, enum: [bool] } + value: { type: boolean } required: [module, variable, type, value] + WorkfeedConfigApiUrlEntry: + type: object + properties: + module: { type: string, enum: [workfeed] } + variable: { type: string, enum: [api_url] } + type: { type: string, enum: [string] } + value: { type: string, example: "https://api.workfeed.io" } + required: [module, variable, type, value] + + WorkfeedConfigApiKeyEntry: + type: object + properties: + module: { type: string, enum: [workfeed] } + variable: { type: string, enum: [api_key] } + type: { type: string, enum: [string] } + value: { type: string, example: "wf_live_xxxxxxxxxxxxxxxxx" } + required: [module, variable, type, value] + + WorkfeedConfigCompanyIdEntry: + type: object + properties: + module: { type: string, enum: [workfeed] } + variable: { type: string, enum: [CompanyID] } + type: { type: string, enum: [string] } + value: { type: string, example: "123456" } + required: [module, variable, type, value] + + WorkfeedConfigEntry: + oneOf: + - $ref: '#/components/schemas/WorkfeedConfigEnabledEntry' + - $ref: '#/components/schemas/WorkfeedConfigApiUrlEntry' + - $ref: '#/components/schemas/WorkfeedConfigApiKeyEntry' + - $ref: '#/components/schemas/WorkfeedConfigCompanyIdEntry' + discriminator: + propertyName: variable + mapping: + enabled: '#/components/schemas/WorkfeedConfigEnabledEntry' + api_url: '#/components/schemas/WorkfeedConfigApiUrlEntry' + api_key: '#/components/schemas/WorkfeedConfigApiKeyEntry' + CompanyID: '#/components/schemas/WorkfeedConfigCompanyIdEntry' + GatewayApiConfigEntry: type: object properties: @@ -10319,6 +10381,27 @@ components: properties: data: { type: array, items: { $ref: '#/components/schemas/WorkfeedConfigEntry' } } required: [data] + example: + success: true + data: + - module: workfeed + variable: enabled + type: bool + value: true + - module: workfeed + variable: api_url + type: string + value: https://api.workfeed.io + - module: workfeed + variable: api_key + type: string + value: wf_live_xxxxxxxxxxxxxxxxx + - module: workfeed + variable: CompanyID + type: string + value: "123456" + meta: [] + includes: [] GatewayApiConfigListResponse: allOf: