<commit_before>package com.example;

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.MediaType;

import org.minijax.Minijax;
import org.minijax.json.JsonFeature;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Path("/api")
@Produces(MediaType.APPLICATION_JSON)
@Api
public class HelloSwagger {

    @POST
    @Path("/shout")
    @Consumes(MediaType.TEXT_PLAIN)
    @ApiOperation("Shouts an input string")
    public static String shout(final String s) {
        return s.toUpperCase();
    }

    public static void main(final String[] args) {
        new Minijax()
                .register(io.swagger.jaxrs.listing.ApiListingResource.class)
                .register(io.swagger.jaxrs.listing.SwaggerSerializers.class)
                .register(JsonFeature.class)
                .register(HelloSwagger.class)
                .start();
    }
}<commit_msg>Allow CORS in swagger example<commit_after>package com.example;

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.MediaType;

import org.minijax.Minijax;
import org.minijax.json.JsonFeature;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

@Path("/api")
@Produces(MediaType.APPLICATION_JSON)
@Api
public class HelloSwagger {

    @POST
    @Path("/shout")
    @Consumes(MediaType.TEXT_PLAIN)
    @ApiOperation("Shouts an input string")
    public static String shout(final String s) {
        return s.toUpperCase();
    }

    public static void main(final String[] args) {
        new Minijax()
                .register(io.swagger.jaxrs.listing.ApiListingResource.class)
                .register(io.swagger.jaxrs.listing.SwaggerSerializers.class)
                .register(JsonFeature.class)
                .register(HelloSwagger.class)
                .allowCors("/")
                .start();
    }
}
{'fraction_non_alphanumeric': 0.11723446893787576, 'fraction_numerical': 0.0, 'mean_word_length': 2.9156862745098038, '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': '834028', 'n_tokens_mistral': 648, 'n_tokens_neox': 629, 'n_words': 113}