We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
from the rules object of the example it is not clear where standard json-schema syntax can be used and library syntax is needed.
It seems that when, then, otherwise, is, actions are keywords from the library, while this oject in is is json-schema.
when
then
otherwise
is
actions
const rules = { dailyTemp: { when: [ { weather: { params: { query: '{{city}}', appId: '{{apiKey}}', units: '{{units}}', }, path: 'main.temp', is: { type: 'number', minimum: '{{hotTemp}}', }, }, }, ], then: { actions: [ { type: 'log', params: { message: 'Quite hot out today!' }, }, ], }, otherwise: { actions: [ { type: 'log', params: { message: 'Brrr, bundle up!' }, }, ], }, }, };
If this is correct, a simple rule could be written as:
const rules = { simple: { when: [ { weather: {}, is: { type: 'object', properties { temp: { type: 'number' } } }, }, }, ], }
Is this correct?
The text was updated successfully, but these errors were encountered:
No branches or pull requests
from the rules object of the example it is not clear where standard json-schema syntax can be used and library syntax is needed.
It seems that
when
,then
,otherwise
,is
,actions
are keywords from the library, while this oject inis
is json-schema.If this is correct, a simple rule could be written as:
Is this correct?
The text was updated successfully, but these errors were encountered: