diff --git a/spec/README.md b/spec/README.md index 40f3620..fc4e453 100644 --- a/spec/README.md +++ b/spec/README.md @@ -186,6 +186,42 @@ Field Name | Type | Description default | `string` | **Optional** An optional default value for the parameter. hidden | `string` | **Optional** An optional boolean signifying the parameter should be obscured when displayed. +##### JSON Pointers +JSON Pointers (otherwise known as XPathing) are supported by the Nulecule specification by implementing [RFC 6902](https://tools.ietf.org/html/rfc6902). +A value can be provided by using the pointer reference within the JSON/Yaml format. + +ex. +```yaml +description: mongoDB Admin password +hidden: true +constraints: + - allowed_pattern: "[A-Z0-9]+" + description: Must consist of characters and numbers only. + default: 0 + param: + - /spec/containers/0/param +``` +```json +{ + "name": "password", + "description": "mongoDB Admin password", + "hidden": true, + "constraints": [ + { + "allowed_pattern": "[A-Z0-9]+", + "description": "Must consist of characters and numbers only.", + "default": 0, + "param": { + "description": "An array of JSON pointers per RFC 6902.", + "type": "array", + "default": null + } + } + ] +} +``` + + ##### Parameters Object Example: ```yaml diff --git a/spec/param.json b/spec/param.json index 18f9811..d865066 100644 --- a/spec/param.json +++ b/spec/param.json @@ -28,6 +28,11 @@ "description": "An optional boolean signifying the parameter should be obscured when displayed.", "type": "boolean", "default": false + }, + "param": { + "description": "An array of XPath strings per RFC 6902.", + "type": "array", + "default": "null" } } }