From 5204de6bf5e396e9e395ef024c42de45944c04ef Mon Sep 17 00:00:00 2001 From: Martin Hauner Date: Tue, 9 Jun 2020 18:54:48 +0200 Subject: [PATCH 1/3] update openapi4j --- build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.gradle b/build.gradle index 83ae3153..478fe0b6 100644 --- a/build.gradle +++ b/build.gradle @@ -75,7 +75,7 @@ dependencies { compileOnly "com.github.hauner.openapi:openapi-processor-api:$processorApiVersion" - implementation 'org.openapi4j:openapi-parser:0.9' + implementation 'org.openapi4j:openapi-parser:1.0' implementation ('io.swagger.parser.v3:swagger-parser:2.0.20') { exclude group: 'io.swagger.parser.v3', module: 'swagger-parser-v2-converter' exclude group: 'io.swagger.core.v3', module: 'swagger-annotations' From cc834791ad8ccc3dcc1f546b07f16c42ddd0fcc5 Mon Sep 17 00:00:00 2001 From: Martin Hauner Date: Tue, 9 Jun 2020 18:55:10 +0200 Subject: [PATCH 2/3] run failing test in isolation --- .../hauner/openapi/processor/core/ProcessorPendingTest.groovy | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/testInt/groovy/com/github/hauner/openapi/processor/core/ProcessorPendingTest.groovy b/src/testInt/groovy/com/github/hauner/openapi/processor/core/ProcessorPendingTest.groovy index 99c9c691..4be37944 100644 --- a/src/testInt/groovy/com/github/hauner/openapi/processor/core/ProcessorPendingTest.groovy +++ b/src/testInt/groovy/com/github/hauner/openapi/processor/core/ProcessorPendingTest.groovy @@ -32,8 +32,8 @@ class ProcessorPendingTest extends ProcessorTestBase { @Parameterized.Parameters(name = "{0}") static Collection sources () { return [ - new TestSet(name: 'params-simple-data-types-micronaut', processor: new TestProcessor(), parser: ParserType.SWAGGER), - new TestSet(name: 'params-simple-data-types-micronaut', processor: new TestProcessor(), parser: ParserType.OPENAPI4J) +// new TestSet(name: 'ref-into-another-file', processor: new TestProcessor(), parser: ParserType.SWAGGER), + new TestSet(name: 'ref-into-another-file', processor: new TestProcessor(), parser: ParserType.OPENAPI4J), ] } From 68c08de7fab8e73368cd418ed91a1ed9045c2a5b Mon Sep 17 00:00:00 2001 From: Martin Hauner Date: Tue, 9 Jun 2020 18:56:00 +0200 Subject: [PATCH 3/3] fixed flattening of ref schema --- .../hauner/openapi/core/parser/openapi4j/RefResolver.groovy | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/groovy/com/github/hauner/openapi/core/parser/openapi4j/RefResolver.groovy b/src/main/groovy/com/github/hauner/openapi/core/parser/openapi4j/RefResolver.groovy index edc70096..a3d2e316 100644 --- a/src/main/groovy/com/github/hauner/openapi/core/parser/openapi4j/RefResolver.groovy +++ b/src/main/groovy/com/github/hauner/openapi/core/parser/openapi4j/RefResolver.groovy @@ -44,7 +44,7 @@ class RefResolver implements ParserRefResolver { resolved = o4jCompSchema } else { O4jSchema o4jSchema = (ref as Schema).schema - resolved = o4jSchema.copy (api.context, true) + resolved = o4jSchema.getReference(api.getContext()).getMappedContent(O4jSchema) } new Schema (resolved)