Skip to content

Devx 867 render body fix - #354

Merged
jenschude merged 2 commits into
mainfrom
DEVX-867-renderBody-fix
Sep 9, 2026
Merged

jenschude merged 2 commits into
mainfrom
DEVX-867-renderBody-fix

Conversation

@ShipilA

@ShipilA ShipilA commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

@ShipilA
ShipilA requested a review from a team as a code owner September 8, 2026 16:41
@ShipilA
ShipilA requested a lite review from Copilot September 8, 2026 16:42

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The changes are small, consistent with existing type-mapping logic (File→java.io.File, file→Stream), and directly address codegen failures without introducing broader behavioral risk.

Pull request overview

This PR fixes code generation edge cases for RAML file types by ensuring Java and C# predicate DSLs treat file/stream properties as scalar-comparable rather than nested object predicates, and by avoiding generation of Java builder tests that can’t construct valid File values.

Changes:

  • Java builder test generation now excludes file (and array<file>) properties from generated builder/property tests.
  • Java query predicate generation now treats java.io.File properties as comparison predicates.
  • C# query predicate generation and C# type/usings helpers now treat Stream (the C# base type for RAML file) as a scalar-like type and add System.IO when needed.
File summaries
File Description
languages/javalang/builder-renderer/java-builder-client/src/main/kotlin/io/vrap/codegen/languages/javalang/client/builder/test/JavaBuilderTestRenderer.kt Filters out file and file-array properties so generated builder tests don’t emit invalid File assignments.
languages/javalang/builder-renderer/java-builder-client/src/main/kotlin/io/vrap/codegen/languages/javalang/client/builder/predicates/JavaQueryPredicateRenderer.kt Adds java.io.File to the scalar-comparison predicate path to avoid generating non-existent nested DSL types.
languages/csharp/src/main/kotlin/io/vrap/codegen/languages/csharp/predicates/CsharpQueryPredicateRenderer.kt Treats Stream as comparison-predicate eligible so file properties don’t generate nested DSLs.
languages/csharp/src/main/kotlin/io/vrap/codegen/languages/csharp/extensions/CsharpVrapExtensions.kt Ensures Stream stays as Stream (not IStream) in C# simple-name rendering.
languages/csharp/src/main/kotlin/io/vrap/codegen/languages/csharp/extensions/CsharpObjectTypeExtensions.kt Adds using System.IO; when a model includes Stream (or IList<Stream>) properties.
Review details
  • Files reviewed: 5/5 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@jenschude jenschude left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@jenschude
jenschude merged commit 89e7adb into main Sep 9, 2026
7 checks passed
@jenschude
jenschude deleted the DEVX-867-renderBody-fix branch September 9, 2026 08:15
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.

3 participants