<commit_before>package brooklyn.rest.api;

import brooklyn.rest.apidoc.Apidoc;
import brooklyn.rest.domain.ScriptExecutionSummary;
import com.wordnik.swagger.core.ApiOperation;
import com.wordnik.swagger.core.ApiParam;

import javax.servlet.http.HttpServletRequest;
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.MediaType;

@Path("/v1/script")
@Apidoc(value="Script")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface ScriptApi {
    
    public static final String USER_DATA_MAP_SESSION_ATTRIBUTE = "brooklyn.script.groovy.user.data";
    public static final String USER_LAST_VALUE_SESSION_ATTRIBUTE = "brooklyn.script.groovy.user.last";
    
    @SuppressWarnings("rawtypes")
    @POST
    @Path("/groovy")
    @ApiOperation(value = "Execute a groovy script",
        responseClass = "brooklyn.rest.domain.SensorSummary")
    public ScriptExecutionSummary groovy(
            @Context HttpServletRequest request,
            @ApiParam(name = "script", value = "Groovy script to execute", required = true)
            String script
            ) ;

}<commit_msg>groovy rest resource now (due to jersey upgrade? or api inheritance?) must define what it consumes<commit_after>package brooklyn.rest.api;

import brooklyn.rest.apidoc.Apidoc;
import brooklyn.rest.domain.ScriptExecutionSummary;
import com.wordnik.swagger.core.ApiOperation;
import com.wordnik.swagger.core.ApiParam;

import javax.servlet.http.HttpServletRequest;
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.MediaType;

@Path("/v1/script")
@Apidoc(value="Script")
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public interface ScriptApi {
    
    public static final String USER_DATA_MAP_SESSION_ATTRIBUTE = "brooklyn.script.groovy.user.data";
    public static final String USER_LAST_VALUE_SESSION_ATTRIBUTE = "brooklyn.script.groovy.user.last";
    
    @SuppressWarnings("rawtypes")
    @POST
    @Path("/groovy")
    @Consumes("application/text")
    @ApiOperation(value = "Execute a groovy script",
        responseClass = "brooklyn.rest.domain.SensorSummary")
    public ScriptExecutionSummary groovy(
            @Context HttpServletRequest request,
            @ApiParam(name = "script", value = "Groovy script to execute", required = true)
            String script
            ) ;

}
{'fraction_non_alphanumeric': 0.10899182561307902, 'fraction_numerical': 0.0007785130400934215, 'mean_word_length': 4.266393442622951, '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': '4938712', 'n_tokens_mistral': 818, 'n_tokens_neox': 803, 'n_words': 156}