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

Commit

Permalink
Add XPathing to spec
Browse files Browse the repository at this point in the history
  • Loading branch information
cdrage committed Dec 17, 2015
1 parent f88dd67 commit f324e8e
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 2 deletions.
36 changes: 36 additions & 0 deletions spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,42 @@ constraints:
```


##### 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 XPath strings per RFC 6902.",
"type": "array",
"default": null
}
}
]
}
```


##### Parameters Object Example:

```yaml
Expand Down
4 changes: 2 additions & 2 deletions spec/param.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
"default": false
},
"param": [
'/spec/containers/0/param',
'/spec/containers/1/param'
"/spec/containers/0/param",
"/spec/containers/1/param"
]
}
}

0 comments on commit f324e8e

Please sign in to comment.