Add request validation against xsd
Change-Id: Iadf618e50d01dd92bf9eed5b8ed98138b56c20c9
This commit is contained in:
parent
aabc9d75f2
commit
9a14f9bfab
10 changed files with 205 additions and 10 deletions
|
@ -0,0 +1,9 @@
|
|||
package pl.touk.mockserver.client
|
||||
|
||||
import groovy.transform.CompileStatic
|
||||
import groovy.transform.TypeChecked
|
||||
|
||||
@CompileStatic
|
||||
@TypeChecked
|
||||
class InvalidMockRequestSchema extends RuntimeException {
|
||||
}
|
|
@ -42,6 +42,9 @@ class Util {
|
|||
if (message == 'mock not registered') {
|
||||
throw new MockDoesNotExist()
|
||||
}
|
||||
if (message == 'mock request schema is invalid schema') {
|
||||
throw new InvalidMockRequestSchema()
|
||||
}
|
||||
throw new InvalidMockDefinition(message)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue