File tree Expand file tree Collapse file tree 2 files changed +38
-2
lines changed
java/com/fusiondb/studio/api Expand file tree Collapse file tree 2 files changed +38
-2
lines changed Original file line number Diff line number Diff line change 2121
2222import static com .fusiondb .studio .api .API .getApiBaseUri ;
2323import static io .restassured .RestAssured .when ;
24+ import static io .restassured .module .jsv .JsonSchemaValidator .matchesJsonSchemaInClasspath ;
25+ import static org .apache .http .HttpStatus .SC_OK ;
2426
2527public class VersionIT {
2628
2729 @ Test
2830 public void getServerVersion () {
2931 when ().
3032 get (getApiBaseUri () + "/version" ).
31- then ()
32- .statusCode (200 );
33+ then ().
34+ statusCode (SC_OK ).
35+ assertThat ().
36+ body (matchesJsonSchemaInClasspath ("version-schema.json" ));
3337 }
3438}
Original file line number Diff line number Diff line change 1+ {
2+ "$schema" : " http://json-schema.org/draft-07/schema#" ,
3+ "title" : " Document" ,
4+ "type" : " object" ,
5+ "required" : [ " version" , " server" ],
6+ "properties" : {
7+ "version" : {
8+ "type" : " string" ,
9+ "description" : " version string" ,
10+ "example" : " 1.2.3"
11+ },
12+ "server" : {
13+ "type" : " object" ,
14+ "description" : " server version" ,
15+ "properties" : {
16+ "product-name" : {
17+ "type" : " string"
18+ },
19+ "version" : {
20+ "type" : " string" ,
21+ "example" : " 1.2.3"
22+ },
23+ "revision" : {
24+ "type" : " string"
25+ },
26+ "build" : {
27+ "type" : " string"
28+ }
29+ }
30+ }
31+ }
32+ }
You can’t perform that action at this time.
0 commit comments