Skip to content
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

Add skeleton query validation endpoint #2595

Open
wants to merge 6 commits into
base: integration
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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}/validate")
@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
Loading