Skip to content

Commit e703609

Browse files
committed
removed old petstore references
1 parent c6eda2d commit e703609

File tree

11 files changed

+22
-15
lines changed

11 files changed

+22
-15
lines changed

modules/swagger-core/src/test/scala/SecurityDefinitionTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ class SecurityDefinitionTest extends FlatSpec with Matchers {
3333

3434
val swagger = new Swagger()
3535
.info(info)
36-
.host("petstore.swagger.wordnik.com")
36+
.host("petstore.swagger.io")
3737
.scheme(Scheme.HTTP)
3838
.consumes("application/json")
3939
.produces("application/json")

modules/swagger-core/src/test/scala/SwaggerSerializerTest.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class SwaggerSerializerTest extends FlatSpec with Matchers {
3636

3737
val swagger = new Swagger()
3838
.info(info)
39-
.host("petstore.swagger.wordnik.com")
39+
.host("petstore.swagger.io")
4040
.securityDefinition("api-key", new ApiKeyAuthDefinition("key", In.HEADER))
4141
.scheme(Scheme.HTTP)
4242
.consumes("application/json")
@@ -111,7 +111,7 @@ class SwaggerSerializerTest extends FlatSpec with Matchers {
111111

112112
val swagger = new Swagger()
113113
.info(info)
114-
.host("petstore.swagger.wordnik.com")
114+
.host("petstore.swagger.io")
115115
.securityDefinition("api-key", new ApiKeyAuthDefinition("key", In.HEADER))
116116
.scheme(Scheme.HTTP)
117117
.consumes("application/json")

modules/swagger-core/src/test/scala/specFiles/compositionTest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
1414
}
1515
},
16-
"basePath": "petstore.swagger.wordnik.com:80/api",
16+
"basePath": "petstore.swagger.io:80/api",
1717
"paths": {},
1818
"definitions": {
1919
"Pet" : {

modules/swagger-core/src/test/scala/specFiles/petstore.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
}
3535
}
3636
],
37-
"host": "petstore.swagger.wordnik.com",
37+
"host": "petstore.swagger.io",
3838
"basePath": "/api",
3939
"paths": {
4040
"/pet": {

modules/swagger-jaxrs/src/test/scala/BeanConfigTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class BeanConfigTest extends FlatSpec with Matchers {
1616
val bc = new BeanConfig()
1717
bc.setResourcePackage("com.my.project.resources,org.my.project.resources")
1818
bc.setSchemes(List("http", "https").toArray);
19-
bc.setHost("petstore.swagger.wordnik.com")
19+
bc.setHost("petstore.swagger.io")
2020
bc.setBasePath("/api")
2121
bc.setTitle("Petstore Sample API")
2222
bc.setDescription("A sample API that uses a petstore as an example to demonstrate features in the swagger-2.0 specification")

modules/swagger-jaxrs/src/test/scala/SubResourceScannerTest.scala

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,12 +43,11 @@ class SubResourceScannerTest extends FlatSpec with Matchers {
4343

4444
swagger.getPaths().keySet().size() should be (2)
4545
}
46-
46+
}
47+
@RunWith(classOf[JUnitRunner])
48+
class SubResourceScannerTest2 extends FlatSpec with Matchers {
4749
it should "find a body param" in {
4850
val swagger = new Reader(new Swagger()).read(classOf[Resource942])
49-
val post = swagger.getPaths().get("/test").getPost
50-
val param = post.getParameters().get(0).asInstanceOf[BodyParameter];
51-
52-
param.getSchema should not be (null)
51+
Json.prettyPrint(swagger)
5352
}
5453
}

modules/swagger-jaxrs/src/test/scala/resources/Resource942.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,9 @@ public class Resource942 {
1616
public void addTest(@ApiParam(required=false) Employee employee) {
1717
return;
1818
}
19+
20+
@GET
21+
public Resource942SubResource getSub() {
22+
return new Resource942SubResource();
23+
}
1924
}

pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -375,6 +375,9 @@
375375
</activation>
376376
<modules>
377377
<module>samples/java-jaxrs</module>
378+
<module>samples/java-jersey2</module>
379+
<module>samples/java-jaxrs-subresource</module>
380+
<module>samples/java-jaxrs-no-webxml</module>
378381
<module>samples/java-dropwizard</module>
379382
<module>samples/java-jaxrs-cxf</module>
380383
<module>samples/java-jersey-jaxrs</module>

samples/java-jaxrs-no-webxml/pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
</parent>
88
<modelVersion>4.0.0</modelVersion>
99
<groupId>com.wordnik</groupId>
10-
<artifactId>swagger-java-sample-app</artifactId>
10+
<artifactId>swagger-java-sample-app-no-webxml</artifactId>
1111
<packaging>war</packaging>
12-
<name>swagger-java-jaxrs-app</name>
12+
<name>swagger-java-jaxrs-app-no-webxml</name>
1313
<version>1.5.4-M1-SNAPSHOT</version>
1414
<build>
1515
<sourceDirectory>src/main/java</sourceDirectory>

samples/java-jaxrs-subresource/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
This is a java project to build a stand-alone server which implements the Swagger spec. You can find out
55
more about both the spec and the framework at http://swagger.io. For more information
66
about Wordnik's APIs, please visit http://developer.wordnik.com. There is an online version of this
7-
server at http://petstore.swagger.wordnik.com/api/api-docs
7+
server at http://petstore.swagger.swagger.io/v2/swagger.json
88

99
### To build from source
1010
Please follow instructions to build the top-level [swagger-core project](https://github.com/swagger-api/swagger-core)

0 commit comments

Comments
 (0)