From fabfef6d3bca6455d25905ddb5a944ad1f0b11d0 Mon Sep 17 00:00:00 2001 From: Josh Brunton Date: Fri, 14 Nov 2025 12:56:48 +0000 Subject: [PATCH] Add URL to License Object (#64, #66) --- draft.md | 1 + examples/dotnet.json | 5 +++-- schema.json | 6 +++++- site/docs/examples.md | 5 +++-- typespec/main.tsp | 5 ++++- 5 files changed, 16 insertions(+), 6 deletions(-) diff --git a/draft.md b/draft.md index ae1aa7a..0f29fcd 100644 --- a/draft.md +++ b/draft.md @@ -143,6 +143,7 @@ This is the root object of the OpenCLI Description. |------------|:----:|---------------|-------------| | name | `string` | - | The license name | | identifier | `string` | - | The [SPDX](https://spdx.org/licenses/) license identifier | +| uri | `string` | - | The URI for the license. This MUST be in the form of a URI | #### Command Object diff --git a/examples/dotnet.json b/examples/dotnet.json index 04b795b..2e09554 100644 --- a/examples/dotnet.json +++ b/examples/dotnet.json @@ -7,7 +7,8 @@ "description": "The .NET CLI", "license": { "name": "MIT License", - "identifier": "MIT" + "identifier": "MIT", + "url": "https://opensource.org/license/mit" } }, "options": [ @@ -57,4 +58,4 @@ ] } ] -} \ No newline at end of file +} diff --git a/schema.json b/schema.json index f5ac351..f641e0b 100644 --- a/schema.json +++ b/schema.json @@ -351,6 +351,10 @@ "identifier": { "type": "string", "description": "The SPDX license identifier" + }, + "url": { + "type": "string", + "description": "The URI for the license. This MUST be in the form of a URI" } } }, @@ -375,4 +379,4 @@ "pattern": ".+\\@.+\\..+" } } -} \ No newline at end of file +} diff --git a/site/docs/examples.md b/site/docs/examples.md index 971588e..e0121e9 100644 --- a/site/docs/examples.md +++ b/site/docs/examples.md @@ -18,7 +18,8 @@ title: Examples "description": "The .NET CLI", "license": { "name": "MIT License", - "identifier": "MIT" + "identifier": "MIT", + "url": "https://opensource.org/license/mit" } }, "options": [ @@ -69,4 +70,4 @@ title: Examples } ] } -``` \ No newline at end of file +``` diff --git a/typespec/main.tsp b/typespec/main.tsp index ff1f14b..a3e3f1b 100644 --- a/typespec/main.tsp +++ b/typespec/main.tsp @@ -83,6 +83,9 @@ model License { @doc("The SPDX license identifier") identifier?: string; + + @doc("The URI for the license. This MUST be in the form of a URI") + url?: string; } model Command { @@ -199,4 +202,4 @@ model Arity { model Metadata { name: string; value?: unknown; -} \ No newline at end of file +}