8000 fix: ensure decimal columns are typed as number in OpenAPI schema by codegen-sh[bot] · Pull Request #11719 · nocodb/nocodb · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: ensure decimal columns are typed as number in OpenAPI schema #11719

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

codegen-sh[bot]
Copy link
Contributor
@codegen-sh codegen-sh bot commented Jun 19, 2025

Issue

Decimal columns in NocoDB are being labeled as string type in the OpenAPI specification (swagger.json), but the actual API returns them as floating point numbers. This causes issues with strongly typed languages like Rust when using auto-generated clients.

Solution

This PR explicitly sets the type of decimal columns to 'number' in the OpenAPI schema generation for both the swagger and swaggerV2 implementations. This ensures that the schema correctly reflects the actual data type returned by the API.

Changes

  • Added explicit handling for UITypes.Decimal in both swagger and swaggerV2 implementations to ensure they are always typed as 'number' in the OpenAPI schema.

Fixes #11718


💻 View my workAbout Codegen

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.

🐛 Bug: Decimal columns labeled as string in openapi.json
0 participants
0