Skip to content
This repository was archived by the owner on Mar 16, 2025. It is now read-only.

Commit 0c628dd

Browse files
committed
clean up
1 parent 6898ae4 commit 0c628dd

File tree

1 file changed

+6
-6
lines changed
  • src/main/kotlin/io/openapiprocessor/core/parser/swagger

1 file changed

+6
-6
lines changed

src/main/kotlin/io/openapiprocessor/core/parser/swagger/Parser.kt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
package io.openapiprocessor.core.parser.swagger
1818

1919
import io.openapiprocessor.core.misc.toURL
20-
import io.openapiprocessor.core.parser.OpenApi as ParserOpenApi
2120
import io.swagger.v3.parser.OpenAPIV3Parser
2221
import io.swagger.v3.parser.core.models.ParseOptions
2322
import io.swagger.v3.parser.core.models.SwaggerParseResult
23+
import io.openapiprocessor.core.parser.OpenApi as ParserOpenApi
2424

2525
const val SCHEME_RESOURCE = "resource:"
2626

@@ -35,10 +35,10 @@ open class Parser {
3535
val opts = ParseOptions()
3636
// loads $refs to other files into #/components/schema and replaces the $refs to the
3737
// external files with $refs to #/components/schema.
38-
opts.setResolve(true)
38+
opts.isResolve = true
3939

4040
val result: SwaggerParseResult = OpenAPIV3Parser()
41-
.readLocation (preparePath (apiPath), null, opts)
41+
.readLocation(preparePath(apiPath), null, opts)
4242

4343
return OpenApi(result)
4444
}
@@ -49,16 +49,16 @@ open class Parser {
4949
// If it is something different (or nothing) it tries to find the given path as-is on the
5050
// file system. If that fails it tries to load the path as resource.
5151

52-
if (isResource (path)) {
52+
if (isResource(path)) {
5353
// strip resource: (only used by tests) to load test files from the resources
54-
return path.substring (SCHEME_RESOURCE.length)
54+
return path.substring(SCHEME_RESOURCE.length)
5555
}
5656

5757
return toURL(path).toString ()
5858
}
5959

6060
private fun isResource(path: String): Boolean {
61-
return path.startsWith (SCHEME_RESOURCE)
61+
return path.startsWith(SCHEME_RESOURCE)
6262
}
6363

6464
}

0 commit comments

Comments
 (0)