Skip to content

Conversation

@andrewelamb
Copy link
Contributor

Problem:

The curator extension was changing property names and valid values to the "display-name" version of those by default.

Solution:

This behavior has been turned off by default, but can be turned back on if needed. Inadditiona these flags have been extended to the generate_json_schema function and CLI tool.

@andrewelamb andrewelamb requested a review from a team as a code owner February 10, 2026 18:10
@andrewelamb andrewelamb requested review from a team and removed request for a team February 10, 2026 18:11
| `data_model_path` | Positional | Data model path or URL |
| `--data-types` | Named | Optional list of data types to create JSON Schema for |
| `--output` | Named | Optional. Either a file path ending in '.json', or a directory path |
| `--use-property-display-names` | Named | Optional. Defaults to False. Formats the property name strings in the JSON Schema |
Copy link
Member

@thomasyu888 thomasyu888 Feb 10, 2026

Choose a reason for hiding this comment

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

From a product perspective: May want to add in a note about how we do formatting here because Synapse does not accept annotation keys that have special character or spaces.

| `--data-types` | Named | Optional list of data types to create JSON Schema for |
| `--output` | Named | Optional. Either a file path ending in '.json', or a directory path |
| `--use-property-display-names` | Named | Optional. Defaults to False. Formats the property name strings in the JSON Schema |
| `--use-valid-value-display-names` | Named | Optional. Defaults to False. Formats the valid value strings in the JSON Schema |
Copy link
Member

@thomasyu888 thomasyu888 Feb 10, 2026

Choose a reason for hiding this comment

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

From a product perspective, it is a bit unclear why we actually have this field. I'm not entirely sure there are use cases for updating the valid value strings themselves? Although I think the complexity is going to be conditionals.

If the property name is "DataType" after --use-property-display-names but then the valid value is "Data Type" that will potentially cause a mismatch.

The other note, we definitely want DCC's to continue providing valid values like this:

enum:
- "ab cd"
- "bc dd"
- "cd ff"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@thomasyu888 This is a great question. Is there any reason to format valid values? It's only there because the original method did this, I just added the ability to turn it off.

| `data_model_path` | Positional | Data model path or URL |
| `--data-types` | Named | Optional list of data types to create JSON Schema for |
| `--output` | Named | Optional. Either a file path ending in '.json', or a directory path |
| `--data-model-labels` | Named | Either 'class_label', or 'display_label' |
Copy link
Member

Choose a reason for hiding this comment

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

I am technically ok with this backwards incompatible change, but then should this upcoming package release be 5.0.0? or should this deprecation be done in a different method?

@andrewelamb andrewelamb marked this pull request as draft February 10, 2026 18:56
@andrewelamb
Copy link
Contributor Author

andrewelamb commented Feb 10, 2026

@thomasyu888 You brought up some good points. I moved this to draft. I'm going to think about this some more.

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.

2 participants