Skip to content

Map int types to integer in System Type to Json Type Map#3327

Open
aaronburtle wants to merge 3 commits intomainfrom
dev/aaronburtle/fix-int-json-type-system-type-map
Open

Map int types to integer in System Type to Json Type Map#3327
aaronburtle wants to merge 3 commits intomainfrom
dev/aaronburtle/fix-int-json-type-system-type-map

Conversation

@aaronburtle
Copy link
Copy Markdown
Contributor

Why make this change?

Closes #3324

What is this change?

Expand the enums for our json data type to include integer. Use this new integer type in the system to json type map.

How was this tested?

Existing test coverage.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates DAB’s OpenAPI JSON type mapping so CLR integral types map to the OpenAPI/JSON Schema integer type (instead of number), addressing incorrect client generation for SQL INT columns.

Changes:

  • Added JsonDataType.Integer to represent the OpenAPI/JSON Schema integer type.
  • Updated TypeHelper’s CLR-to-JSON type map so short/ushort/int/uint/long/ulong resolve to JsonDataType.Integer.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
src/Core/Services/TypeHelper.cs Changes CLR integral type mapping from Number to Integer for OpenAPI schema generation.
src/Core/Services/OpenAPI/JsonDataType.cs Adds the new Integer enum value used by OpenAPI schema generation.

@Aniruddh25 Aniruddh25 added 2.0 and removed 2.1 labels Apr 4, 2026
@Aniruddh25
Copy link
Copy Markdown
Collaborator

This is an impactful bugfix so opportunistically taking it for 2.0 stable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Review In Progress

Development

Successfully merging this pull request may close these issues.

[Bug]: INT columns generate OpenAPI type: number instead of type: integer with format: int32

3 participants