Skip to content

Commit 934d6fd

Browse files
(GH-915, SCHEMA) Loosen type name pattern
Prior to this change, the pattern for fully qualified type names specified that a type name required an owner and supported up to two namespace segments, separated by a period (`.`). This change: - Loosens the pattern by allowing a third segment for subareas. - Updates the in-schema documentation to reflect the change. - Fixes #915
1 parent ab82f25 commit 934d6fd

File tree

2 files changed

+16
-12
lines changed

2 files changed

+16
-12
lines changed

schemas/src/definitions/extensionType.yaml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ title: DSC extension fully qualified type name
66
description: |
77
The namespaced name of the DSC extension, using the syntax:
88
9-
owner[.group][.area]/name
9+
<owner>[.<group>][.<area>][.<subarea>]/<name>
1010
1111
For example:
1212
13+
- Microsoft/Example
1314
- Microsoft.DSC/Docs
1415
- Microsoft.Windows.Appx/Discover
1516
1617
type: string
17-
pattern: ^\w+(\.\w+){0,2}\/\w+$
18+
pattern: ^\w+(\.\w+){0,3}\/\w+$
1819

1920
# VS Code only
2021
markdownDescription: |
@@ -25,16 +26,17 @@ markdownDescription: |
2526
The namespaced name of the DSC extension, using the syntax:
2627
2728
```yaml
28-
owner[.group][.area]/name
29+
owner[{.namespace}]/name
2930
```
3031
3132
For example:
3233
34+
- `Microsoft/Example`
3335
- `Microsoft.DSC/Docs`
3436
- `Microsoft.Windows.Appx/Discover`
3537
3638
[01]: <DOCS_BASE_URL>/reference/schemas/definitions/extensiontype?<DOCS_VERSION_PIN>
3739
patternErrorMessage: |
3840
Invalid type name. Valid extension type names always define an owner and a name separated by a
39-
slash, like `Microsoft/Example`. Type names may optionally include a group and area to namespace
40-
the extension under the owner, like `Microsoft.Windows.Appx/Discover`.
41+
slash, like `Microsoft/Example`. Type names may optionally include the group, area, and subarea
42+
segments to namespace the resource under the owner, like `Microsoft.Windows.Appx/Discover`.

schemas/src/definitions/resourceType.yaml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,16 @@ title: DSC resource fully qualified type name
66
description: |
77
The namespaced name of the DSC resource, using the syntax:
88
9-
owner[.group][.area]/name
9+
<owner>[.<group>][.<area>][.<subarea>]/<name>
1010
1111
For example:
1212
13-
- Microsoft.SqlServer/Database
14-
- Microsoft.SqlServer.Database/User
13+
- Microsoft/OSInfo
14+
- Microsoft.SqlServer/Database
15+
- Microsoft.SqlServer.Database/User
1516
1617
type: string
17-
pattern: ^\w+(\.\w+){0,2}\/\w+$
18+
pattern: ^\w+(\.\w+){0,3}\/\w+$
1819

1920
# VS Code only
2021
markdownDescription: |
@@ -25,16 +26,17 @@ markdownDescription: |
2526
The namespaced name of the DSC resource, using the syntax:
2627
2728
```yaml
28-
owner[.group][.area]/name
29+
<owner>[.<group>][.<area>][.<subarea>]/<name>
2930
```
3031
3132
For example:
3233
34+
- `Microsoft/OSInfo`
3335
- `Microsoft.SqlServer/Database`
3436
- `Microsoft.SqlServer.Database/User`
3537
3638
[01]: <DOCS_BASE_URL>/reference/schemas/definitions/resourcetype?<DOCS_VERSION_PIN>
3739
patternErrorMessage: |
3840
Invalid type name. Valid resource type names always define an owner and a name separated by a
39-
slash, like `Microsoft/OSInfo`. Type names may optionally include a group and area to namespace
40-
the resource under the owner, like `Microsoft.Windows/Registry`.
41+
slash, like `Microsoft/OSInfo`. Type names may optionally include the group, area, and subarea
42+
segments to namespace the resource under the owner, like `Microsoft.Windows/Registry`.

0 commit comments

Comments
 (0)