Skip to content
This repository was archived by the owner on Jan 19, 2018. It is now read-only.

Commit beef97f

Browse files
committed
Add JSON pointers to spec
1 parent ae84b33 commit beef97f

2 files changed

Lines changed: 41 additions & 1 deletion

File tree

spec/README.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,42 @@ Field Name | Type | Description
186186
<a name="parametersDefault"></a>default | `string` | **Optional** An optional default value for the parameter.
187187
<a name="parametersHidden"></a>hidden | `string` | **Optional** An optional boolean signifying the parameter should be obscured when displayed.
188188

189+
##### JSON Pointers
190+
JSON Pointers (otherwise known as XPathing) are supported by the Nulecule specification by implementing [RFC 6902](https://tools.ietf.org/html/rfc6902).
191+
A value can be provided by using the pointer reference within the JSON/Yaml format.
192+
193+
ex.
194+
```yaml
195+
description: mongoDB Admin password
196+
hidden: true
197+
constraints:
198+
- allowed_pattern: "[A-Z0-9]+"
199+
description: Must consist of characters and numbers only.
200+
default: 0
201+
param:
202+
- /spec/containers/0/param
203+
```
204+
```json
205+
{
206+
"name": "password",
207+
"description": "mongoDB Admin password",
208+
"hidden": true,
209+
"constraints": [
210+
{
211+
"allowed_pattern": "[A-Z0-9]+",
212+
"description": "Must consist of characters and numbers only.",
213+
"default": 0,
214+
"param": {
215+
"description": "An array of JSON pointers per RFC 6902.",
216+
"type": "array",
217+
"default": null
218+
}
219+
}
220+
]
221+
}
222+
```
223+
224+
189225
##### Parameters Object Example:
190226

191227
```yaml

spec/param.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,10 @@
2828
"description": "An optional boolean signifying the parameter should be obscured when displayed.",
2929
"type": "boolean",
3030
"default": false
31-
}
31+
},
32+
"param": [
33+
"/spec/containers/0/param",
34+
"/spec/containers/1/param"
35+
]
3236
}
3337
}

0 commit comments

Comments
 (0)