Skip to content

Commit 6aa77a4

Browse files
committed
CON-1925 Enforce pattern validation for connector integration types
1 parent 42baf8c commit 6aa77a4

File tree

1 file changed

+39
-5
lines changed

1 file changed

+39
-5
lines changed

spec/connectors_import_v3/connectors_import_endpoints.yaml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,14 @@ x-paths:
1515
- Integrating translation requests into your CI/CD pipeline
1616
- Building custom dashboards or tools that manage translation workflows
1717
18+
**Required Permissions:**
19+
This endpoint is accessible to users with the following roles:
20+
- **Account Owner** - Full administrative access to the account
21+
- **Project Manager** - Manages localization at the project level
22+
- **Requester** - Can submit content for translation
23+
24+
For more information about user roles and permissions, see [Introduction to User Roles](https://help.smartling.com/hc/en-us/articles/360056193134).
25+
1826
**Prerequisites:**
1927
1. You must have a configured connector between Smartling TMS and your external system via the Smartling Dashboard
2028
2. You must have valid asset UIDs and titles from your external system (UID format varies by integration type; title is used as file name prefix in Smartling)
@@ -87,8 +95,13 @@ x-paths:
8795
pattern: '^[a-z0-9]{7,9}$'
8896
description: |
8997
Your Smartling project identifier. Find this in the Smartling Dashboard under **Account Settings > API**.
90-
91-
Example: `a1b2c3d4e5`
98+
99+
**Validation Rules:**
100+
- Must be 7-9 characters long
101+
- Must contain only lowercase letters (a-z) and digits (0-9)
102+
- Cannot include uppercase letters, hyphens, or special characters
103+
104+
Example: `a1b2c3d4e`
92105
- name: integrationId
93106
in: path
94107
required: true
@@ -112,15 +125,20 @@ x-paths:
112125
The type of connector integration configured in your Smartling project.
113126
This must match one of the supported integration types.
114127
128+
**Validation Rules:**
129+
- Must be 4-50 characters long
130+
- Must contain only lowercase letters (a-z) and hyphens (-)
131+
- Cannot include uppercase letters, digits, underscores, or other special characters
132+
115133
**Supported Values** (partial list - more available):
116134
- `intercom` - Intercom integration
117-
- `iterable` - Iterable integration
135+
- `iterable` - Iterable integration
118136
- `sanity-docs` - Sanity CMS integration (document-level translation)
119-
137+
120138
**Important**: The asset UID format must match the integration type. For example:
121139
- Intercom asset UIDs typically follow pattern: `article-{id}`
122140
- Sanity asset UIDs follow pattern: `{documentType}-{documentId}`
123-
141+
124142
Contact Smartling support if you need the complete list of available integration types.
125143
126144
requestBody:
@@ -243,6 +261,22 @@ x-paths:
243261
schema:
244262
$ref: '#/components/schemas/ValidationErrorResponse'
245263
examples:
264+
invalid_project_id:
265+
summary: Invalid projectId format
266+
value:
267+
response:
268+
code: VALIDATION_ERROR
269+
errors:
270+
- key: validation.path.error
271+
message: "'projectId' should contain 7-9 lowercase alphanumeric characters"
272+
invalid_integration_id:
273+
summary: Invalid integrationId format
274+
value:
275+
response:
276+
code: VALIDATION_ERROR
277+
errors:
278+
- key: validation.path.error
279+
message: "'integrationId' should contain 4-50 characters, lowercase letters and hyphens only"
246280
empty_assets:
247281
summary: Assets list is empty
248282
value:

0 commit comments

Comments
 (0)