Skip to content
New issue

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

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

Already on GitHub? # to your account

Add schema for ControlInfoData.json #1630

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

HO-COOH
Copy link
Contributor

@HO-COOH HO-COOH commented Oct 10, 2024

Description

I added a schema file for the ControlInfoData.json to make adding new control / control group to it simpler. Now you get nice intellisense for all properties and error message for missing required ones. The schema should be automatically picked up by any reasonable editors.

Motivation and Context

I just happens to know this.

How Has This Been Tested?

The current file reports no mismatch for this schema.

Screenshots (if appropriate):

image

image

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@HO-COOH HO-COOH mentioned this pull request Oct 13, 2024
3 tasks
Copy link
Collaborator

@marcelwgn marcelwgn left a comment

Choose a reason for hiding this comment

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

Love the idea of adding a schema for this file. One thing about the descriptions, I think ideally we want to first name the intention of the property and then explain where it is used (if it is necessary to do that at all)

"uniqueItems": true
},
"Title": {
"type": "string",
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would probably write something like "The name of the control group. Will be displayed on the control group page and navigation".

Same for the other descriptions, I think ideally we should tell the intention of the property and then tell where it is being used.

},
"IsSpecialSection": {
"type": "boolean",
"description": "Special section is hard-coded in NavigationRootPage.xaml",
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"description": "Special section is hard-coded in NavigationRootPage.xaml",
"description": "Indicates that this section is not a regular control section but is added to the navigation differently",

"type": "array",
"items": {
"type": "string",
"description": "Name of the related control"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
"description": "Name of the related control"
"description": "ID of the related control"

@HO-COOH
Copy link
Contributor Author

HO-COOH commented Nov 4, 2024

@marcelwgn Did some changes to it, please review

Copy link
Collaborator

@marcelwgn marcelwgn left a comment

Choose a reason for hiding this comment

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

Looks good to me, thank you for these changes!

@marcelwgn
Copy link
Collaborator

/azp run

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants