Open Rainshaw opened 1 year ago
That depends on how rc.InterceptType
is handled.
If jsonschema.InterceptType
function is used, original interceptor will be preserved and new one would be added to the chain.
But it is also possible to replace rc.InterceptType
and discard all prev configuration, that's up to a developer.
Though, this is not so relevant now, as exported rc.InterceptType
has got deprecated in favor of unexported rc.interceptSchema
and jsonschema.InterceptSchema
config option.
https://github.com/swaggest/jsonschema-go/blob/d4b7536630ed226438fc6fc2b3226a3f1a0ee285/reflect.go#L229-L244
the rc instance does not set InterceptProperty filed, so the L236 just set rc.InterceptProperty = checkSchemaSetup.
When the options applied, the InterceptProperty would be rewrite.