Skip to content

Add schema for ControlInfoData.json#1630

Merged
karkarl merged 2 commits intomicrosoft:mainfrom
HO-COOH:chore/control-info-data-schema
Nov 13, 2024
Merged

Add schema for ControlInfoData.json#1630
karkarl merged 2 commits intomicrosoft:mainfrom
HO-COOH:chore/control-info-data-schema

Conversation

@HO-COOH
Copy link
Copy Markdown
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
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

HO-COOH commented Nov 4, 2024

@marcelwgn Did some changes to it, please review

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

/azp run

1 similar comment
@karkarl
Copy link
Copy Markdown
Collaborator

karkarl commented Nov 13, 2024

/azp run

@karkarl karkarl merged commit 48bcda6 into microsoft:main Nov 13, 2024
niels9001 pushed a commit that referenced this pull request Dec 6, 2024
<!--- Provide a general summary of your changes in the Title above -->

## Description
Same as #1630 

## Motivation and Context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

## How Has This Been Tested?
Manual

## Screenshots (if appropriate):

## Types of changes
<!--- What types of changes does your code introduce? Put an `x` in all
the boxes that apply: -->
- [ ] 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)
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