You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
.Net: Fix mapping of the KernelParameterMetadata.IsRequired property (microsoft#11309)
### Motivation, Context and Description
This PR fixes the issue caused by accessing the `required` property
value as if it were a boolean property, instead of accessing it as an
array of strings. Additionally, it reads the `required` property from
the object root instead of reading it from each individual property of
the object because the `required` property is defined at the root level
to specify which properties are mandatory for the entire object.
So, when iterating over the object root level properties, the code now
uses the `"required": ["options"]` property declared at the root level
instead of the `"required": ["outputPath"]` declared at the `options`
property level.
```json
{
"type": "object",
"properties": {
"options": {
"type": "object",
"description": "Code generation options",
"properties": {
"outputPath": {
"type": "string",
"description": "Directory path where generated tests will be saved (use absolute path)"
},
"testNamePrefix": {
"type": "string",
"description": "Prefix to use for generated test names (default: \u0027GeneratedTest\u0027)"
},
"includeComments": {
"type": "boolean",
"description": "Whether to include descriptive comments in generated tests"
}
},
"required": [
"outputPath"
]
}
},
"required": [
"options"
]
}
```
JsonSpec:
https://json-schema.org/understanding-json-schema/reference/object#requiredFixes: microsoft#11292
Contributes to:
microsoft#11212
0 commit comments