<commit_before>package org.endeavourhealth.messagingapi.endpoints;

import org.endeavourhealth.core.configuration.ConfigWrapper;
import org.endeavourhealth.core.configuration.Pipeline;

import javax.annotation.security.RolesAllowed;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("/")
public class PostMessage extends AbstractEndpoint {

	@POST
	@Consumes(MediaType.APPLICATION_JSON)
	@Produces(MediaType.APPLICATION_JSON)
	@Path("/PostMessage")
	@RolesAllowed({"eds_messaging_post"})
	public Response postMessage(@Context HttpHeaders headers, String body) {
		Pipeline pipeline = ConfigWrapper.getInstance().getPostMessage().getPipeline();
		return Process(headers, body, pipeline);
	}

	@POST
	// @Consumes(MediaType.APPLICATION_JSON)
	// @Produces(MediaType.APPLICATION_JSON)
	@Path("/PostMessageAsync")
	@RolesAllowed({"eds_messaging_post"})
	public Response postMessageAsync(@Context HttpHeaders headers, String body) {
		Pipeline pipeline = ConfigWrapper.getInstance().getPostMessageAsync().getPipeline();
		return Process(headers, body, pipeline);
	}
}<commit_msg>Removing keycloak role requirement from Messaging API<commit_after>package org.endeavourhealth.messagingapi.endpoints;

import org.endeavourhealth.core.configuration.ConfigWrapper;
import org.endeavourhealth.core.configuration.Pipeline;

import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.HttpHeaders;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;

@Path("/")
public class PostMessage extends AbstractEndpoint {

	@POST
	@Consumes(MediaType.APPLICATION_JSON)
	@Produces(MediaType.APPLICATION_JSON)
	@Path("/PostMessage")
	/*@RolesAllowed({"eds_messaging_post"})*/
	public Response postMessage(@Context HttpHeaders headers, String body) {
		Pipeline pipeline = ConfigWrapper.getInstance().getPostMessage().getPipeline();
		return Process(headers, body, pipeline);
	}

	@POST
	// @Consumes(MediaType.APPLICATION_JSON)
	// @Produces(MediaType.APPLICATION_JSON)
	@Path("/PostMessageAsync")
	/*@RolesAllowed({"eds_messaging_post"})*/
	public Response postMessageAsync(@Context HttpHeaders headers, String body) {
		Pipeline pipeline = ConfigWrapper.getInstance().getPostMessageAsync().getPipeline();
		return Process(headers, body, pipeline);
	}
}
{'fraction_non_alphanumeric': 0.12436448963629253, 'fraction_numerical': 0.0, 'mean_word_length': 6.704819277108434, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1121550', 'n_tokens_mistral': 806, 'n_tokens_neox': 780, 'n_words': 140}