public function getApiDocInfo()
 {
     $path = '/' . $this->getServiceName() . '/' . $this->getFullPathName();
     $eventPath = $this->getServiceName() . '.' . $this->getFullPathName('.');
     $base = parent::getApiDocInfo();
     $tables = $this->listResources();
     $commonResponses = ApiDocUtilities::getCommonResponses();
     $wrapper = ResourcesWrapper::getWrapper();
     $apis = [['path' => $path . '/{table_name}', 'description' => 'Operations for table records administration.', 'operations' => [['method' => 'GET', 'summary' => 'getRecords() - Retrieve one or more records.', 'nickname' => 'getRecords', 'notes' => 'Set the <b>filter</b> parameter to a SQL WHERE clause (optional native filter accepted in some scenarios) ' . 'to limit records returned or leave it blank to return all records up to the maximum limit.<br/> ' . 'Set the <b>limit</b> parameter with or without a filter to return a specific amount of records.<br/> ' . 'Use the <b>offset</b> parameter along with the <b>limit</b> parameter to page through sets of records.<br/> ' . 'Set the <b>order</b> parameter to SQL ORDER_BY clause containing field and optional direction (<field_name> [ASC|DESC]) to order the returned records.<br/> ' . 'Alternatively, to send the <b>filter</b> with or without <b>params</b> as posted data, ' . 'use the getRecordsByPost() POST request and post a filter with or without params.<br/>' . 'Pass the identifying field values as a comma-separated list in the <b>ids</b> parameter.<br/> ' . 'Use the <b>id_field</b> and <b>id_type</b> parameters to override or specify detail for identifying fields where applicable.<br/> ' . 'Alternatively, to send the <b>ids</b> as posted data, use the getRecordsByPost() POST request.<br/> ' . 'Use the <b>fields</b> parameter to limit properties returned for each record. ' . 'By default, all fields are returned for all records. ', 'type' => 'RecordsResponse', 'event_name' => [$eventPath . '.{table_name}.select', $eventPath . '.table_selected'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ApiOptions::documentOption(ApiOptions::FILTER), ApiOptions::documentOption(ApiOptions::LIMIT), ApiOptions::documentOption(ApiOptions::ORDER), ApiOptions::documentOption(ApiOptions::GROUP), ApiOptions::documentOption(ApiOptions::OFFSET), ApiOptions::documentOption(ApiOptions::INCLUDE_COUNT), ApiOptions::documentOption(ApiOptions::IDS), ApiOptions::documentOption(ApiOptions::ID_FIELD), ApiOptions::documentOption(ApiOptions::ID_TYPE), ApiOptions::documentOption(ApiOptions::CONTINUES), ApiOptions::documentOption(ApiOptions::FIELDS), ApiOptions::documentOption(ApiOptions::RELATED), ApiOptions::documentOption(ApiOptions::INCLUDE_SCHEMA), ApiOptions::documentOption(ApiOptions::FILE)], 'responseMessages' => $commonResponses], ['method' => 'POST', 'summary' => 'createRecords() - Create one or more records.', 'nickname' => 'createRecords', 'notes' => 'Posted data should be an array of records wrapped in a <b>record</b> element.<br/> ' . 'By default, only the id property of the record is returned on success. ' . 'Use <b>fields</b> parameter to return more info.', 'type' => 'RecordsResponse', 'event_name' => [$eventPath . '.{table_name}.insert', $eventPath . '.table_inserted'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'body', 'description' => 'Data containing name-value pairs of records to create.', 'allowMultiple' => false, 'type' => 'RecordsRequest', 'paramType' => 'body', 'required' => true], ApiOptions::documentOption(ApiOptions::ID_FIELD), ApiOptions::documentOption(ApiOptions::ID_TYPE), ApiOptions::documentOption(ApiOptions::CONTINUES), ApiOptions::documentOption(ApiOptions::ROLLBACK), ApiOptions::documentOption(ApiOptions::FIELDS), ApiOptions::documentOption(ApiOptions::RELATED), ['name' => 'X-HTTP-METHOD', 'description' => 'Override request using POST to tunnel other http request, such as DELETE or GET passing a payload.', 'enum' => ['GET'], 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'header', 'required' => false]], 'responseMessages' => $commonResponses], ['method' => 'PUT', 'summary' => 'replaceRecords() - Update (replace) one or more records.', 'nickname' => 'replaceRecords', 'notes' => 'Post data should be an array of records wrapped in a <b>' . $wrapper . '</b> tag.<br/> ' . 'If ids or filter is used, posted body should be a single record with name-value pairs ' . 'to update, wrapped in a <b>' . $wrapper . '</b> tag.<br/> ' . 'Ids can be included via URL parameter or included in the posted body.<br/> ' . 'Filter can be included via URL parameter or included in the posted body.<br/> ' . 'By default, only the id property of the record is returned on success. ' . 'Use <b>fields</b> parameter to return more info.', 'type' => 'RecordsResponse', 'event_name' => [$eventPath . '.{table_name}.update', $eventPath . '.table_updated'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'body', 'description' => 'Data containing name-value pairs of records to update.', 'allowMultiple' => false, 'type' => 'RecordsRequest', 'paramType' => 'body', 'required' => true], ApiOptions::documentOption(ApiOptions::IDS), ApiOptions::documentOption(ApiOptions::ID_FIELD), ApiOptions::documentOption(ApiOptions::ID_TYPE), ApiOptions::documentOption(ApiOptions::CONTINUES), ApiOptions::documentOption(ApiOptions::ROLLBACK), ApiOptions::documentOption(ApiOptions::FILTER), ApiOptions::documentOption(ApiOptions::FIELDS), ApiOptions::documentOption(ApiOptions::RELATED)], 'responseMessages' => $commonResponses], ['method' => 'PATCH', 'summary' => 'updateRecords() - Update (patch) one or more records.', 'nickname' => 'updateRecords', 'notes' => 'Post data should be an array of records containing at least the identifying fields for each record.<br/> ' . 'Posted body should be a single record with name-value pairs to update wrapped in a <b>record</b> tag.<br/> ' . 'Ids can be included via URL parameter or included in the posted body.<br/> ' . 'Filter can be included via URL parameter or included in the posted body.<br/> ' . 'By default, only the id property of the record is returned on success. ' . 'Use <b>fields</b> parameter to return more info.', 'type' => 'RecordsResponse', 'event_name' => [$eventPath . '.{table_name}.update', $eventPath . '.table_updated'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'body', 'description' => 'A single record containing name-value pairs of fields to update.', 'allowMultiple' => false, 'type' => 'RecordsRequest', 'paramType' => 'body', 'required' => true], ApiOptions::documentOption(ApiOptions::IDS), ApiOptions::documentOption(ApiOptions::ID_FIELD), ApiOptions::documentOption(ApiOptions::ID_TYPE), ApiOptions::documentOption(ApiOptions::CONTINUES), ApiOptions::documentOption(ApiOptions::ROLLBACK), ApiOptions::documentOption(ApiOptions::FILTER), ApiOptions::documentOption(ApiOptions::FIELDS), ApiOptions::documentOption(ApiOptions::RELATED)], 'responseMessages' => $commonResponses], ['method' => 'DELETE', 'summary' => 'deleteRecords() - Delete one or more records.', 'nickname' => 'deleteRecords', 'notes' => 'Set the <b>ids</b> parameter to a list of record identifying (primary key) values to delete specific records.<br/> ' . 'Alternatively, to delete records by a large list of ids, pass the ids in the <b>body</b>.<br/> ' . 'By default, only the id property of the record is returned on success, use <b>fields</b> to return more info. ' . 'Set the <b>filter</b> parameter to a SQL WHERE clause to delete specific records, ' . 'otherwise set <b>force</b> to true to clear the table.<br/> ' . 'Alternatively, to delete by a complicated filter or to use parameter replacement, pass the filter with or without params as the <b>body</b>.<br/> ' . 'By default, only the id property of the record is returned on success, use <b>fields</b> to return more info. ' . 'Set the <b>body</b> to an array of records, minimally including the identifying fields, to delete specific records.<br/> ' . 'By default, only the id property of the record is returned on success, use <b>fields</b> to return more info. ', 'type' => 'RecordsResponse', 'event_name' => [$eventPath . '.{table_name}.delete', $eventPath . '.table_deleted'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'body', 'description' => 'Data containing ids of records to delete.', 'allowMultiple' => false, 'type' => 'RecordsRequest', 'paramType' => 'body', 'required' => false], ApiOptions::documentOption(ApiOptions::IDS), ApiOptions::documentOption(ApiOptions::ID_FIELD), ApiOptions::documentOption(ApiOptions::ID_TYPE), ApiOptions::documentOption(ApiOptions::CONTINUES), ApiOptions::documentOption(ApiOptions::ROLLBACK), ApiOptions::documentOption(ApiOptions::FILTER), ApiOptions::documentOption(ApiOptions::FORCE), ApiOptions::documentOption(ApiOptions::FIELDS), ApiOptions::documentOption(ApiOptions::RELATED)], 'responseMessages' => $commonResponses]]], ['path' => $path . '/{table_name}/{id}', 'description' => 'Operations for single record administration.', 'operations' => [['method' => 'GET', 'summary' => 'getRecord() - Retrieve one record by identifier.', 'nickname' => 'getRecord', 'notes' => 'Use the <b>fields</b> parameter to limit properties that are returned. ' . 'By default, all fields are returned.', 'type' => 'RecordResponse', 'event_name' => [$eventPath . '.{table_name}.{id}.select', $eventPath . '.record_selected'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'id', 'description' => 'Identifier of the record to retrieve.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true], ApiOptions::documentOption(ApiOptions::ID_FIELD), ApiOptions::documentOption(ApiOptions::ID_TYPE), ApiOptions::documentOption(ApiOptions::FIELDS), ApiOptions::documentOption(ApiOptions::RELATED)], 'responseMessages' => $commonResponses], ['method' => 'PUT', 'summary' => 'replaceRecord() - Replace the content of one record by identifier.', 'nickname' => 'replaceRecord', 'notes' => 'Post data should be an array of fields for a single record.<br/> ' . 'Use the <b>fields</b> parameter to return more properties. By default, the id is returned.', 'type' => 'RecordResponse', 'event_name' => [$eventPath . '.{table_name}.{id}.update', $eventPath . '.record_updated'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'id', 'description' => 'Identifier of the record to update.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true], ['name' => 'body', 'description' => 'Data containing name-value pairs of the replacement record.', 'allowMultiple' => false, 'type' => 'RecordRequest', 'paramType' => 'body', 'required' => true], ApiOptions::documentOption(ApiOptions::ID_FIELD), ApiOptions::documentOption(ApiOptions::ID_TYPE), ApiOptions::documentOption(ApiOptions::FIELDS), ApiOptions::documentOption(ApiOptions::RELATED)], 'responseMessages' => $commonResponses], ['method' => 'PATCH', 'summary' => 'updateRecord() - Update (patch) one record by identifier.', 'nickname' => 'updateRecord', 'notes' => 'Post data should be an array of fields for a single record.<br/> ' . 'Use the <b>fields</b> parameter to return more properties. By default, the id is returned.', 'type' => 'RecordResponse', 'event_name' => [$eventPath . '.{table_name}.{id}.update', $eventPath . '.record_updated'], 'parameters' => [['name' => 'table_name', 'description' => 'The name of the table you want to update.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'id', 'description' => 'Identifier of the record to update.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true], ['name' => 'body', 'description' => 'Data containing name-value pairs of the fields to update.', 'allowMultiple' => false, 'type' => 'RecordRequest', 'paramType' => 'body', 'required' => true], ApiOptions::documentOption(ApiOptions::ID_FIELD), ApiOptions::documentOption(ApiOptions::ID_TYPE), ApiOptions::documentOption(ApiOptions::FIELDS)], 'responseMessages' => $commonResponses], ['method' => 'DELETE', 'summary' => 'deleteRecord() - Delete one record by identifier.', 'nickname' => 'deleteRecord', 'notes' => 'Use the <b>fields</b> parameter to return more deleted properties. By default, the id is returned.', 'type' => 'RecordResponse', 'event_name' => [$eventPath . '.{table_name}.{id}.delete', $eventPath . '.record_deleted'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'id', 'description' => 'Identifier of the record to delete.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true], ApiOptions::documentOption(ApiOptions::ID_FIELD), ApiOptions::documentOption(ApiOptions::ID_TYPE), ApiOptions::documentOption(ApiOptions::FIELDS)], 'responseMessages' => $commonResponses]]]];
     $base['apis'] = array_merge($base['apis'], $apis);
     return $base;
 }
示例#2
0
 public function getApiDocInfo()
 {
     $path = '/' . $this->getServiceName() . '/' . $this->getFullPathName();
     $eventPath = $this->getServiceName() . '.' . $this->getFullPathName('.');
     $base = parent::getApiDocInfo();
     $apis = [['path' => $path . '/{procedure_name}', 'operations' => [['method' => 'GET', 'summary' => 'callStoredProc() - Call a stored procedure.', 'nickname' => 'callStoredProc', 'notes' => 'Call a stored procedure with no parameters. ' . 'Set an optional wrapper for the returned data set. ', 'type' => 'StoredProcResponse', 'event_name' => [$eventPath . '.{procedure_name}.call', $eventPath . '.procedure_called'], 'parameters' => [['name' => 'procedure_name', 'description' => 'Name of the stored procedure to call.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true], ['name' => 'wrapper', 'description' => 'Add this wrapper around the expected data set before returning.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'query', 'required' => false], ['name' => 'returns', 'description' => 'If returning a single value, use this to set the type of that value.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'query', 'required' => false]], 'responseMessages' => ApiDocUtilities::getCommonResponses()], ['method' => 'POST', 'summary' => 'callStoredProcWithParams() - Call a stored procedure.', 'nickname' => 'callStoredProcWithParams', 'notes' => 'Call a stored procedure with parameters. ' . 'Set an optional wrapper and schema for the returned data set. ', 'type' => 'StoredProcResponse', 'event_name' => [$eventPath . '.{procedure_name}.call', $eventPath . '.procedure_called'], 'parameters' => [['name' => 'procedure_name', 'description' => 'Name of the stored procedure to call.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true], ['name' => 'body', 'description' => 'Data containing in and out parameters to pass to procedure.', 'allowMultiple' => false, 'type' => 'StoredProcRequest', 'paramType' => 'body', 'required' => true], ['name' => 'wrapper', 'description' => 'Add this wrapper around the expected data set before returning.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'query', 'required' => false], ['name' => 'returns', 'description' => 'If returning a single value, use this to set the type of that value.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'query', 'required' => false]], 'responseMessages' => ApiDocUtilities::getCommonResponses()]], 'description' => 'Operations for SQL database stored procedures.']];
     $models = ['StoredProcResponse' => ['id' => 'StoredProcResponse', 'properties' => ['_wrapper_if_supplied_' => ['type' => 'Array', 'description' => 'Array of returned data.', 'items' => ['type' => 'string']], '_out_param_name_' => ['type' => 'string', 'description' => 'Name and value of any given output parameter.']]], 'StoredProcRequest' => ['id' => 'StoredProcRequest', 'properties' => ['params' => ['type' => 'array', 'description' => 'Optional array of input and output parameters.', 'items' => ['$ref' => 'StoredProcParam']], 'schema' => ['type' => 'StoredProcResultSchema', 'description' => 'Optional name to type pairs to be applied to returned data.'], 'wrapper' => ['type' => 'string', 'description' => 'Add this wrapper around the expected data set before returning, same as URL parameter.'], 'returns' => ['type' => 'string', 'description' => 'If returning a single value, use this to set the type of that value, same as URL parameter.']]], 'StoredProcParam' => ['id' => 'StoredProcParam', 'properties' => ['name' => ['type' => 'string', 'description' => 'Name of the parameter, required for OUT and INOUT types, ' . 'must be the same as the stored procedure\'s parameter name.'], 'param_type' => ['type' => 'string', 'description' => 'Parameter type of IN, OUT, or INOUT, defaults to IN.'], 'value' => ['type' => 'string', 'description' => 'Value of the parameter, used for the IN and INOUT types, defaults to NULL.'], 'type' => ['type' => 'string', 'description' => 'For INOUT and OUT parameters, the requested type for the returned value, ' . 'i.e. integer, boolean, string, etc. Defaults to value type for INOUT and string for OUT.'], 'length' => ['type' => 'integer', 'format' => 'int32', 'description' => 'For INOUT and OUT parameters, the requested length for the returned value. ' . 'May be required by some database drivers.']]], 'StoredProcResultSchema' => ['id' => 'StoredProcResultSchema', 'properties' => ['_field_name_' => ['type' => 'string', 'description' => 'The name of the returned element where the value is set to the requested type ' . 'for the returned value, i.e. integer, boolean, string, etc.']]]];
     $base['apis'] = array_merge($base['apis'], $apis);
     $base['models'] = array_merge($base['models'], $models);
     return $base;
 }
 public function getApiDocInfo()
 {
     $path = '/' . $this->getServiceName() . '/' . $this->getFullPathName();
     $eventPath = $this->getServiceName() . '.' . $this->getFullPathName('.');
     $base = parent::getApiDocInfo();
     $tables = $this->listResources();
     $commonResponses = ApiDocUtilities::getCommonResponses();
     $apis = [['path' => $path, 'description' => 'Operations available for SQL DB Schemas.', 'operations' => [['method' => 'POST', 'summary' => 'createTables() - Create one or more tables.', 'nickname' => 'createTables', 'type' => 'Resources', 'event_name' => $eventPath . '.create', 'parameters' => [['name' => 'tables', 'description' => 'Array of table definitions.', 'allowMultiple' => false, 'type' => 'TableSchemas', 'paramType' => 'body', 'required' => true]], 'responseMessages' => $commonResponses, 'notes' => 'Post data should be a single table definition or an array of table definitions.'], ['method' => 'PUT', 'summary' => 'replaceTables() - Update (replace) one or more tables.', 'nickname' => 'replaceTables', 'event_name' => $eventPath . '.alter', 'type' => 'Resources', 'parameters' => [['name' => 'tables', 'description' => 'Array of table definitions.', 'allowMultiple' => false, 'type' => 'TableSchemas', 'paramType' => 'body', 'required' => true]], 'responseMessages' => $commonResponses, 'notes' => 'Post data should be a single table definition or an array of table definitions.'], ['method' => 'PATCH', 'summary' => 'updateTables() - Update (patch) one or more tables.', 'nickname' => 'updateTables', 'event_name' => $eventPath . '.alter', 'type' => 'Resources', 'parameters' => [['name' => 'tables', 'description' => 'Array of table definitions.', 'allowMultiple' => false, 'type' => 'TableSchemas', 'paramType' => 'body', 'required' => true]], 'responseMessages' => $commonResponses, 'notes' => 'Post data should be a single table definition or an array of table definitions.']]], ['path' => $path . '/{table_name}', 'description' => 'Operations for per table administration.', 'operations' => [['method' => 'GET', 'summary' => 'describeTable() - Retrieve table definition for the given table.', 'nickname' => 'describeTable', 'event_name' => [$eventPath . '.{table_name}.describe', $eventPath . '.table_described'], 'type' => 'TableSchema', 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'refresh', 'description' => 'Refresh any cached copy of the schema.', 'allowMultiple' => false, 'type' => 'boolean', 'paramType' => 'query', 'required' => false]], 'responseMessages' => $commonResponses, 'notes' => 'This describes the table, its fields and relations to other tables.'], ['method' => 'POST', 'summary' => 'createTable() - Create a table with the given properties and fields.', 'nickname' => 'createTable', 'type' => 'Success', 'event_name' => [$eventPath . '.{table_name}.create', $eventPath . '.table_created'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'schema', 'description' => 'Array of table properties and fields definitions.', 'allowMultiple' => false, 'type' => 'TableSchema', 'paramType' => 'body', 'required' => true]], 'responseMessages' => $commonResponses, 'notes' => 'Post data should be an array of field properties for a single record or an array of fields.'], ['method' => 'PUT', 'summary' => 'replaceTable() - Update (replace) a table with the given properties.', 'nickname' => 'replaceTable', 'type' => 'Success', 'event_name' => [$eventPath . '.{table_name}.alter', $eventPath . '.table_altered'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'schema', 'description' => 'Array of field definitions.', 'allowMultiple' => false, 'type' => 'TableSchema', 'paramType' => 'body', 'required' => true]], 'responseMessages' => $commonResponses, 'notes' => 'Post data should be an array of field properties for a single record or an array of fields.'], ['method' => 'PATCH', 'summary' => 'updateTable() - Update (patch) a table with the given properties.', 'nickname' => 'updateTable', 'type' => 'Success', 'event_name' => [$eventPath . '.{table_name}.alter', $eventPath . '.table_altered'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'schema', 'description' => 'Array of field definitions.', 'allowMultiple' => false, 'type' => 'TableSchema', 'paramType' => 'body', 'required' => true]], 'responseMessages' => $commonResponses, 'notes' => 'Post data should be an array of field properties for a single record or an array of fields.'], ['method' => 'DELETE', 'summary' => 'deleteTable() - Delete (aka drop) the given table.', 'nickname' => 'deleteTable', 'type' => 'Success', 'event_name' => [$eventPath . '.{table_name}.drop', $eventPath . '.table_dropped'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables]], 'responseMessages' => $commonResponses, 'notes' => 'Careful, this drops the database table and all of its contents.']]], ['path' => $path . '/{table_name}/{field_name}', 'description' => 'Operations for single field administration.', 'operations' => [['method' => 'GET', 'summary' => 'describeField() - Retrieve the definition of the given field for the given table.', 'nickname' => 'describeField', 'type' => 'FieldSchema', 'event_name' => [$eventPath . '.{table_name}.{field_name}.describe', $eventPath . '.{table_name}.field_described'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'field_name', 'description' => 'Name of the field to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true], ['name' => 'refresh', 'description' => 'Refresh any cached copy of the schema.', 'allowMultiple' => false, 'type' => 'boolean', 'paramType' => 'query', 'required' => false]], 'responseMessages' => $commonResponses, 'notes' => 'This describes the field and its properties.'], ['method' => 'PUT', 'summary' => 'replaceField() - Update one record by identifier.', 'nickname' => 'replaceField', 'type' => 'Success', 'event_name' => [$eventPath . '.{table_name}.{field_name}.alter', $eventPath . '.{table_name}.field_altered'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'field_name', 'description' => 'Name of the field to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true], ['name' => 'properties', 'description' => 'Array of field properties.', 'allowMultiple' => false, 'type' => 'FieldSchema', 'paramType' => 'body', 'required' => true]], 'responseMessages' => $commonResponses, 'notes' => 'Post data should be an array of field properties for the given field.'], ['method' => 'PATCH', 'summary' => 'updateField() - Update one record by identifier.', 'nickname' => 'updateField', 'type' => 'Success', 'event_name' => [$eventPath . '.{table_name}.{field_name}.alter', $eventPath . '.{table_name}.field_altered'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'field_name', 'description' => 'Name of the field to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true], ['name' => 'properties', 'description' => 'Array of field properties.', 'allowMultiple' => false, 'type' => 'FieldSchema', 'paramType' => 'body', 'required' => true]], 'responseMessages' => $commonResponses, 'notes' => 'Post data should be an array of field properties for the given field.'], ['method' => 'DELETE', 'summary' => 'deleteField() - Remove the given field from the given table.', 'nickname' => 'deleteField', 'type' => 'Success', 'event_name' => [$eventPath . '.{table_name}.{field_name}.drop', $eventPath . '.{table_name}.field_dropped'], 'parameters' => [['name' => 'table_name', 'description' => 'Name of the table to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true, 'enum' => $tables], ['name' => 'field_name', 'description' => 'Name of the field to perform operations on.', 'allowMultiple' => false, 'type' => 'string', 'paramType' => 'path', 'required' => true]], 'responseMessages' => $commonResponses, 'notes' => 'Careful, this drops the database table field/column and all of its contents.']]]];
     $base['apis'] = array_merge($base['apis'], $apis);
     return $base;
 }