Repository navigation
feat: update bundles, webhooks, fields, string comments and other APIs to the latest docs - #422
Merged
Merged
Conversation
…s to the latest docs Fixes: - OrganizationWebhooksApi.listWebhooks/addWebhook used a relative "/webhooks" URL without the base URL and failed at runtime - webhooks.Event: add file.qa.finished, project.qa.finished, project.built, preTranslation.completed and task.updated - webhook `headers` returned as [] is read as null instead of failing - fields.EntityType: add TERM and CONCEPT - FieldsApi: add getFieldById returning a single field; deprecate getField, whose list return type doesn't match the API New fields and params: - Bundle/AddBundleRequest: sourceLanguageExportPattern, labelMatchRule, excludeLabelMatchRule, languageIds - Language.bcp47Code; Client.webUrl; Vendor.webUrl; StyleGuide/AddStyleGuideRequest.groupId - StringComment: projectId, resolverId, resolver, resolvedAt, fileId, file, isShared, senderOrganization, resolverOrganization; AddStringCommentRequest: fileId, isShared - Issue: user, string - fields Config: minValue/maxValue as numbers (min/max deprecated) - custom_mt credentials for machine translation engines - query params: fileId for listStringComments, denormalizePlaceholders for getCorrection, createdAfter/createdBefore for listUserSecurityLogs Deprecations: BundleExport.eta, AddStringCommentRequest.issueStatus. Javadoc: fixed the notifications and string corrections operation links. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…-of-range values The deprecated integer getters clamped numbers outside the Integer range to Integer.MAX_VALUE/MIN_VALUE. They now return null for such values (and NaN), while fractional values within the range keep being truncated towards zero as before. Javadoc recommends getMinValue() / getMaxValue() for the exact value. Document that an empty `headers` array returned by the API is represented as null in Webhook and OrganizationWebhook. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
andrii-bodnar
approved these changes
Oct 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of updating the SDK to the current Crowdin API docs. This PR covers the smaller APIs: Bundles, Webhooks (project and organization), Fields, String Comments, Style Guides, Languages, Issues, Clients, Vendors, Machine Translation Engines, Notifications, String Corrections and Security Logs. Distributions, Dictionaries and Storage were checked and already match the docs.
Fixes
OrganizationWebhooksApi.listWebhooks/addWebhook: they called a relative"/webhooks"URL without the base URL, so they failed at runtime. The tests registered their mocks under the same relative URL, which hid the bug; they now use the full URL.webhooks.model.Event: addedfile.qa.finished,project.qa.finished,project.built,preTranslation.completedandtask.updated. Before, listing or getting a webhook subscribed to any of these failed.headers: the response schema types it as an array, and an empty[]used to fail parsing. It now reads asnull, the same as a missing value. This is documented onWebhook.headersandOrganizationWebhook.headers.EmptyArrayToNullDeserializer, which turns any array intonull, not only an empty one. If the API ever returned a non-empty array of strings (the documented response type), those values would be dropped silently. The create forms and the docs example both use an object ({"Authorization": "…"}), so this is very unlikely, and the previous release failed on any array anyway. The shared deserializer was deliberately left unchanged.fields.model.enums.EntityType: addedTERMandCONCEPT.FieldsApi.getField: it returns aResponseList, butGET /fields/{fieldId}returns a single field. AddedgetFieldById(Long)returningResponseObject<Field>, and deprecatedgetField.New fields and parameters
sourceLanguageExportPattern,labelMatchRule,excludeLabelMatchRuleandlanguageIdsonBundleandAddBundleRequest.listBundleBranchesnow has Javadoc links.StringComment:projectId,resolverId,resolver,resolvedAt,fileId,file,isShared,senderOrganization,resolverOrganization.AddStringCommentRequest:fileId,isShared.fileIdquery parameter forlistStringComments.userandstringonIssue.Language.bcp47Code.webUrlonClientandVendor.groupIdonStyleGuide/AddStyleGuideRequest(Enterprise).CustomMtTranslateCredentialsforcustom_mtengines.Config:minValue/maxValue(Double), because the API typesmin/maxas numbers.denormalizePlaceholdersforgetCorrection;createdAfter/createdBeforeforlistUserSecurityLogs.Deprecated (still working)
BundleExport.eta: the API deprecates it.AddStringCommentRequest.issueStatus: not part of the API's add-comment request.Config.min/Config.max: useminValue/maxValue.FieldsApi.getField: usegetFieldById.Backward compatibility
No public method, field or class was removed, renamed or retyped. Existing overloads delegate to the new ones and send the same requests.
Config(behaviour correction):setMin(Integer)/setMax(Integer)fill the new fields, so the value is sent as a decimal (10.0).getMin()/getMax()truncate a fractional value inside theIntegerrange towards zero (1.5→1,-1.5→-1), the same as the previous release.Integerrange (orNaN) they returnnullinstead of a clamped value. The previous release failed the whole response for such values.getMinValue()/getMaxValue()for the exact number.EventandEntityTypegain constants, so exhaustiveswitchstatements over them will see new values.ListStyleGuidesParams: now has@EqualsAndHashCode(callSuper = true), so itsequalsincludes the pagination fields.equals/hashCode/toStringinclude the new fields.Testing
./gradlew build: 651 tests, 0 failures, on both JDK 17 and JDK 8../gradlew javadocon JDK 8: no errors.Eventvalues, and emptyheaders;getFieldById, number fieldConfig(request JSON from the deprecated setters), and fields filtered bytype;ConfigTest: the deprecated getters with fractional values,Integerboundary values, and out-of-range, infinite andNaNvalues;🤖 Generated with Claude Code