Skip to content

Commit

Permalink
location: adapt JSON schema for pickup_name required if is_pickup
Browse files Browse the repository at this point in the history
Before this change, the location JSON schema accept that the location was a
pickup location (is_pickup=true) but without pickup_name. This fix change this
behavior ; when a location is defined as pickup location, then the 'pickup_name'
is now required.

Note : the schema already contains behavior for the formly editor

* Closes rero#794.

Co-Authored-by: Renaud Michotte <renaud.michotte@gmail.com>
  • Loading branch information
zannkukai committed Mar 13, 2020
1 parent 5da590e commit 6552d3b
Showing 1 changed file with 25 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,5 +113,28 @@
}
}
}
}
}
},
"oneOf": [
{
"properties": {
"is_pickup": {
"enum": [
true
]
}
},
"required": [
"pickup_name"
]
},
{
"properties": {
"is_pickup": {
"enum": [
false
]
}
}
}
]
}

0 comments on commit 6552d3b

Please sign in to comment.