<commit_before>package org.folio.cataloging.resources;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.folio.cataloging.F;
import org.folio.cataloging.Global;
import org.folio.cataloging.ModCataloging;
import org.folio.cataloging.domain.GeneralInformation;
import org.folio.cataloging.domain.PhysicalInformation;
import org.folio.cataloging.integration.StorageService;
import org.folio.cataloging.log.MessageCatalog;
import org.folio.cataloging.resources.domain.FieldTemplate;
import org.folio.cataloging.resources.domain.FixedField;
import org.folio.cataloging.resources.domain.VariableField;
import org.folio.cataloging.shared.CorrelationValues;
import org.folio.cataloging.shared.Validation;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

import static java.util.Arrays.stream;
import static java.util.Optional.ofNullable;
import static java.util.stream.Collectors.toList;
import static org.folio.cataloging.integration.CatalogingHelper.doGet;

/**
 *
 * FieldTemplate Restful API.
 *
 * @author natasciab
 * @since 1.0
 */
@RestController
@Api(value = "modcat-api", description = "Field template resource API")
@RequestMapping(value = ModCataloging.BASE_URI, produces = "application/json")
public class FieldTemplateAPI extends BaseResource {

    @ApiOperation(value = "Returns all field template associated with the given data.")
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "Method successfully returned the requested field template."),
            @ApiResponse(code = 400, message = "Bad Request"),
            @ApiResponse(code = 414, message = "Request-URI Too Long"),<commit_msg>add cors annotation for test<commit_after>package org.folio.cataloging.resources;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiResponse;
import io.swagger.annotations.ApiResponses;
import org.folio.cataloging.F;
import org.folio.cataloging.Global;
import org.folio.cataloging.ModCataloging;
import org.folio.cataloging.domain.GeneralInformation;
import org.folio.cataloging.domain.PhysicalInformation;
import org.folio.cataloging.integration.StorageService;
import org.folio.cataloging.log.MessageCatalog;
import org.folio.cataloging.resources.domain.FieldTemplate;
import org.folio.cataloging.resources.domain.FixedField;
import org.folio.cataloging.resources.domain.VariableField;
import org.folio.cataloging.shared.CorrelationValues;
import org.folio.cataloging.shared.Validation;
import org.springframework.web.bind.annotation.*;

import java.util.Map;

import static java.util.Arrays.stream;
import static java.util.Optional.ofNullable;
import static java.util.stream.Collectors.toList;
import static org.folio.cataloging.integration.CatalogingHelper.doGet;

/**
 *
 * FieldTemplate Restful API.
 *
 * @author natasciab
 * @since 1.0
 */
@RestController
@CrossOrigin("http://localhost:3000")
@Api(value = "modcat-api", description = "Field template resource API")
@RequestMapping(value = ModCataloging.BASE_URI, produces = "application/json")
public class FieldTemplateAPI extends BaseResource {

    @ApiOperation(value = "Returns all field template associated with the given data.")
    @ApiResponses(value = {
            @ApiResponse(code = 200, message = "Method successfully returned the requested field template."),
            @ApiResponse(code = 400, message = "Bad Request"),
            @ApiResponse(code = 414, message = "Request-URI Too Long"),
{'fraction_non_alphanumeric': 0.10729137787635154, 'fraction_numerical': 0.007208206265594677, 'mean_word_length': 5.442857142857143, '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': '4823981', 'n_tokens_mistral': 1025, 'n_tokens_neox': 1002, 'n_words': 216}