Skip to content

Commit

Permalink
Cleanup docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Marsup committed Nov 19, 2018
1 parent 76dcb36 commit 155c3df
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions API.md
Expand Up @@ -105,6 +105,7 @@
- [`object.nand(peers)`](#objectnandpeers)
- [`object.or(peers)`](#objectorpeers)
- [`object.xor(peers)`](#objectxorpeers)
- [`object.oxor(...peers)`](#objectoxorpeers)
- [`object.with(key, peers)`](#objectwithkey-peers)
- [`object.without(key, peers)`](#objectwithoutkey-peers)
- [`object.rename(from, to, [options])`](#objectrenamefrom-to-options)
Expand Down Expand Up @@ -223,6 +224,7 @@
- [`object.with`](#objectwith)
- [`object.without`](#objectwithout)
- [`object.xor`](#objectxor)
- [`object.oxor`](#objectoxor)
- [`string.alphanum`](#stringalphanum-1)
- [`string.base64`](#stringbase64)
- [`string.base`](#stringbase)
Expand Down Expand Up @@ -1973,7 +1975,7 @@ const schema = Joi.object().keys({
}).oxor('a', 'b');
```

💥 Possible validation errors:[`object.xor`](#objectxor), [`object.missing`](#objectmissing)
💥 Possible validation errors:[`object.oxor`](#objectoxor)

#### `object.with(key, peers)`

Expand Down Expand Up @@ -3847,8 +3849,24 @@ The XOR condition between the properties you specified was not satisfied in that
{
key: string, // Last element of the path accessing the value, `undefined` if at the root
label: string, // Label if defined, otherwise it's the key
peers: Array<string>, // List of properties were none of it was set
peersWithLabels: Array<string> // List of labels for the properties were none of it was set
peers: Array<string>, // List of properties where none of it or too many of it was set
peersWithLabels: Array<string> // List of labels for the properties where none of it or too many of it was set
}
```
#### `object.oxor`
**Description**
The optional XOR condition between the properties you specified was not satisfied in that object.
**Context**
```ts
{
key: string, // Last element of the path accessing the value, `undefined` if at the root
label: string, // Label if defined, otherwise it's the key
peers: Array<string>, // List of properties where too many of it was set
peersWithLabels: Array<string> // List of labels for the properties where too many of it was set
}
```
Expand Down

0 comments on commit 155c3df

Please sign in to comment.