Skip to content
Snippets Groups Projects
Commit 01707211 authored by Clayton, Brandon Scott's avatar Clayton, Brandon Scott
Browse files

Add schema for swagger

parent 422f5e28
No related branches found
No related tags found
2 merge requests!109Production Release,!107AASHTO Updates
......@@ -187,10 +187,8 @@ public abstract class NetcdfService {
}
static class ResponseMetadata extends RequestDataSiteClass {
@Schema(description = "X label")
public final String xLabel;
@Schema(description = "Y label")
public final String yLabel;
public String xLabel;
public String yLabel;
ResponseMetadata(
String xLabel,
......@@ -204,19 +202,26 @@ public abstract class NetcdfService {
}
static class ResponseData<T extends ResponseMetadata> {
@Schema(description = "Response metadata")
public final T metadata;
@Schema(description = "Data")
public final XySequence data;
final T metadata;
final XySequence data;
ResponseData(T metadata, XySequence data) {
this.metadata = metadata;
this.data = data;
}
public T getMetadata() {
return metadata;
}
@Schema(implementation = XySequenceSchema.class)
public XySequence getData() {
return data;
}
}
static class RequestData {
@Schema(description = "The latitude and longitude, in degrees")
@Schema(implementation = LocationSchema.class)
public Location site;
RequestData(Location site) {
......@@ -233,4 +238,16 @@ public abstract class NetcdfService {
this.siteClass = siteClass;
}
}
private static class LocationSchema {
public Double latitude;
public Double longitude;
LocationSchema() {}
}
private static class XySequenceSchema {
public double[] xs;
public double[] ys;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment