Skip to content

Commit b54d16c

Browse files
Merge pull request #67 from brunt-toast/f/license-uri
Add URL to License Object (#64, #66)
2 parents 4f48ebc + fabfef6 commit b54d16c

5 files changed

Lines changed: 16 additions & 6 deletions

File tree

draft.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ This is the root object of the OpenCLI Description.
143143
|------------|:----:|---------------|-------------|
144144
| name | `string` | - | The license name |
145145
| identifier | `string` | - | The [SPDX](https://spdx.org/licenses/) license identifier |
146+
| uri | `string` | - | The URI for the license. This MUST be in the form of a URI |
146147

147148
#### Command Object
148149

examples/dotnet.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@
77
"description": "The .NET CLI",
88
"license": {
99
"name": "MIT License",
10-
"identifier": "MIT"
10+
"identifier": "MIT",
11+
"url": "https://opensource.org/license/mit"
1112
}
1213
},
1314
"options": [
@@ -57,4 +58,4 @@
5758
]
5859
}
5960
]
60-
}
61+
}

schema.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,10 @@
351351
"identifier": {
352352
"type": "string",
353353
"description": "The SPDX license identifier"
354+
},
355+
"url": {
356+
"type": "string",
357+
"description": "The URI for the license. This MUST be in the form of a URI"
354358
}
355359
}
356360
},
@@ -375,4 +379,4 @@
375379
"pattern": ".+\\@.+\\..+"
376380
}
377381
}
378-
}
382+
}

site/docs/examples.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ title: Examples
1818
"description": "The .NET CLI",
1919
"license": {
2020
"name": "MIT License",
21-
"identifier": "MIT"
21+
"identifier": "MIT",
22+
"url": "https://opensource.org/license/mit"
2223
}
2324
},
2425
"options": [
@@ -69,4 +70,4 @@ title: Examples
6970
}
7071
]
7172
}
72-
```
73+
```

typespec/main.tsp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,9 @@ model License {
8383

8484
@doc("The SPDX license identifier")
8585
identifier?: string;
86+
87+
@doc("The URI for the license. This MUST be in the form of a URI")
88+
url?: string;
8689
}
8790

8891
model Command {
@@ -199,4 +202,4 @@ model Arity {
199202
model Metadata {
200203
name: string;
201204
value?: unknown;
202-
}
205+
}

0 commit comments

Comments
 (0)