Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fields max min #75

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
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
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,14 @@ A collection of fields, expressed as an array of objects in JSON Siren such as `

Fields represent controls inside of actions. They may contain these attributes:

####max

A string or number describing the maximum value among the allowed range of values. This property can only apply to a field with a linear or periodic domain. Optional.

####min

A string or number describing the minimum value arong the allowed range of values. This property can only apply to a field with a linear or periodic domain. Optional.

####name

A name describing the control. Field names MUST be unique within the set of fields for an action. The behaviour of clients when parsing a Siren document that violates this constraint is undefined. Required.
Expand Down
8 changes: 8 additions & 0 deletions siren.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,14 @@
"name"
],
"properties": {
"max": {
"description": "A string or number describing the maximum value among the allowed ranges of values for this field. This property can only apply to a field with a linear or periodic domain.",
"type": [ "string", "number" ]
},
"min": {
"description": "A string or number describing the minimum value among the allowed ranges of values for this field. This property can only apply to a field with a linear or periodic domain.",
"type": [ "string", "number" ]
},
"name": {
"description": "A name describing the control. Field names MUST be unique within the set of fields for an action. The behaviour of clients when parsing a Siren document that violates this constraint is undefined.",
"type": "string"
Expand Down