<commit_before>// ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
var tableOperation = require('./tableOperation');

module.exports = function (configuration) {
    return function (schema) {
        var createOperation = tableOperation(configuration, schema),
            paths = {};

        paths['/tables/' + schema.name] = {
            get: createOperation({
                summary: 'Query the ' + schema.name + ' table',
                description: 'The provided OData query is evaluated and an array of ' + schema.name + ' objects is returned. If no OData query is specified, all items are returned.',
                odata: true,
                responses: {
                    '200': createOperation.response('An array of items matching the provided query', 'array')
                }
            }),
            post: createOperation({
                summary: 'Insert a record into the ' + schema.name + ' table',
                parameters: ['body'],
                responses: {
                    '201': createOperation.response('The inserted item', 'item'),
                    '409': createOperation.response('An item with the same ID already exists', 'item')
                }
            }),
            patch: createOperation({
                summary: 'Update a record in the ' + schema.name + ' table',
                parameters: ['body'],
                responses: {
                    '200': createOperation.response('The updated item', 'item'),
                    '409': createOperation.response('A concurrency violation occurred', 'item'),
                    '412': createOperation.response('A concurrency violation occurred', 'item')
                }
            })
        }

        paths['/tables/' + schema.name + '/{id}'] = {
            get: createOperation({
                summary: 'Find a specific record in the ' + schema.name + ' table',
                description: 'Return the ' + schema.name + ' object is returned that corresponds with the provided id.',
                parameters: ['id'],
                responses: {
                    '200': createOperation.response('The request item', 'item')
                }
            }),
            post: createOperation({
                summary: 'Undelete a record from the ' + schema.name + ' table',
                parameters: ['id'],
                responses: {
                    '201': createOperation.response('The undeleted item', 'item'),
                    '409': createOperation.response('A concurrency violation occurred', 'item'),
                    '412': createOperation.response('A concurrency violation occurred', 'item')
                }
            }),
            patch: createOperation({
                summary: 'Update a record in the ' + schema.name + ' table',
                parameters: ['id', 'body'],
                responses: {
                    '200': createOperation.response('The updated item', 'item'),
                    '409': createOperation.response('A concurrency violation occurred', 'item'),
                    '412': createOperation.response('A concurrency violation occurred', 'item')
                }<commit_msg>Minor text update<commit_after>// ----------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// ----------------------------------------------------------------------------
var tableOperation = require('./tableOperation');

module.exports = function (configuration) {
    return function (schema) {
        var createOperation = tableOperation(configuration, schema),
            paths = {};

        paths['/tables/' + schema.name] = {
            get: createOperation({
                summary: 'Query the ' + schema.name + ' table',
                description: 'The provided OData query is evaluated and an array of ' + schema.name + ' objects is returned. If no OData query is specified, all items are returned.',
                odata: true,
                responses: {
                    '200': createOperation.response('An array of items matching the provided query', 'array')
                }
            }),
            post: createOperation({
                summary: 'Insert a record into the ' + schema.name + ' table',
                parameters: ['body'],
                responses: {
                    '201': createOperation.response('The inserted item', 'item'),
                    '409': createOperation.response('An item with the same ID already exists', 'item')
                }
            }),
            patch: createOperation({
                summary: 'Update a record in the ' + schema.name + ' table',
                parameters: ['body'],
                responses: {
                    '200': createOperation.response('The updated item', 'item'),
                    '409': createOperation.response('A concurrency violation occurred', 'item'),
                    '412': createOperation.response('A concurrency violation occurred', 'item')
                }
            })
        }

        paths['/tables/' + schema.name + '/{id}'] = {
            get: createOperation({
                summary: 'Find a specific record in the ' + schema.name + ' table',
                description: 'Return the ' + schema.name + ' object that corresponds with the provided id.',
                parameters: ['id'],
                responses: {
                    '200': createOperation.response('The request item', 'item')
                }
            }),
            post: createOperation({
                summary: 'Undelete a record from the ' + schema.name + ' table',
                parameters: ['id'],
                responses: {
                    '201': createOperation.response('The undeleted item', 'item'),
                    '409': createOperation.response('A concurrency violation occurred', 'item'),
                    '412': createOperation.response('A concurrency violation occurred', 'item')
                }
            }),
            patch: createOperation({
                summary: 'Update a record in the ' + schema.name + ' table',
                parameters: ['id', 'body'],
                responses: {
                    '200': createOperation.response('The updated item', 'item'),
                    '409': createOperation.response('A concurrency violation occurred', 'item'),
                    '412': createOperation.response('A concurrency violation occurred', 'item')
                }
{'fraction_non_alphanumeric': 0.1583208395802099, 'fraction_numerical': 0.011694152923538231, 'mean_word_length': 1.4826944547822851, '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': '3796948', 'n_tokens_mistral': 1500, 'n_tokens_neox': 1372, 'n_words': 446}