mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 20:47:44 +00:00
Hardening mock generator with a few more tests
Signed-off-by: Quobix <dave@quobix.com>
This commit is contained in:
@@ -92,8 +92,6 @@ func (mg *MockGenerator) GenerateMock(mock any, name string) ([]byte, error) {
|
||||
// check if this is a SchemaProxy, if not, then see if it has a Schema, if not, then we can't generate a mock.
|
||||
var schemaValue *highbase.Schema
|
||||
switch reflect.TypeOf(mock) {
|
||||
case reflect.TypeOf(&highbase.SchemaProxy{}):
|
||||
schemaValue = mock.(*highbase.SchemaProxy).Schema()
|
||||
case reflect.TypeOf(&highbase.Schema{}):
|
||||
schemaValue = mock.(*highbase.Schema)
|
||||
default:
|
||||
|
||||
Reference in New Issue
Block a user