Skip to content

Commit d25f0d4

Browse files
Fix JSON schema inconsistency: licenseUri and uri are required in Model Catalog Source (#1123)
* Initial plan * Fix JSON schema inconsistency: add licenseUri and uri to required properties Co-authored-by: andrewleader <[email protected]> * Add missing uri property to package-based model example Co-authored-by: andrewleader <[email protected]> --------- Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: andrewleader <[email protected]>
1 parent caf7b88 commit d25f0d4

1 file changed

Lines changed: 8 additions & 5 deletions

File tree

docs/new-windows-ml/model-catalog/model-catalog-source.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Windows ML Model Catalog Source schema reference
33
description: Reference documentation for the Windows ML Model Catalog Source JSON schema used to define model catalog sources.
44
ms.topic: reference
5-
ms.date: 09/26/2024
5+
ms.date: 02/25/2026
66
---
77

88
# Windows ML Model Catalog Source schema reference
@@ -76,9 +76,9 @@ Each model in the `models` array follows this structure:
7676
| `executionProviders` | array | Yes | Array of execution provider objects supported by the model |
7777
| `modelSizeBytes` | integer | No | Size of the model in bytes (minimum: 0) |
7878
| `license` | string | Yes | License type (e.g., "MIT", "BSD", "Apache") |
79-
| `licenseUri` | string | No | URI to the license document |
79+
| `licenseUri` | string | Yes | URI to the license document |
8080
| `licenseText` | string | No | Text content of the license |
81-
| `uri` | string | No | Base URI where the model can be accessed |
81+
| `uri` | string | Yes | Base URI where the model can be accessed |
8282
| `files` | array | Conditional | Array of files associated with the model |
8383
| `packages` | array | Conditional | Array of packages required for the model |
8484

@@ -217,6 +217,7 @@ Here's an example catalog with package-based models:
217217
"license": "MIT",
218218
"licenseUri": "https://opensource.org/licenses/MIT",
219219
"licenseText": "MIT License - see URI for full text",
220+
"uri": "https://example.com/packages",
220221
"packages": [
221222
{
222223
"packageFamilyName": "Microsoft.ExampleAI_8wekyb3d8bbwe",
@@ -235,7 +236,7 @@ The Windows ML Model Catalog follows the JSON Schema specification (draft 2020-1
235236

236237
### Key validation rules
237238

238-
1. **Required fields**: Every model must have `id`, `name`, `version`, `publisher`, `executionProviders`, and `license`
239+
1. **Required fields**: Every model must have `id`, `name`, `version`, `publisher`, `executionProviders`, `license`, `licenseUri`, and `uri`
239240
2. **Exclusive distribution**: Models must specify either `files` OR `packages`, but not both
240241
3. **SHA256 format**: All SHA256 hashes must be exactly 64 hexadecimal characters
241242
4. **Execution providers**: Must be objects with at least a `name` property
@@ -282,6 +283,8 @@ The Windows ML Model Catalog follows the JSON Schema specification (draft 2020-1
282283
}
283284
],
284285
"license": "MIT",
286+
"licenseUri": "https://opensource.org/licenses/MIT",
287+
"uri": "https://yourserver.com/models/base-path",
285288
"files": [] // or "packages": []
286289
}
287290
]
@@ -365,7 +368,7 @@ You can use the following JSON schema to validate your JSON payload.
365368
"$defs": {
366369
"Model": {
367370
"type": "object",
368-
"required": [ "id", "name", "version", "publisher", "executionProviders", "license" ],
371+
"required": [ "id", "name", "version", "publisher", "executionProviders", "license", "licenseUri", "uri" ],
369372
"properties": {
370373
"id": {
371374
"type": "string",

0 commit comments

Comments
 (0)