Skip to content

feat(projects): update projects and groups API to the latest docs - #430

Merged
andrii-bodnar merged 2 commits into
masterfrom
feature/projects-groups-api
Nov 2, 2026
Merged

andrii-bodnar merged 2 commits into
masterfrom
feature/projects-groups-api

Conversation

@katerina20

@katerina20 katerina20 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Part of updating the SDK to the current Crowdin API docs, checked against the official OpenAPI specs (full YAML, all four editions). This PR covers Projects, Groups, file format settings and strings exporter settings. Compatible with the released SDK 1.37.0 (and 1.36.0; projectsgroups is identical in both): no public signature of the published 1.37.0 artifact is removed or changed.

Changes

Projects

  • Requests:
    • ProjectRequest/EnterpriseProjectRequest: qaCheckActionAiPromptId, contextReviewAiPromptId, assignedStyleGuides.
    • Enterprise only: externalQaCheckIds, externalQaChecksIgnorable, fields.
    • Workflow template steps: the config object with assignees/assignedTeams, autoApproveOption for TM pre-translation, and a new AI pre-translate step.
  • Wire-format corrections (old accessors kept, old field @Deprecated):
    • ProjectRequest: the API key is tagsDetection, not tagDetection. New tagsDetection field; get/setTagDetection delegate to it.
    • EnterpriseProjectRequest.exportStringsThatPassedWorkflow is sent as a boolean (exportStringsThatPassedWorkflowEnabled). The old Integer setter maps 0 → false and anything else → true.
    • EnterpriseProjectRequest.inContextPseudoLanguageId is sent as a string language id (inContextPseudoLanguageIdValue). The old Boolean field is no longer sent; it was never a valid value.
  • Responses:
    • Project.fields.
    • ProjectSettings: qaCheckActionAiPromptId, contextReviewAiPromptId, assignedStyleGuides, externalQaChecksIgnorable.
    • QaCheckCategories: numbers, ai, outdated, mdx, unifiedPlaceholders.
    • Project.isExternal is now actually read; it was always false before.
  • Deprecated: assistActionAiPromptId (not in the API), glossaryAccess (use glossaryAccessOption), Project.background, and the step-level assignees of the translate/proofread workflow step.
  • Not added: the project-level preTranslationAiPromptId. The API marks it deprecated, and it isn't in 1.36.0 or 1.37.0.

Groups

  • Group.webUrl and savingsReportSettingsTemplateId; AddGroupRequest.savingsReportSettingsTemplateId.
  • filter query parameter for listGroups/listProjects, and userId for listProjects (Crowdin). All are left out of the URL when null.

File format settings

  • New classes for CSV, XLSX, XLIFF, XLIFF 2.0, String Catalog, VDF and VSDX. All extend OtherFileFormatSettings, so existing instanceof OtherFileFormatSettings checks keep working.
  • New fields on existing formats: customSegmentation, inlineTags, hideAttributeValues, Adoc excludeIncludeDirectives, Idml inlineHyperlinkText, the Markdown/MDX marker options, and the Docx options.
  • excludedElements (HTML and front-matter HTML): the docs describe an array of CSS selectors, while SDK 1.36.0 modelled a boolean. Both are now supported:
    • Reading: an array of strings goes to excludedElementList (null elements allowed); a boolean goes to the existing excludedElements; null or a missing key leaves both null. Any other shape (a single string, a number, an object, or an array with non-string elements) fails deserialization with a clear excludedElements message instead of being silently dropped. 1.36.0 also failed on these.
    • Writing: the documented array takes priority when excludedElementList is set; otherwise the legacy boolean is sent, as in 1.36.0 (approved).
    • Accessors: getExcludedElements()/setExcludedElements(Boolean) are unchanged; the boolean field is @Deprecated in favour of excludedElementList.

Strings exporter settings

  • New fields: Android convertLineBreaks, useCdataForStringsWithTags; macOS convertLineBreaks, exportContext; XLIFF copySourceToEmptyTarget, exportTranslatorsComment.
  • An unknown format in a response returns the base StringsExporterSettings instead of throwing.
  • New editProjectStringsExporterSettingsWithPatch(projectId, settingsId, List<PatchRequest>) sends the documented JSON Patch body. The original editProjectStringsExporterSettings(…, StringsExporterSettingsRequest) keeps its signature and behaviour and is @Deprecated. The new method has its own name, so editProjectStringsExporterSettings(id, id, null) still compiles.

Tests

  • New ExcludedElementsSerializationTest (6 tests, real JacksonJsonTransformer). It covers the boolean, array, empty array, null elements, null and missing values, and rejection of 8 unexpected shapes, both directly and through FileFormatSettingsResource (the polymorphic deserializer path), plus request serialization (array priority, legacy boolean) and round trips.
  • New editProjectStringsExporterSettingsWithNullRequestCompatibilityTest: the original call with a literal null compiles and reaches the endpoint.
  • Restored the project.getFields() assertion in UsersApiExtendedTest, which was removed in feat(users,teams): update users and teams API to the latest docs #420 because Project.fields arrives with this PR. The fixture's project.fields matches the documented EnterpriseAdditionalFields.
  • New and updated tests for the other changes: ProjectsGroupsApiExtendedTest, ProjectFileFormatSettingsExtendedTest and ProjectStringsExporterSettingsExtendedTest.

Backward compatibility

  • Public signatures: compared against the published 1.37.0 artifact (JitPack jar), 0 public signatures were removed or changed. Against 1.36.0, nothing in Projects/Groups, Users or Teams changed. There are no null-ambiguous overloads in any Api class.
  • Wire-format corrections (behaviour changes):
    • tagDetection is sent as tagsDetection.
    • exportStringsThatPassedWorkflow is sent as a boolean.
    • A legacy Boolean inContextPseudoLanguageId is no longer sent.
  • Different runtime classes: CSV/XLSX/XLIFF/VDF/VSDX settings now come back as specific subclasses of OtherFileFormatSettings.
  • equals/hashCode/toString include the new fields.

Validation

  • Full build (./gradlew build): 742 tests, 0 failures, on both JDK 17 and JDK 8.
  • Projects and users tests: all passing (50 Projects/Groups tests).
  • Javadoc on JDK 8: no errors. Two warnings remain in ProjectsGroupsApi, both on methods unchanged since 1.36.0; one of the three warnings 1.36.0 had in this file is now fixed.
  • OpenAPI coverage: all 22 Projects/Groups routes are covered. A recursive check of request and response models finds no missing non-deprecated fields and no newly added deprecated fields.

Unverified or inferred contracts

  • File format codes: the format codes the deserializer uses for CSV, XLSX, XLIFF, VDF and VSDX (csv, xlsx, xliff, vdf, vsdx) are inferred. The spec types format as a free string. XLIFF 2.0 and String Catalog aren't mapped on read (String Catalog has no response schema). Unknown codes fall back to OtherFileFormatSettings.
  • excludedElements in responses: it isn't listed in the HTML response schemas. Accepting a boolean is based on SDK 1.36.0, not on the docs. Unexpected shapes are rejected rather than dropped.
  • XliffStringsExporterSettings.languagePairMapping is unchanged. The spec contradicts itself (the schema says {lang: {sourceLanguageId}}, the example says {"uk": "es"}), and the existing Map<String, String> fails on the schema shape. This is an existing issue, not touched here.
  • Enterprise PATCH /projects/{projectId}: the docs show the response without the usual data wrapper. The SDK behaviour is unchanged since 1.36.0.

Review decisions (approved)

  1. A legacy boolean excludedElements is still sent when only setExcludedElements(Boolean) is used, for 1.36.0 compatibility. The documented array takes priority when excludedElementList is set.
  2. The JSON Patch method is named editProjectStringsExporterSettingsWithPatch.

🤖 Generated with Claude Code

katerina20 and others added 2 commits November 1, 2026 20:31
Projects:
- add qaCheckActionAiPromptId, contextReviewAiPromptId, assignedStyleGuides
  and the `tagsDetection` key (ProjectRequest.tagDetection is kept as a
  deprecated alias); Enterprise: externalQaCheckIds,
  externalQaChecksIgnorable, custom fields, typed workflow step configs
- Project.fields, ProjectSettings.externalQaChecksIgnorable and the new AI
  prompt ids; QaCheckCategories gains numbers, ai, outdated, mdx and
  unifiedPlaceholders; Project.isExternal is now read
- deprecate assistActionAiPromptId, glossaryAccess and Project.background;
  wrongly typed Enterprise request fields get correctly typed replacements

Groups: webUrl and savingsReportSettingsTemplateId; `filter` query param
for listGroups/listProjects and `userId` for listProjects.

File format settings: new Csv, Xlsx, Xliff, XliffTwo, StringCatalog, Vdf
and Vsdx classes (extending OtherFileFormatSettings) and the missing
fields of existing formats. Html/FmHtml `excludedElements` accepts both
the documented array (excludedElementList) and the boolean returned by
SDK 1.36.0, and is written the same way as before when only the legacy
boolean is set.

Strings exporter settings: missing Android/macOS/XLIFF fields, unknown
formats no longer fail deserialization, and the JSON Patch request is
available as editProjectStringsExporterSettingsWithPatch; the original
editProjectStringsExporterSettings keeps its signature.

Restore the Project.getFields() assertion in UsersApiExtendedTest.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
The excludedElements reader silently discarded any non-null value that
was neither a boolean nor an array (e.g. a single string or an object)
and turned object or array elements into empty strings. Such values now
fail deserialization with a clear message instead of being lost, the
same way SDK 1.36.0 failed on them. The documented array of strings
(null elements allowed), the legacy boolean and null/missing values are
read as before.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@andrii-bodnar
andrii-bodnar merged commit d5258c5 into master Nov 2, 2026
3 checks passed
@andrii-bodnar
andrii-bodnar deleted the feature/projects-groups-api branch November 2, 2026 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants