Class JsonSchemaEndPoint


  • @Produces("application/json;charset=UTF-8")
    @Path("/jsonSchema")
    public class JsonSchemaEndPoint
    extends Object
    • Constructor Detail

      • JsonSchemaEndPoint

        public JsonSchemaEndPoint()
    • Method Detail

      • setSchemaService

        public void setSchemaService​(SchemaService schemaService)
      • getInstalledJsonSchemaIds

        @GET
        @Path("/")
        public Set<String> getInstalledJsonSchemaIds()
        Get the list of installed Json Schema Ids
        Returns:
        A Set of JSON schema ids
      • getSchema

        @POST
        @Path("/query")
        public String getSchema​(String id)
        Get a schema by it's id
        Parameters:
        id - of the schema
        Returns:
        Json schema matching the id
      • save

        @POST
        @Path("/")
        @Consumes({"text/plain","application/json"})
        @Produces("application/json")
        public javax.ws.rs.core.Response save​(String jsonSchema)
        Save a JSON schema
        Parameters:
        jsonSchema - the schema as string to save
        Returns:
        Response of the API call
      • remove

        @POST
        @Path("/delete")
        public boolean remove​(String id)
        Deletes a JSON schema by it's id.
        Parameters:
        id - the identifier of the JSON schema that we want to delete
      • validateEvent

        @POST
        @Produces("application/json;charset=UTF-8")
        @Consumes({"text/plain","application/json"})
        @Path("/validateEvent")
        public Collection<ValidationError> validateEvent​(String event)
        Being able to validate a given event is useful when you want to develop custom events and associated schemas
        Parameters:
        event - the event to be validated
        Returns:
        Validation error messages if there is some
      • validateEvents

        @POST
        @Produces("application/json;charset=UTF-8")
        @Consumes({"text/plain","application/json"})
        @Path("/validateEvents")
        public Map<String,​Set<ValidationError>> validateEvents​(String events)
        Being able to validate a given list of event is useful when you want to develop custom events and associated schemas
        Parameters:
        events - the events to be validated
        Returns:
        Validation error messages if there is some grouped per event type