Skip to content

Commit

Permalink
features: add unsafeAnnotationPrefixes
Browse files Browse the repository at this point in the history
Fix issue 1202

Signed-off-by: Akihiro Suda <akihiro.suda.cz@hco.ntt.co.jp>
  • Loading branch information
AkihiroSuda committed May 16, 2023
1 parent 0983f1d commit 67e8954
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
12 changes: 12 additions & 0 deletions features.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,18 @@ Annotations MUST be a key-value map that follows the same convention as the Key
}
```

## <a name="featuresUnsafeAnnotationPrefixes" />Unsafe annotation prefixes

**`unsafeAnnotationPrefixes`** (array of strings, OPTIONAL) contains prefixes of the [`annotations` property of `config.json`](config.md#annotations)
that may change the behavior of the runtime.

### Example
```json
"unsafeAnnotationPrefixes": [
"org.systemd.property."
]
```

# Example

Here is a full example for reference.
Expand Down
3 changes: 3 additions & 0 deletions schema/features-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@
},
"annotations": {
"$ref": "defs.json#/definitions/annotations"
},
"unsafeAnnotationPrefixes": {
"$ref": "defs.json#/definitions/ArrayOfStrings"
},
"linux": {
"$ref": "features-linux.json#/linux"
Expand Down
4 changes: 4 additions & 0 deletions specs-go/features/features.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ type Features struct {
// Annotations contains implementation-specific annotation strings,
// such as the implementation version, and third-party extensions.
Annotations map[string]string `json:"annotations,omitempty"`

// UnsafeAnnotationPrefixes is the list of the unsafe prefixes of the annotations
// that may appear in `config.json`.
UnsafeAnnotationPrefixes []string `json:"unsafeAnnotationPrefixes,omitempty"`
}

// Linux is specific to Linux.
Expand Down

0 comments on commit 67e8954

Please sign in to comment.