Skip to content

Commit

Permalink
Add "circumstances" list for inputs (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
stuartpb authored Nov 15, 2017
1 parent c492cbc commit a6e13e4
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
2 changes: 2 additions & 0 deletions draft/docs/forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Properties of forms that describe input fields consist of objects with an `input

Most inputs are assumed to be clear-text, but password inputs are assumed to be masked. In situations where this is not the case, a `characters` property will also be on the input, stating that an input is `masked` or `shown`, or, if the input allows the mask state to be toggled, `showable` or `maskable` (based on the respective initial states).

Inputs that appear separately from the rest of the form, or only appear under certain circumstances, may have a `circumstances` list describing these circumstances, following the [documentation on descriptions](descriptions.md).

### Username

The `username` property object of forms describes inputs for a username attached to the account, following the definition of "username" from [the main documentation on profiles](profiles.md).
Expand Down
15 changes: 15 additions & 0 deletions draft/profiles.copld.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@ definitions:
masking:
$ref: "#/definitions/maskedness"

circumstances:
$ref: "#/definitions/desclist"

accountfield:
type: object
minProperties: 1
Expand All @@ -111,6 +114,9 @@ definitions:
minItems: 2
uniqueItems: true

circumstances:
$ref: "#/definitions/desclist"

fieldvalue:
type: object
minProperties: 1
Expand Down Expand Up @@ -258,6 +264,9 @@ definitions:
- ascii
- question

circumstances:
$ref: "#/definitions/desclist"

resetrequest:
type: object
minProperties: 1
Expand Down Expand Up @@ -860,6 +869,9 @@ properties:
- implicit
- checkbox

circumstances:
$ref: "#/definitions/desclist"

login.:

url:
Expand Down Expand Up @@ -890,6 +902,9 @@ properties:
- checked
- unchecked

circumstances:
$ref: "#/definitions/desclist"

thirdparty.:

auth.:
Expand Down
15 changes: 15 additions & 0 deletions draft/profiles.json
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,9 @@
},
"masking": {
"$ref": "#/definitions/maskedness"
},
"circumstances": {
"$ref": "#/definitions/desclist"
}
}
},
Expand All @@ -116,6 +119,9 @@
},
"minItems": 2,
"uniqueItems": true
},
"circumstances": {
"$ref": "#/definitions/desclist"
}
}
},
Expand Down Expand Up @@ -291,6 +297,9 @@
"ascii",
"question"
]
},
"circumstances": {
"$ref": "#/definitions/desclist"
}
}
},
Expand Down Expand Up @@ -1153,6 +1162,9 @@
"implicit",
"checkbox"
]
},
"circumstances": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
Expand Down Expand Up @@ -1196,6 +1208,9 @@
"checked",
"unchecked"
]
},
"circumstances": {
"$ref": "#/definitions/desclist"
}
},
"minimumProperties": 1
Expand Down

0 comments on commit a6e13e4

Please sign in to comment.