File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
src/test/scala/com/github/swagger/pekko Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -19,6 +19,7 @@ import com.github.swagger.pekko.samples._
1919import io .swagger .v3 .jaxrs2 .Reader
2020import io .swagger .v3 .oas .models .OpenAPI
2121import io .swagger .v3 .oas .models .info .Info
22+ import io .swagger .v3 .oas .models .servers .Server
2223
2324import scala .collection .JavaConverters ._
2425import org .scalatest .matchers .should .Matchers
@@ -175,15 +176,19 @@ class ApiReaderSpec
175176 }
176177
177178 " passed a properly annotated HttpService with multiple schemes" should {
179+ val s1 = new Server ()
180+ s1.setUrl(" http://www.example.com" )
181+ val s2 = new Server ()
182+ s2.setUrl(" https://www.example.com" )
183+ val servers = List (s1, s2)
178184 val apiConfig = new OpenAPI ()
179- // .host(HOST)
180- // .schemes(List(Scheme.HTTP, Scheme.HTTPS).asJava)
185+ .servers(servers.asJava)
181186 .info(apiInfo)
182187 val reader = new Reader (apiConfig)
183188 val api = reader.read(Set [Class [_]](classOf [DictHttpService ]).asJava)
184189
185190 " set the schemes" in {
186- // api.getSchemes() shouldBe List(Scheme.HTTP, Scheme.HTTPS).asJava
191+ api.getServers.asScala shouldEqual servers
187192 }
188193 }
189194
You can’t perform that action at this time.
0 commit comments