优化
This commit is contained in:
@@ -60,7 +60,7 @@ paths:
|
||||
- {$ref: '#/components/parameters/Size'}
|
||||
- {name: templateCode, in: query, schema: {type: string, maxLength: 64}}
|
||||
- {name: category, in: query, schema: {type: string, maxLength: 64}}
|
||||
- {name: title, in: query, description: Fuzzy match template name or title template, schema: {type: string, maxLength: 128}}
|
||||
- {name: title, in: query, description: 'Fuzzy match template name or title template', schema: {type: string, maxLength: 128}}
|
||||
- {name: status, in: query, schema: {type: string, enum: [DRAFT, ACTIVE, DISABLED]}}
|
||||
responses: {'200': {$ref: '#/components/responses/TemplatePage'}}
|
||||
post:
|
||||
@@ -92,7 +92,7 @@ paths:
|
||||
- {$ref: '#/components/parameters/Size'}
|
||||
- {name: taskNo, in: query, schema: {type: string, maxLength: 64}}
|
||||
- {name: category, in: query, schema: {type: string, maxLength: 64}}
|
||||
- {name: title, in: query, description: Fuzzy match rendered title, schema: {type: string, maxLength: 128}}
|
||||
- {name: title, in: query, description: 'Fuzzy match rendered title', schema: {type: string, maxLength: 128}}
|
||||
- {name: status, in: query, schema: {type: string, enum: [CREATED, SCHEDULED, DISPATCHING, RETRYING, SENT, DEAD, CANCELLED]}}
|
||||
responses: {'200': {$ref: '#/components/responses/TaskPage'}}
|
||||
/platform/v1/notification-tasks/{id}:
|
||||
@@ -145,17 +145,27 @@ components:
|
||||
tenantId: {type: integer, format: int64, minimum: 0}
|
||||
templateCode: {type: string, maxLength: 64}
|
||||
recipientType: {type: string, enum: [USER, MEMBERSHIP, TENANT_ROLE, TENANT_ALL, PLATFORM_ROLE]}
|
||||
recipientIds: {type: array, maxItems: 1000, items: {type: integer, format: int64}, description: Required for USER or MEMBERSHIP; forbidden for role/all recipient types.}
|
||||
roleCode: {type: string, maxLength: 64, description: Required for TENANT_ROLE or PLATFORM_ROLE; forbidden otherwise.}
|
||||
recipientIds: {type: array, minItems: 1, maxItems: 1000, items: {type: integer, format: int64}, description: Required for USER or MEMBERSHIP; forbidden for role/all recipient types.}
|
||||
roleCode: {type: string, minLength: 1, maxLength: 64, description: Required for TENANT_ROLE or PLATFORM_ROLE; forbidden otherwise.}
|
||||
variables: {type: object, maxProperties: 32, additionalProperties: {type: string, maxLength: 2000}}
|
||||
scheduledAt: {type: string, format: date-time, nullable: true}
|
||||
idempotencyKey: {type: string, minLength: 8, maxLength: 128}
|
||||
sourceEventId: {type: string, maxLength: 128, nullable: true}
|
||||
allOf:
|
||||
- if: {properties: {recipientType: {enum: [USER, MEMBERSHIP]}}}
|
||||
then: {required: [recipientIds]}
|
||||
- if: {properties: {recipientType: {enum: [TENANT_ROLE, PLATFORM_ROLE]}}}
|
||||
then: {required: [roleCode]}
|
||||
oneOf:
|
||||
- required: [recipientIds]
|
||||
properties:
|
||||
recipientType: {type: string, enum: [USER, MEMBERSHIP]}
|
||||
not: {required: [roleCode]}
|
||||
- required: [roleCode]
|
||||
properties:
|
||||
recipientType: {type: string, enum: [TENANT_ROLE, PLATFORM_ROLE]}
|
||||
not: {required: [recipientIds]}
|
||||
- properties:
|
||||
recipientType: {type: string, enum: [TENANT_ALL]}
|
||||
not:
|
||||
anyOf:
|
||||
- required: [recipientIds]
|
||||
- required: [roleCode]
|
||||
CreateTemplateRequest:
|
||||
type: object
|
||||
required: [templateCode, templateName, category, titleTemplate, bodyTemplate, variableWhitelist]
|
||||
|
||||
Reference in New Issue
Block a user