diff --git a/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/openapi/OperationBuilderTest.kt b/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/openapi/OperationBuilderTest.kt index 219a1175..39184ed1 100644 --- a/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/openapi/OperationBuilderTest.kt +++ b/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/openapi/OperationBuilderTest.kt @@ -935,11 +935,12 @@ class OperationBuilderTest : StringSpec({ routes: List, pluginConfig: PluginConfigDsl = defaultPluginConfig ): SchemaContext { + val pluginConfigData = pluginConfig.build(PluginConfigData.DEFAULT) return SchemaContextBuilder( - config = pluginConfig.build(PluginConfigData.DEFAULT), + config = pluginConfigData, schemaBuilder = SchemaBuilder( - definitionsField = pluginConfig.encodingConfig.schemaDefinitionsField, - schemaEncoder = pluginConfig.encodingConfig.getSchemaEncoder(), + definitionsField = pluginConfigData.encoding.schemaDefsField, + schemaEncoder = pluginConfigData.encoding.schemaEncoder, ObjectMapper(), TypeOverwrites.get() ) diff --git a/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/openapi/PathsBuilderTest.kt b/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/openapi/PathsBuilderTest.kt index 16fcba24..29f69a44 100644 --- a/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/openapi/PathsBuilderTest.kt +++ b/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/openapi/PathsBuilderTest.kt @@ -92,11 +92,12 @@ class PathsBuilderTest : StringSpec({ private val defaultPluginConfig = PluginConfigDsl() private fun schemaContext(routes: List, pluginConfig: PluginConfigDsl = defaultPluginConfig): SchemaContext { + val pluginConfigData = pluginConfig.build(PluginConfigData.DEFAULT) return SchemaContextBuilder( - config = pluginConfig.build(PluginConfigData.DEFAULT), + config = pluginConfigData, schemaBuilder = SchemaBuilder( - definitionsField = pluginConfig.encodingConfig.schemaDefinitionsField, - schemaEncoder = pluginConfig.encodingConfig.getSchemaEncoder(), + definitionsField = pluginConfigData.encoding.schemaDefsField, + schemaEncoder = pluginConfigData.encoding.schemaEncoder, ObjectMapper(), TypeOverwrites.get() ) diff --git a/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/schema/SchemaContextTest.kt b/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/schema/SchemaContextTest.kt index d9d0c0e2..f4040d46 100644 --- a/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/schema/SchemaContextTest.kt +++ b/src/test/kotlin/io/github/smiley4/ktorswaggerui/tests/schema/SchemaContextTest.kt @@ -500,11 +500,12 @@ class SchemaContextTest : StringSpec({ routes: Collection, pluginConfig: PluginConfigDsl = defaultPluginConfig ): SchemaContext { + val pluginConfigData = pluginConfig.build(PluginConfigData.DEFAULT) return SchemaContextBuilder( - config = pluginConfig.build(PluginConfigData.DEFAULT), + config = pluginConfigData, schemaBuilder = SchemaBuilder( - definitionsField = pluginConfig.encodingConfig.schemaDefinitionsField, - schemaEncoder = pluginConfig.encodingConfig.getSchemaEncoder(), + definitionsField = pluginConfigData.encoding.schemaDefsField, + schemaEncoder = pluginConfigData.encoding.schemaEncoder, ObjectMapper(), TypeOverwrites.get() )