Skip to content
This repository was archived by the owner on Jan 19, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions spec/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,42 @@ Field Name | Type | Description
<a name="parametersDefault"></a>default | `string` | **Optional** An optional default value for the parameter.
<a name="parametersHidden"></a>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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no quotes?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, no quotes needed in yaml

```
```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
Expand Down
5 changes: 5 additions & 0 deletions spec/param.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,11 @@
"description": "An optional boolean signifying the parameter should be obscured when displayed.",
"type": "boolean",
"default": false
},
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this file we're providing a programatic view of what the data structure looks like, not an example.

"param": {
"description": "An array of XPath strings per RFC 6902.",
"type": "array",
"default": "null"
}
}
}