@@ -16,8 +16,7 @@ class RefSpec: StringSpec({
1616
1717 " parses ref into another file" {
1818 val api = ApiBuilder ()
19- .withResource("/v30/ref-into-another-file/openapi.yaml")
20- .buildOpenApi30()
19+ .buildOpenApi30("/v30/ref-into-another-file/openapi.yaml")
2120
2221 val schema = api.getResponseSchema("/foo", "200", "application/json")
2322 schema.ref shouldBe " foo.yaml#/Foo"
@@ -30,8 +29,7 @@ class RefSpec: StringSpec({
3029
3130 " parses ref array items with nested ref" {
3231 val api = ApiBuilder ()
33- .withResource("/v30/ref-array-items-nested/openapi.yaml")
34- .buildOpenApi30()
32+ .buildOpenApi30("/v30/ref-array-items-nested/openapi.yaml")
3533
3634 val schema = api.getResponseSchema("/array", "200", "application/json")
3735 schema.type shouldBe " array"
@@ -54,8 +52,7 @@ class RefSpec: StringSpec({
5452
5553 " parses ref loop" {
5654 val api = ApiBuilder ()
57- .withResource("/v30/ref-loop/openapi.yaml")
58- .buildOpenApi30()
55+ .buildOpenApi30("/v30/ref-loop/openapi.yaml")
5956
6057 val schema = api.getResponseSchema("/self-reference", "200", "application/json")
6158 schema.ref shouldBe " #/components/schemas/Self"
@@ -73,8 +70,7 @@ class RefSpec: StringSpec({
7370
7471 " parses array ref items with nested array and ref items loop" {
7572 val api = ApiBuilder ()
76- .withResource("/v30/ref-loop-array/openapi.yaml")
77- .buildOpenApi30()
73+ .buildOpenApi30("/v30/ref-loop-array/openapi.yaml")
7874
7975 val schema = api.getResponseSchema("/response-ref", "200", "application/json")
8076
@@ -115,8 +111,7 @@ class RefSpec: StringSpec({
115111
116112 " parses ref in parameter" {
117113 val api = ApiBuilder ()
118- .withResource("/v30/ref-parameter/openapi.yaml")
119- .buildOpenApi30()
114+ .buildOpenApi30("/v30/ref-parameter/openapi.yaml")
120115
121116 val parameters = api.getParameters("/foo")
122117 parameters.size shouldBe 1
@@ -131,8 +126,7 @@ class RefSpec: StringSpec({
131126
132127 " parses ref relative to current file" {
133128 val api = ApiBuilder ()
134- .withResource("/v30/ref-is-relative-to-current-file/openapi.yaml")
135- .buildOpenApi30()
129+ .buildOpenApi30("/v30/ref-is-relative-to-current-file/openapi.yaml")
136130
137131 val schema = api.getResponseSchema("/foo", "200", "application/json")
138132 schema.ref shouldBe " schemas/foo.yaml#/Foo"
@@ -151,8 +145,7 @@ class RefSpec: StringSpec({
151145
152146 " parses ref into another file without pointer" {
153147 val api = ApiBuilder ()
154- .withResource("/v30/ref-into-another-file-path/openapi.yaml")
155- .buildOpenApi30()
148+ .buildOpenApi30("/v30/ref-into-another-file-path/openapi.yaml")
156149
157150 val paths = api.paths
158151 val pathItem = paths.getPathItem("/foo")
@@ -169,8 +162,7 @@ class RefSpec: StringSpec({
169162
170163 " parses ~ escaped ref path into another file" {
171164 val api = ApiBuilder ()
172- .withResource("/v30/ref-to-escaped-path-name/openapi.yaml")
173- .buildOpenApi30()
165+ .buildOpenApi30("/v30/ref-to-escaped-path-name/openapi.yaml")
174166
175167 val paths = api.paths
176168
0 commit comments