Skip to content

Commit

Permalink
Merge pull request #592 from garethahealy/master
Browse files Browse the repository at this point in the history
Updated swagger return types to match actual return types
  • Loading branch information
Stefan Negrea committed Sep 1, 2016
2 parents 19ccafe + 4d68776 commit 1fe9810
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
Expand Up @@ -55,6 +55,7 @@
import org.hawkular.metrics.core.service.Functions;
import org.hawkular.metrics.core.service.Order;
import org.hawkular.metrics.model.ApiError;
import org.hawkular.metrics.model.AvailabilityBucketPoint;
import org.hawkular.metrics.model.AvailabilityType;
import org.hawkular.metrics.model.Buckets;
import org.hawkular.metrics.model.DataPoint;
Expand Down Expand Up @@ -422,7 +423,7 @@ public void getMetricData(
@Path("/{id}/stats")
@ApiOperation(value = "Retrieve availability data.", notes = "Based on buckets or bucketDuration query parameter" +
", the time range between start and end will be divided in buckets of equal duration, and " +
"availability statistics will be computed for each bucket.", response = DataPoint.class,
"availability statistics will be computed for each bucket.", response = AvailabilityBucketPoint.class,
responseContainer = "List")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successfully fetched availability data."),
Expand Down
Expand Up @@ -514,7 +514,7 @@ public void getMetricData(
@Path("/{id}/stats")
@ApiOperation(value = "Retrieve counter data points.", notes = "When buckets or bucketDuration query parameter " +
"is used, the time range between start and end will be divided in buckets of equal duration, and metric " +
"statistics will be computed for each bucket.", response = DataPoint.class, responseContainer =
"statistics will be computed for each bucket.", response = NumericBucketPoint.class, responseContainer =
"List")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successfully fetched metric data."),
Expand Down Expand Up @@ -610,7 +610,7 @@ public void getMetricStats(
"used, the time range between start and end will be divided in buckets of equal duration, and metric " +
"statistics will be computed for each bucket. Reset events are detected and data points that immediately " +
"follow such events are filtered out prior to calculating the rates. This avoid misleading or inaccurate " +
"rates when resets occur.", response = DataPoint.class, responseContainer = "List")
"rates when resets occur.", response = NumericBucketPoint.class, responseContainer = "List")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successfully fetched metric data."),
@ApiResponse(code = 204, message = "No metric data was found."),
Expand Down Expand Up @@ -681,7 +681,7 @@ public void getMetricRate(
"will be divided in buckets of equal duration, and metric " +
"statistics will be computed for each bucket. Reset events are detected and data points that immediately " +
"follow such events are filtered out prior to calculating the rates. This avoid misleading or inaccurate " +
"rates when resets occur.", response = DataPoint.class, responseContainer = "List")
"rates when resets occur.", response = NumericBucketPoint.class, responseContainer = "List")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successfully fetched metric data."),
@ApiResponse(code = 204, message = "No metric data was found."),
Expand Down
Expand Up @@ -64,6 +64,7 @@
import org.hawkular.metrics.model.MetricId;
import org.hawkular.metrics.model.NumericBucketPoint;
import org.hawkular.metrics.model.Percentile;
import org.hawkular.metrics.model.TaggedBucketPoint;
import org.hawkular.metrics.model.exception.RuntimeApiError;
import org.hawkular.metrics.model.param.BucketConfig;
import org.hawkular.metrics.model.param.Duration;
Expand Down Expand Up @@ -518,7 +519,7 @@ public void getMetricData(
@Path("/{id}/stats")
@ApiOperation(value = "Retrieve gauge data.", notes = "The time range between start and end will be divided "
+ "in buckets of equal duration, and metric statistics will be computed for each bucket.",
response = DataPoint.class, responseContainer = "List")
response = NumericBucketPoint.class, responseContainer = "List")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successfully fetched metric data."),
@ApiResponse(code = 204, message = "No metric data was found."),
Expand Down Expand Up @@ -670,7 +671,7 @@ public void getStats(
@Path("/{id}/stats/tags/{tags}")
@ApiOperation(value = "Fetches data points and groups them into buckets based on one or more tag filters. The " +
"data points in each bucket are then transformed into aggregated (i.e., bucket) data points.",
response = DataPoint.class, responseContainer = "Map")
response = TaggedBucketPoint.class, responseContainer = "Map")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successfully fetched metric data."),
@ApiResponse(code = 204, message = "No metric data was found."),
Expand Down Expand Up @@ -831,7 +832,7 @@ public void getMetricRate(
@ApiOperation(
value = "Retrieve stats for gauge rate data points.", notes = "The time range between start and end " +
"will be divided in buckets of equal duration, and metric statistics will be computed for each bucket.",
response = DataPoint.class, responseContainer = "List")
response = NumericBucketPoint.class, responseContainer = "List")
@ApiResponses(value = {
@ApiResponse(code = 200, message = "Successfully fetched metric data."),
@ApiResponse(code = 204, message = "No metric data was found."),
Expand Down

0 comments on commit 1fe9810

Please sign in to comment.