[pull] main from fern-api:main#642
Merged
Merged
Conversation
…ndiscriminatedUnionType for TS, Java, Go, C# (#14847) * fix: check error count in findMatchingUndiscriminatedUnionType for TS, Java, Go, C# Port the Python fix for undiscriminated union type matching to all other languages. The issue was that when matching a value against union variants, a variant could match structurally (e.g. an object with no required fields returns non-nop) even though errors were added during conversion (e.g. for missing properties). By checking this.context.errors.size() > errorsBefore, we now correctly reject such partial matches and try the next variant. Co-Authored-By: patrick <patrickthornton@college.harvard.edu> * fix(internal): check error count in findMatchingUndiscriminatedUnionType for TS, Java, Go, C# Co-Authored-By: patrick <patrickthornton@college.harvard.edu> * update snapshots for C# and Go dynamic snippets after undiscriminated union fix Co-Authored-By: patrick <patrickthornton@college.harvard.edu> * add versions.yml entries for TS, Java, Go, C# dynamic snippets fix Co-Authored-By: patrick <patrickthornton@college.harvard.edu> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* chore(generator-cli): upgrade @fern-api/replay to 0.10.0 Co-Authored-By: tanmay.singh <tstanmay13@gmail.com> * chore(generator-cli): upgrade @fern-api/replay to 0.10.1 Co-Authored-By: tanmay.singh <tstanmay13@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ks (#14658) * More debug logs * Scrap repeated pruning and deduplicate links and pathnames * Add changelog entry
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat(java): upgrade to IR v66
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* chore: register Java generator versions in IR v66 migration mapping
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* chore: update seed.yml irVersion to v66 for Java generators
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat(java): implement v66 IR NameOrString handling with CaseConverter
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): apply biome formatting to v66 changes
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* revert(java): revert v66 upgrade - Java IR SDK cannot deserialize compressed names
The Java generator's external Maven artifact (com.fern.fern:irV65) does not
support v66's NameOrString format (plain strings where Name objects are expected).
The Java IR SDK's Name class has no @JsonCreator for String values.
Reverting:
- Migration mapping: Java generators back to GeneratorWasNeverUpdatedToConsumeNewIR
- versions.yml: Remove v66 version entries for java-sdk, java-model, java-spring
- seed.yml: Revert irVersion back to v65/v58 for all Java seed configs
- java-v2 TypeScript layer: Revert CaseConverter/getWireValue/getOriginalName changes
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat(java): implement v66 IR NameOrString handling with CaseConverter
- Replace all .pascalCase/.camelCase/.snakeCase/.screamingSnakeCase/.originalName/.wireValue
accesses with CaseConverter methods and getOriginalName/getWireValue helpers
- Add getCaseConverter() and getOriginalName() to AbstractJavaGeneratorContext
- Update versions.yml, seed.yml, and migration mapping for Java SDK/Model/Spring
- Files updated: AbstractJavaGeneratorContext, SdkGeneratorContext, ReadmeSnippetBuilder,
buildReference, EndpointSnippetsGenerator, TestClassBuilder, TestMethodBuilder,
TestDataExtractor, SdkWireTestGenerator, convertEndpointSnippetRequest
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): fix remaining .name.name patterns - pass NameAndWireValueOrString directly to CaseConverter
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): restore .name.name for DeclaredTypeName, fix NameOrString import to use NameInput from base-generator
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): fix biome formatting and TestClassBuilder compressed name check
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): fix getCaseConverter - import CaseConverter directly and create module-level instance
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): revert seed.yml irVersion and migration - Java IR SDK cannot deserialize v66 compressed names
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* feat(java): implement v66 compressed name deserialization via custom Jackson deserializers
- Add CasingConfiguration.java: replicates TypeScript CasingsGenerator logic
(smartCasing, initialism capitalization, keyword sanitization)
- Add NameDeserializer.java: handles both string and object Name forms
- Add NameAndWireValueDeserializer.java: handles both string and object forms
- Register custom deserializers in AbstractGeneratorCli.getIr() via Jackson Module
- Fix Java v2 CaseConverter to read from ir.casingsConfig instead of hardcoding
- Fix SdkGeneratorContext to use base class caseConverter instance
- Update seed.yml irVersion to v66 for java-sdk and java-model
- Register Java versions in v66-to-v65 migration mapping
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): bump @fern-fern/ir-sdk to 66.0.0 and fix NameOrString type errors in Java v2
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): replace module-level caseConverter with context.caseConverter in 5 files
Remove hardcoded CaseConverter instances that ignored IR's casingsConfig.
All usages now go through context.caseConverter which is initialized from
the IR's casingsConfig (smartCasing, generationLanguage, keywords).
Files fixed:
- buildReference.ts: added context param to getEndpointMethodName/getSectionTitle
- SdkWireTestGenerator.ts: replaced 2 usages with this.context.caseConverter
- TestClassBuilder.ts: replaced 3 usages with this.context.caseConverter
- TestMethodBuilder.ts: replaced 1 usage with this.context.caseConverter
- TestDataExtractor.ts: removed unused CaseConverter import and constant
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): rewrite splitWords to use lodash-compatible regex pattern
Fixes bug where splitWords('AValue') produced ['AValue'] instead of
['A', 'Value']. The old hand-rolled state machine incorrectly kept
single uppercase chars as part of the current word when followed by
uppercase+lowercase.
Replaced with lodash's exact words() regex:
[A-Z]+(?=[A-Z][a-z])|[A-Z]?[a-z]+|[A-Z]+|[0-9]+
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): fix biome formatting issues in ReadmeSnippetBuilder, buildReference, SdkWireTestGenerator
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): use BeanDeserializerModifier to override @JsonDeserialize annotation on Name/NameAndWireValue
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): use mix-in annotations to override @JsonDeserialize(builder=...) and fix spotless formatting
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* fix(java): compile splitWords regex pattern once as static field and remove duplicate Javadoc
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* test(java): add comprehensive unit tests for CasingConfiguration
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* cut unused helpers, reorg
* fix(java): fix changelog versions and remove spring artifacts
- Deduplicate and bump SDK RC version to 4.2.0-rc.0 (above latest 4.1.3)
- Move RC entry to top of versions.yml
- Remove spring/versions.yml and seed/java-spring/seed.yml (spring was removed on main)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* fix(java): regenerate pnpm-lock.yaml from main's base
The lockfile was missing minimatch@10.2.5 which was added on main
after the rebase resolved the lockfile conflict with an older version.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: patrick thornton <patrickthornton@g.harvard.edu>
…t ID (#14861) release 2.59.2
…4865) chore(python): bump @fern-api/generator-cli from 0.9.3 to 0.9.4 Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
* chore(python): bump Python SDK generator to 5.3.8 Co-Authored-By: tanmay.singh <tstanmay13@gmail.com> * simplify changelog entry Co-Authored-By: tanmay.singh <tstanmay13@gmail.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…hen generateLiterals is enabled (#14863) * fix(csharp): skip literal properties in snippet object initializers when generateLiterals is enabled When the generate-literals feature is enabled (or via the deprecated experimental-readonly-constants option), literal properties are generated as TypeLiteral readonly structs instead of plain strings. The snippet/test generators were still emitting string assignments for these properties (e.g. Type = "session_settings"), causing CS0029 compilation errors since TypeLiteral has no implicit conversion from string. Fix: skip literal properties in object initializers during snippet generation. The default = new() initializer already provides the correct value for these properties. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * fix: include extendedProperties in literal filter set for WrappedRequestGenerator Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * chore: update seed output for literal:readonly-constants fixture Regenerated seed output showing literal properties removed from object initializers in test code and code snippets when generateLiterals is enabled. Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> * refactor: add isLiteralValue helper and use it instead of getLiteralValue != null Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --------- Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Swimburger <3382717+Swimburger@users.noreply.github.com>
…/double (#14875) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Swimburger <3382717+Swimburger@users.noreply.github.com>
Co-authored-by: Swimburger <3382717+Swimburger@users.noreply.github.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )