Skip to content

Commit

Permalink
Add skeleton query validation endpoint
Browse files Browse the repository at this point in the history
Add a skeleton implementation of a query validation endpoint to allow
partners to begin implementation.

Part of work for #2585
  • Loading branch information
lbschanno committed Oct 4, 2024
1 parent 9435549 commit 18be05c
Showing 1 changed file with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2997,6 +2997,26 @@ private void updateQueryParams(Query q, String queryLogicName, String query, Dat
}
}

/**
* @param queryLogicName
* the logic name
* @param queryParameters
* the query parameters
* @return the generic response
*/
@POST
@Produces({"application/xml", "text/xml", "application/json", "text/yaml", "text/x-yaml", "application/x-yaml", "application/x-protobuf",
"application/x-protostuff"})
@Path("/{logicName}/validateQuery")
@Interceptors({RequiredInterceptor.class, ResponseInterceptor.class})
@Timed(name = "dw.query.validateQuery", absolute = true)
public GenericResponse<String> validateQuery(@Required("logicName") @PathParam("logicName") String queryLogicName,
MultivaluedMap<String,String> queryParameters) {
GenericResponse<String> response = new GenericResponse<>();
response.setMessages(Collections.singletonList("Query validator coming soon."));
throw new DatawaveWebApplicationException(new UnsupportedOperationException("Query validator not implemented"), response, 501);
}

/**
* <strong>Administrator credentials required.</strong> Returns list of queries for some other user
*
Expand Down

0 comments on commit 18be05c

Please sign in to comment.