Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-ws-static
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-ws-static
Commits
01707211
Commit
01707211
authored
3 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
Add schema for swagger
parent
422f5e28
No related branches found
No related tags found
2 merge requests
!109
Production Release
,
!107
AASHTO Updates
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfService.java
+26
-9
26 additions, 9 deletions
...a/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfService.java
with
26 additions
and
9 deletions
src/lib/src/main/java/gov/usgs/earthquake/nshmp/netcdf/www/NetcdfService.java
+
26
−
9
View file @
01707211
...
...
@@ -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
;
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment