Skip to content

removed DecimalFloat and changed it to double#93

Draft
Kronprinz03 wants to merge 5 commits intomainfrom
DecimalFloat-in-the-types-is-deprecated
Draft

removed DecimalFloat and changed it to double#93
Kronprinz03 wants to merge 5 commits intomainfrom
DecimalFloat-in-the-types-is-deprecated

Conversation

@Kronprinz03
Copy link
Copy Markdown
Contributor

@Kronprinz03 Kronprinz03 commented Apr 30, 2026

Change description

  • Changed cds.DecimalFloat to cds.Double for imported processes

@hyperspace-insights
Copy link
Copy Markdown
Contributor

Summary

The following content is AI-generated and provides a summary of the pull request:


Replace Deprecated cds.DecimalFloat with cds.Double

Bug Fix

🐛 Replaces the deprecated cds.DecimalFloat type with cds.Double throughout the codebase to resolve type mismatch warnings during process import. This addresses the warning: Type mismatch for 'probability': entity has 'cds.Integer' but process definition expects 'cds.DecimalFloat'.

Changes

  • lib/processImport/schemaMapper.ts: Updated resolvePrimitiveOrRef to return cds.Double instead of cds.DecimalFloat when mapping JSON schema number types.
  • lib/types/csn-extensions.ts: Updated the CdsBuiltinType.DecimalFloat enum value from 'cds.DecimalFloat' to 'cds.Double'.
  • tests/bookshop/srv/external/*.cds: Regenerated CDS files now use Double instead of DecimalFloat for numeric fields (e.g., intattribute, number), along with updated checksums.
  • tests/hybrid/importedCDS/*.cds: Same DecimalFloatDouble replacement in hybrid test CDS snapshots.
  • tests/sample/status-management/srv/external/*.cds: Updated price field type from DecimalFloat to Double in the sample app's bookApprovalProcess CDS.
  • tests/*/workflows/*.json: Updated test workflow fixture files to reflect the current API response structure (field reordering, removal of redundant title fields from definitions, and minor formatting normalization).

GitHub Issues

  • #84: DecimalFloat in the types is deprecated

  • 🔄 Regenerate and Update Summary
  • ✏️ Insert as PR Description (deletes this comment)
  • 🗑️ Delete comment
PR Bot Information

Version: 1.20.37

Copy link
Copy Markdown
Contributor

@hyperspace-insights hyperspace-insights Bot left a comment

Choose a reason for hiding this comment

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

The PR makes a straightforward change replacing cds.DecimalFloat with cds.Double across the codebase, with corresponding test fixture updates. The one substantive issue is that DecimalFloat was not removed from the enum but instead given the same value as Double, leaving a redundant alias that could cause confusion — that comment has been posted.

PR Bot Information

Version: 1.20.37

  • Correlation ID: 531372e8-b946-4045-bbcb-a3ddbdc00aba
  • Event Trigger: pull_request.opened
  • File Content Strategy: Full file content
  • LLM: anthropic--claude-4.6-sonnet

Comment thread lib/types/csn-extensions.ts
tilwbr
tilwbr previously approved these changes Apr 30, 2026
Copy link
Copy Markdown
Contributor

@tilwbr tilwbr left a comment

Choose a reason for hiding this comment

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

lgtm

@SirSimon04
Copy link
Copy Markdown
Contributor

SirSimon04 commented May 5, 2026

@Kronprinz03 Can you check the linter error?

=> Done

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