Skip to content

Commit

Permalink
minor extension schema rest service fix
Browse files Browse the repository at this point in the history
  • Loading branch information
1azyman committed Feb 28, 2019
1 parent 89adcf3 commit 7d373cb
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -102,9 +102,9 @@ public Response getSchema(@PathParam("name") String name) {
.entity("Name not defined").build();
}

if (!name.toLowerCase().endsWith("\\.xsd")) {
if (!name.toLowerCase().endsWith(".xsd") && name.length() > 4) {
return Response.status(Response.Status.BAD_REQUEST).type(MediaType.TEXT_PLAIN_TYPE)
.entity("Name must be and xsd schema (.xsd extension expected)").build();
.entity("Name must be an xsd schema (.xsd extension expected)").build();
}

SchemaRegistry registry = prismContext.getSchemaRegistry();
Expand Down

0 comments on commit 7d373cb

Please sign in to comment.