-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parameter validation for aws-wps requests #215
base: master
Are you sure you want to change the base?
Conversation
@anguss00 - time should not be a required parameter - we just made it optional not long ago to support bathymetry files which don't have a temporal dimension. |
Gotcha, thanks @jonescc. Will update |
42ca8fe
to
c2f8694
Compare
Probably better to validate on the regex defined in GGD originally. Will update this |
Done @jonescc |
throw new ValidationException("Request must have a subset"); | ||
} else { | ||
int latLonCount = 0; | ||
Pattern latLonPattern = Pattern.compile("([+-]?\\d+\\.?\\d+)\\s*,\\s*([+-]?\\d+\\.?\\d+)"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should probably align better with aggregator validation https://github.com/aodn/aws-wps/blob/master/aggregation-worker/src/main/java/au/org/emii/geoserver/client/SubsetParameters.java#L40 - we haven't used regexes for some time - they were problematic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better if they used the same code so they couldn't get out of synch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah that's a really good point. I'll amend that
@anguss00 is this still a pending merge? |
This was an extra reserve task that just didn't quite make it in. So yes, pending merge, but I think needs another change or two. |
Requests are validated as follows:
Subset, layer and callback email are required parameters.
Subset must have a latitude, longitude and temporal section.
If these conditions are not met, the request aborts before going to batch.
Add geonetwork URL as sandbox for development mode.