<commit_before>﻿using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using Esfa.Vacancy.Api.Core.ActionFilters;
using Esfa.Vacancy.Api.Core.Extensions;
using Esfa.Vacancy.Api.Types;
using Esfa.Vacancy.Manage.Api.Orchestrators;
using Swashbuckle.Swagger.Annotations;

namespace Esfa.Vacancy.Manage.Api.Controllers
{
    public class CreateApprenticeshipController : ApiController
    {
        private readonly CreateApprenticeshipOrchestrator _orchestrator;

        public CreateApprenticeshipController(CreateApprenticeshipOrchestrator orchestrator)
        {
            _orchestrator = orchestrator;
        }

        /// <summary>
        /// Creates the specified apprenticeship vacancy.
        /// 
        /// #### Error codes ####
        /// 
        /// The following error codes may be returned when calling this operation if any of the vacancy values 
        /// specified fail validation:
        /// 
        /// | Error code  | Explanation                                 |
        /// | ----------- | ------------------------------------------- |
        /// | 31000       | Invalid Request body                        |
        /// | 31001       | Invalid Title                               |
        /// | 31002       | Invalid Short description                   |
        /// | 31003       | Invalid Long description                    |
        /// | 31004       | Invalid Application closing date            |
        /// | 31005       | Invalid Expected start date                 |
        /// | 31006       | Invalid Working week                        |
        /// | 31007       | Invalid Hours per week                      |
        /// | 31008       | Invalid Wage type                           |
        /// | 31009       | Invalid Min wage                            |
        /// | 31010       | Invalid Max wage                            |
        /// | 31011       | Invalid Location type                       |
        /// | 31012       | Invalid Address line 1                      |
        /// | 31013       | Invalid Address line 2                      |
        /// | 31014       | Invalid Address line 3                      |<commit_msg>RA-1420 added error codes to documentation page.<commit_after>﻿using System.Net;
using System.Net.Http;
using System.Threading.Tasks;
using System.Web.Http;
using Esfa.Vacancy.Api.Core.ActionFilters;
using Esfa.Vacancy.Api.Core.Extensions;
using Esfa.Vacancy.Api.Types;
using Esfa.Vacancy.Manage.Api.Orchestrators;
using Swashbuckle.Swagger.Annotations;

namespace Esfa.Vacancy.Manage.Api.Controllers
{
    public class CreateApprenticeshipController : ApiController
    {
        private readonly CreateApprenticeshipOrchestrator _orchestrator;

        public CreateApprenticeshipController(CreateApprenticeshipOrchestrator orchestrator)
        {
            _orchestrator = orchestrator;
        }

        /// <summary>
        /// Creates the specified apprenticeship vacancy.
        /// 
        /// #### Error codes ####
        /// 
        /// The following error codes may be returned when calling this operation if any of the vacancy values 
        /// specified fail validation:
        /// 
        /// | Error code  | Explanation                                 |
        /// | ----------- | ------------------------------------------- |
        /// | 31000       | Invalid Request body                        |
        /// | 31001       | Invalid Title                               |
        /// | 31002       | Invalid Short description                   |
        /// | 31003       | Invalid Long description                    |
        /// | 31004       | Invalid Application closing date            |
        /// | 31005       | Invalid Expected start date                 |
        /// | 31006       | Invalid Working week                        |
        /// | 31007       | Invalid Hours per week                      |
        /// | 31008       | Invalid Wage type                           |
        /// | 31123       | Invalid Wage type reason                    |
        /// | 31124       | Invalid Wage unit                           |
        /// | 31009       | Invalid Min wage                            |
        /// | 31010       | Invalid Max wage                            |
        /// | 31011       | Invalid Location type                       |
        /// | 31012       | Invalid Address line 1                      |
        /// | 31013       | Invalid Address line 2                      |
        /// | 31014       | Invalid Address line 3                      |
{'fraction_non_alphanumeric': 0.10773540185304892, 'fraction_numerical': 0.03663003663003663, 'mean_word_length': 1.049448123620309, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '377566', 'n_tokens_mistral': 1211, 'n_tokens_neox': 1052, 'n_words': 273}