Skip to content

Conversation

@andrewelamb
Copy link
Contributor

@andrewelamb andrewelamb commented Jul 8, 2025

SCHEMATIC-308

Problem:

When creating a JSON Schema, the type is inferred from existing validation rules if they exist. It would be better if the type were set explicitly in the data model.

Solution:

The JSON Schema creation function will look for the columnType attribute in the data model graph and use it to set the JSON Schema type if it exists. Otherwise, it will continue to infer the type from the validation rules. Infering from validaiton rules has been deprecated and will be sunsetted in the future.

Testing:

Unit tests for both when the node has the columType attribute and when it doesn't.

@andrewelamb andrewelamb requested a review from a team as a code owner July 8, 2025 16:47
@andrewelamb andrewelamb marked this pull request as draft July 8, 2025 16:47
@andrewelamb andrewelamb marked this pull request as ready for review July 8, 2025 17:08
Copy link
Collaborator

@SageGJ SageGJ left a comment

Choose a reason for hiding this comment

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

LGTM
new code logic looks sound and the tests cover the variety of cases appropriately.

@andrewelamb andrewelamb changed the title add ability for JSON Schema type to bet set by columnType attribute [SCHEMATIC-308] add ability for JSON Schema type to bet set by columnType attribute Jul 8, 2025
@andrewelamb andrewelamb changed the title [SCHEMATIC-308] add ability for JSON Schema type to bet set by columnType attribute [SCHEMATIC-308] Add ability for JSON Schema type to be set by columnType attribute Jul 8, 2025
@andrewelamb andrewelamb merged commit 8dc7f03 into develop Jul 8, 2025
5 of 6 checks passed
@andrewelamb andrewelamb deleted the SCHEMATIC-308 branch July 8, 2025 20:03
@sonarqubecloud
Copy link

sonarqubecloud bot commented Jul 8, 2025

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