I'm developing a scala Application with play framework. i validate the request body using play json schema validator and the validation works perfect, i'm validating the the path variable using filter but my problem is i have to get every pattern and trying to match the url which i received then i have to split them into array then i need to execute my validation, it's pretty hard to do it and it needs a lot of code in order to validate the path variables, i have around 80 API each api has different path variable, it's unlogical to create 80 filter or 80 action builder, im wondering if there is something like play json schema validator, or can i merge it to take another attribute. orderId should be passed by path variable here is my schema
{
"properties": {
"vouchersCount": {
"type": "integer",
"minimum": 1,
"maximum": 100
},
"orderId": {
"type": "integer",
"minimum": 50,
"maximum": 90,
"in": "path"
},
"comments": {
"type": "string"
}
},
"required": [
"vouchersCount",
"comments",
"orderId"
]
}
Thanks for any suggestions