From 159e407d1bbb3930440d3d37f46b80574e211697 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Mon, 20 Nov 2023 14:58:16 -0500 Subject: [PATCH 01/16] Update configuration from markdown to Open API 3.0 spec --- docs/configuration.md | 172 +---------- docs/openapi.json | 688 ++++++++++++++++++++++++++++++++++++++++++ mkdocs.yml | 3 + openapi.yml | 496 ++++++++++++++++++++++++++++++ 4 files changed, 1191 insertions(+), 168 deletions(-) create mode 100644 docs/openapi.json create mode 100644 openapi.yml diff --git a/docs/configuration.md b/docs/configuration.md index abd784fc..d78218f2 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -71,174 +71,10 @@ export_csv_field_list: ['field_description', 'field_extent'] Strictly speaking, YAML lists can be represented as either a series of entries on their own lines that start with `- ` or as entries enclosed in `[` and `]`. It's best to follow the examples provided throughout the Workbench documentation. -### Required configuration settings - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| task | ✔️ | | One of 'create', 'create_from_files', 'update', delete', 'add_media', 'delete_media', 'update_media', 'export_csv', 'get_data_from_view', 'create_terms', or 'delete_media_by_node'. See "[Choosing a task](/islandora_workbench_docs/choosing_a_task/)" for more information. -| host | ✔️ | | The hostname, including `http://` or `https://` of your Islandora repository, and port number if not the default 80. | -| username | ✔️ | | The username used to authenticate the requests. This Drupal user should be a member of the "Administrator" role. If you want to create nodes that are owned by a specific Drupal user, include their numeric user ID in the `uid` column in your CSV. | -| password | | | The user's password. You can also set the password in your `ISLANDORA_WORKBENCH_PASSWORD` environment variable. If you do this, omit the `password` option in your configuration file. If a password is not available in either your configuration file or in the environment variable, Workbench will prompt for a password.| - -### Drupal settings - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| content_type | | islandora_object | The machine name of the Drupal node content type you are creating or updating. Required in "create" and "update" tasks. | -| drupal_filesystem | | fedora:// | One of 'fedora://', 'public://', or 'private://' (the wrapping quotation marks are required). Only used with Drupal 8.x - 9.1; starting with Drupal 9.2, the filesystem is automatically detected from the media's configuration. Will eventually be deprecated. | -| allow_adding_terms | | false | In `create` and `update` tasks, determines if Workbench will add taxonomy terms if they do not exist in the target vocabulary. See more information in the "[Taxonomy reference fields](/islandora_workbench_docs/fields/#field-types)" section. Note: this setting is not required in `create_terms` tasks. | -| vocab_id | ✔️ in `create_terms` tasks. | | Identifies the vocabulary you are adding terms to in `create_tersm` tasks. See more information in the "[Creating taxonomy terms](/islandora_workbench_docs/creating_taxonomy_terms)" section. | -| update_mode | | replace | Determines if Workbench will `replace`, `append` (add to) , or `delete` field values during `update` tasks. See more information in the "[Updating nodes](/islandora_workbench_docs/updating_nodes)" section. | -| validate_terms_exist | | true | If set to false, during `--check` Workbench will not query Drupal to determine if taxonomy terms exist. The structure of term values in CSV are still validated; this option only tells Workbench to not check for each term's existence in the target Drupal. Useful to speed up the `--check` process if you know terms don't exist in the target Drupal. | -| validate_parent_node_exists | | true | If set to false, during `--check` Workbench will not query Drupal to determine if nodes whose node IDs are in `field_member_of` exist. Useful to speed up the `--check` process if you know terms already exist in the target Drupal. | -| max_node_title_length | | 255 | Set to the number of allowed characters for node titles if your Drupal uses [Node Title Length](https://www.drupal.org/project/title_length). If unsure what your the maximum length of the node titles your site allows, check the length of the "title" column in your Drupal database's "node_field_data" table. | -| list_missing_drupal_fields | | false | Set to `true` to tell Workbench to provide a list of fields that exist in your input CSV but that cannot be matched to Drupal field names (or reserved column names such as "file"). If `false`, Workbench will still check for CSV column headers that it can't match to Drupal fields, but will exit upon finding the first such field. This option produces a list of fields instead of exiting on detecting the first field.| -| standalone_media_url | | false | Set to `true` if your Drupal instance has the "Standalone media URL" option at `/admin/config/media/media-settings` checked. The Drupal default is to have this unchecked, so you only need to use this Workbench option if you have changed Drupal's default. [More information](/islandora_workbench_docs/installation/#configuring-drupals-media-urls) is available. | -| require_entity_reference_views | | true | Set to `false` to tell Workbench to not require a View to expose the values in an entity reference field configured to use an Entity Reference View. Additional information is available [here](/islandora_workbench_docs/fields/#entity-reference-views-fields). | -| text_format_id | | basic_html | The text format ID (machine name) to apply to all Drupal text fields that have a "formatted" field type. Use `text_format_ids` (plural) to provide a text format ID for a specific Drupal field. See "[Text fields with markup](/islandora_workbench_docs/fields/#text-fields-with-markup)" for more information. | - - -### Input data location settings - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| input_dir | | input_data | The full or relative path to the directory containing the files and metadata CSV file. | -| input_csv | | metadata.csv | Path to the CSV metadata file. Can be absolute, or if just the filename is provided, will be assumed to be in the directory named in `input_dir`. Can also be the URL to a Google spreadsheet (see the "[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)" section for more information). | -| google_sheets_csv_filename | | google_sheet.csv | Local CSV filename for data from a Google spreadsheet. See the "[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)" section for more information. | -| google_sheets_gid | | 0 | The "gid" of the worksheet to use in a Google Sheet. See "[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)" section for more information. | -| excel_worksheet | | Sheet1 | If using an Excel file as your input CSV file, the name of the worksheet that the CSV data will be extracted from. | - -### Input CSV file settings - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| id_field | | id | The name of the field in the CSV that uniquely identifies each record. | -| delimiter | | , [comma]| The delimiter used in the CSV file, for example, "," or "\t" (must use double quotes with "\t"). If omitted, defaults to ",". | -| subdelimiter | | | [pipe]| The subdelimiter used in the CSV file to define multiple values in one field. If omitted, defaults to "|". Can be a string of multiple characters, e.g. "^^^". | -| csv_field_templates | | | Used in the `create` and `update` tasks only. A list of Drupal field machine names and corresponding values that are copied into the CSV input file. More detail provided in the "[CSV field templates](/islandora_workbench_docs/field_templates/)" section.| -| csv_value_templates | | | Used in the `create` and `update` tasks only. A list of Drupal field machine names and corresponding templates. More detail provided in the "[CSV value templates](/islandora_workbench_docs/csv_value_templates/)" section.| -| ignore_csv_columns | | | Used in the `create` and `update` tasks only. A list of CSV column headers that Workbench should ignore. For example, `ignore_csv_columns: [Target Collection, Ready to publish]`| -| csv_start_row | | | Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) before the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available. | -| csv_stop_row | | | Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) after the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available.| -| csv_headers | | names | Used in "create", "update" and "create_terms" tasks. Set to "labels" to allow use of field labels (as opposed to machine names) as CSV column headers. | -| clean_csv_values_skip | | [] (empty list)] | Used in all tasks that use CSV input files. See "[How Workbench cleans your input data](/islandora_workbench_docs/preparing_data/#how-workbench-cleans-your-input-data)" for more information. | - -### Output CSV settings - -See "[Generating CSV files](/islandora_workbench_docs/generating_csv_files/)" section for more information. - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| output_csv | | | The full or relative (to the "workbench" script) path to a CSV file with one record per node created by Workbench. | -| output_csv_include_input_csv | | false | Include in the output CSV all the fields (and their values) from the input CSV. | -| export_csv_term_mode | | tid | Used in "export_csv" tasks to indicate whether vocabulary term IDs or names are included in the output CSV file. Set to "tid" (the default) to include term IDs, or set to "name" to include term names. See "[Exporting field data into a CSV file](/islandora_workbench_docs/generating_csv_files/#exporting-field-data-into-a-csv-file)" for more information. | -| export_csv_field_list | | [] (empty list) | List of fields to include in exported CSV data. If empty, all fields will be included. See "[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)" for more information. | -| view_parameters | | | List of URL parameter/value strings to include in requests to a View. See "[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)" for more information. | -| export_csv_file_path | ✔️ in `get_data_from_view` tasks. | | Used in the "export_csv" and "get_data_from_view" tasks. The path to the exported CSV file. Required in the "get_data_from_view" task; in the "export_csv" task, if left empty (the default), the file will be named after the value of the `input_csv` with ".csv_file_with_field_values" appended and saved in the directory identified in `input_dir`. | -| export_file_directory | | | Used in the "export_csv" and "get_data_from_view" tasks. The path to the directory where files corresponding to the data in the CSV output file will be written. | -| export_file_media_use_term_id | | `http://pcdm.org/use#OriginalFile` | Used in the "export_csv" and "get_data_from_view" tasks. The term ID or URI from the Islandora Media Use vocabulary that identifies the file you want to export. | - - -### Media settings - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| nodes_only | | false | Include this option in `create` tasks, set to `true`, if you want to only create nodes and not their accompanying media. See the "Creating nodes but not media" section for more information. | -| allow_missing_files | | false | Determines if empty `file` values are allowed. Used in the `create` and `add_media` tasks. If set to true, empty `file` values are allowed. For `create` tasks, a `true` value will result in nodes without attached media. For `add_media` tasks, a `true` value will skip adding a media for the empty `file` CSV value. Defaults to false (which means all file values must contain the name of a file that exists in the `input_data` directory). | -| exit_on_first_missing_file_during_check | | true | Removed as a configuration setting November 1, 2022. Use `strict_check` instead. | -| strict_check | | | Replaced with `perform_soft_checks` as of commit dfa60ff (July 14, 2023). | -| media_use_tid | | `http://pcdm.org/use#OriginalFile` | The term ID for the term from the "Islandora Media Use" vocabulary you want to apply to the media being created in `create` and `add_media` tasks. You can provide a term URI instead of a term ID, for example `"http://pcdm.org/use#OriginalFile"`. You can specify multiple values for this setting by joining them with the subdelimiter configured in the `subdelimiter` setting; for example, `media_use_tid: 17|18`. You can also set this at the object level by including `media_use_tid` in your CSV file; values there will override the value set in your configuration file. If you are "[Adding multiple media](/islandora_workbench_docs/adding_multiple_media/)", you define media use term IDs in a slightly different way. | -| media_type | | | Overrides, for all media being created, Workbench's default definition of whether the media being created is an image, file, document, audio, or video. Used in the `create`, `add_media`, and `create_from_files` tasks. More detail provided in the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. | -| media_types_override | | | Overrides default media type definitions on a per file extension basis. Used in the `create`, `add_media`, and `create_from_files` tasks. More detail provided in the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. | -| media_type_file_fields | | | Defines the name of the media field that references media's file (i.e., the field on the Media type). Usually used with custom media types and accompanied by either the `media_type` or `media_types_override` option. For more information, see the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. | -| mimetype_extensions | | | Overrides Workbench's default mappings between MIME types and file extensions. Usually used with remote files where the remote web server returns a MIME type that is not standard. For more information, see the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. | -| delete_media_with_nodes | | true | When a node is deleted using a `delete` task, by default, all if its media are automatically deleted. Set this option to false to not delete all of a node's media (you do not generally want to keep the media without the node). | -| use_node_title_for_media_title | | true | If set to `true` (default), name media the same as the parent node's title value. Truncates the value of the field to 255 characters. Applies to both `create` and `add_media` tasks. | -| use_nid_in_media_title | | false | If set to `true`, assigns a name to the media following the pattern `{node_id}-Original File`. Set to true to use the parent node's node ID as the media title. Applies to both `create` and `add_media` tasks. | -| field_for_media_title | | | Identifies a CSV field name (machine name, not human readable) that will be used as the media title in create tasks. For example, `field_for_media_title: id`. Truncates the value of the field to 255 characters. Applies to both `create` and `add_media` tasks. | -| use_node_title_for_remote_filename | | false | Set to true to use a version of the parent node's title as the filename for a remote (http[s]) file. Replaces all non-alphanumeric characters with an underscore (`_`). Truncates the value of the field to 255 characters. Applies to both `create` and `add_media` tasks. Note: this setting replaces (the previously undocumented) `use_nid_in_media_filename` setting.| -| field_for_remote_filename | | | Identifies a CSV field name (machine name, not human readable) that will be used as the filename for a remote (http[s]) file. For example, `field_for_remote_filename: id`. Truncates the value of the field to 255 characters. If the field is empty in the CSV, the CSV ID field value will be used. Applies to both `create` and `add_media` tasks. Note: this setting replaces (the previously undocumented) `field_for_media_filename` setting.| -| delete_tmp_upload | | false | For remote files, if set to `true`, the temporary copy of the remote file is deleted after it is used to create media. If `false`, the copy will remain in the location defined in your `temp_dir` setting. If the file cannot be deleted (e.g. a virus scanner is scanning it), it will remain and an error message will be added to the log file. | -| additional_files | | | Maps a set of CSV field names to media use terms IDs to create additional media (additional to the media created from the file named in the "file" column, that is) in `create` and `add_media` tasks. See "[Adding multiple media](/islandora_workbench_docs/adding_multiple_media)" for more information. | -| fixity_algorithm | | None | Checksum/hash algorithm to use during transmission fixity checking. Must be one of "md5", "sha1", or "sha256". See "[Fixity checking](/islandora_workbench_docs/fixity)" for more information. | -| validate_fixity_during_check | | false | Perform checksum validation during `--check`. See "[Fixity checking](/islandora_workbench_docs/fixity)" for more information. | -| delete_media_by_node_media_use_tids | | [] (empty list) | During `delete_media_by_node` tasks, allows you to specify which media to delete. Only media with the listed terms IDs from the Islandora Media Use vocabulary will be deleted. By default (an empty list), all media are deleted. See "[Deleting Media](/islandora_workbench_docs/deleting_media)" for more information.| - -### Islandora model settings - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| model [singular]| | | Used in the `create_from_files` task only. Defines the term ID from the the "Islandora Models" vocabulary for all nodes created using this task. Note: one of `model` or `models` is required. More detail provided in the "[Creating nodes from files](/islandora_workbench_docs/creating_nodes_from_files/)" section.| -| models [plural] | | | Used in the `create_from_files` task only. Provides a mapping between file extensions and terms in the "Islandora Models" vocabulary. Note: one of `model` or `models` is required. More detail provided in the [Creating nodes from files](/islandora_workbench_docs/creating_nodes_from_files/)" section.| - -### Paged and compound content settings - -See the section "[Creating paged content](/islandora_workbench_docs/paged_and_compound/)" for more information. - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| paged_content_from_directories | | false | Set to true if you are using the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method of creating paged content. | -| paged_content_sequence_separator | | - [hyphen]| The character used to separate the page sequence number from the rest of the filename. Used when creating paged content with the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method. Note: this configuration option was originally misspelled "paged_content_sequence_seprator". | -| paged_content_page_model_tid | | | Required if `paged_content_from_directories` is true. The the term ID from the Islandora Models (or its URI) taxonomy to assign to pages. | -| paged_content_page_display_hints | | | The term ID from the Islandora Display taxonomy to assign to pages. If not included, defaults to the value of the `field_display_hints` in the parent's record in the CSV file. | -| paged_content_page_content_type | | | Set to the machine name of the Drupal node content type for pages created using the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method if it is different than the content type of the parent (which is specified in the content_type setting). | -| page_title_template | | '$parent_title, page $weight' | Template used to generate the titles of pages/members in the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method. | -| secondary_tasks | | | A list of configuration file names that are executed as secondary tasks after the primary task to create compound objects. See "[Using a secondary task](/islandora_workbench_docs/paged_and_compound/#using-a-secondary-task)" for more information. | -| csv_id_to_node_id_map_path | | [temp_dir]/csv_id_to_node_id_map.db | Name of the SQLite database filename used to store CSV row ID to node ID mappings for nodes created during `create` and `create_from_files` tasks. If you want to store your map database outside of a temporary directory, use an absolute path to the database file for this setting. If you want to disable population of this database, set this config setting to `false`. See "[Generating CSV files](/islandora_workbench_docs/generating_csv_files/#using-the-csv-id-to-node-id-map)" for more information. | -| query_csv_id_to_node_id_map_for_parents | | false | Queries the CSV ID to node ID map when creating compound content. Set to `true` if you want to use parent IDs from previous Workbench sessions. Note: this setting is automatically set to true in secondary task config files. See "[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information." | -| ignore_duplicate_parent_ids | | true | Tells Workbench to ignore entries in the CSV ID to node ID map that have the same parent ID value. Set to `false` if you want Workbench to warn you that there are duplicate parent IDs in your CSV ID to node ID map. See "[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information." | - -### Logging settings - -See the "[Logging](/islandora_workbench_docs/logging/)" section for more information. - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| log_file_path | | workbench.log | The path to the log file, absolute or relative to the directory Workbench is run from. | -| log_file_mode | | a [append] | Set to "w" to overwrite the log file, if it exists. | -| log_request_url | | false | Whether or not to log the request URL (and its method). Useful for debugging. | -| log_json | | false | Whether or not to log the raw request JSON POSTed, PUT, or PATCHed to Drupal. Useful for debugging. | -| log_headers | | false | Whether or not to log the raw HTTP headers used in all requests. Useful for debugging. | -| log_response_status_code | | false | Whether or not to log the HTTP response code. Useful for debugging. | -| log_response_time | | false | Whether or not to log the response time of each request that is slower than the average response time for the last 20 HTTP requests Workbench makes to the Drupal server. Useful for debugging. | -| log_response_body | | false | Whether or not to log the raw HTTP response body. Useful for debugging. | -| log_term_creation | | true | Whether or not to log the creation of new terms during "create" and "update" tasks (does not apply to the "create_terms" task). `--check` will still report that terms in the CSV do not exist in their respective vocabularies. | - -### HTTP settings - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| user_agent | | Islandora Workbench | String to use as the User-Agent header in HTTP requests. | -| allow_redirects | | true | Whether or not to allow Islandora Workbench to respond to HTTP redirects. | -| secure_ssl_only | | true | Whether or not to require valid SSL certificates. Set to `false` if you want to ignore SSL certificates. | -| enable_http_cache | | true | Whether or not to enable Workbench's client-side request cache. Set to `false` if you want to disable the cache during troubleshooting, etc. | -| http_cache_storage | | memory | The backend storage type for the client-side cache. Set to `sqlite` if you are getting out of memory errors while running Islandora Workbench. | -| http_cache_storage_expire_after | | 1200 | Length of the client-side cache lifespan (in seconds). Reduce this number if you are using the `sqlite` storage backend and the database is using too much disk space. Note that reducing the cache lifespan will result in increased load on your Drupal server. | - -### Miscellaneous settings - -| Setting | Required | Default value | Description | -| --- | --- | --- | --- | -| perform_soft_checks | | false | If set to true, `--check` will not exit when it encounters an error with parent/child order, file extension registration with Drupal media file fields, or EDTF validation. Instead, it will log any errors it encounters and exit after it has checked all rows in the CSV input file. Note: this setting replaces `strict_check`. | -| temp_dir | | Value of the temporary directory defined by your system as defined by Python's [gettempdir()](https://docs.python.org/3/library/tempfile.html#tempfile.gettempdir) function. | Relative or absolute path to the directory where you want Workbench's temporary files to be written. These include the ".preprocessed" version of the your input CSV, remote files temporarily downloaded to create media, and the CSV ID to node ID map database. | -| sqlite_db_filename | | [temp_dir]/workbench_temp_data.db | Name of the SQLite database filename used to store session data. | -| rollback_dir | | Value of `input_dir` setting | Absolute path to the directory where you want your "rollback.csv" file to be written. See "[Rolling back](/islandora_workbench_docs/rolling_back/)" for more information. | -| timestamp_rollback | | false | Set to `true` to add a timestamp to the "rollback.yml" and corresponding "rollback.csv" generated in "create" and "create_from_files" tasks. See "[Rolling back](/islandora_workbench_docs/rolling_back/)" for more information. | -| pause | | | Defines the number of seconds to pause between all 'POST', 'PUT', 'PATCH', 'DELETE' requests to Drupal. Include it in your configuration to lessen the impact of Islandora Workbench on your site during large jobs, for example pause: 1.5. More information is available in the "[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)" documentation. | -| adaptive_pause | | | Defines the number of seconds to pause between each REST request to Drupal. Works like "pause" but only takes effect when the Drupal server's response to the most recent request is slower (determined by the "adaptive_pause_threshold" value) than the average response time for the last 20 requests. More information is available in the "[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)" documentation. | -| adaptive_pause_threshold | | 2 | A weighting of the response time for the most recent request, relative to the average response times of the last 20 requests. This weighting determines how much slower the Drupal server's response to the most recent Workbench request must be in order for adaptive pausing to take effect for the next request. For example, if set to "1", adaptive pausing will happen when the response time is equal to the average of the last 20 response times; if set to "2", adaptive pausing will take effect if the last requests's response time is double the average. | -| progress_bar | | false | Show a progress bar when running Workbench instead of row-by-row output. | -| bootstrap | | | List of absolute paths to one or more scripts that execute prior to Workbench connecting to Drupal. More information is available in the "[Hooks](/islandora_workbench_docs/hooks/)" documentation. | -| shutdown | | | List of absolute paths to one or more scripts that execute after Workbench connecting to Drupal. More information is available in the "[Hooks](/islandora_workbench_docs/hooks/)" documentation. | -| preprocessors | | | List of absolute paths to one or more scripts that are applied to CSV values prior to the values being ingested into Drupal. More information is available in the "[Hooks](/islandora_workbench_docs/hooks/)" documentation. | -| node_post_create | | | List of absolute paths to one or more scripts that execute after a node is created. More information is available in the "[Hooks](/islandora_workbench_docs/hooks/)" documentation. | -| node_post_update | | | List of absolute paths to one or more scripts that execute after a node is updated. More information is available in the "[Hooks](/islandora_workbench_docs/hooks/)" documentation. | -| media_post_create | | | List of absolute paths to one or more scripts that execute after a media is created. More information is available in the "[Hooks](/islandora_workbench_docs/hooks/)" documentation. | -| drupal_8 | | | Deprecated. | -| path_to_python | | python | Used in `create` tasks that also use the `secondary_tasks` option. Tells Workbench the path to the python interpreter. For details on when to use this option, refer to the end of the "Secondary Tasks" section of "[Creating paged, compound, and collection content](/islandora_workbench_docs/paged_and_compound/#using-a-secondary-task)". | -| path_to_workbench_script | | workbench | Used in `create` tasks that also use the `secondary_tasks` option. Tells Workbench the path to the python interpreter. For details on when to use this option, refer to the end of the "Secondary Tasks" section of "[Creating paged, compound, and collection content](/islandora_workbench_docs/paged_and_compound/#using-a-secondary-task)". | -| contact_sheet_output_dir | | contact_sheet_output | Used in `create` tasks to specify the name of the directory where contact sheet output is written. Can be relative (to the Workbench directory) or absolute. See "[Generating a contact sheet](/islandora_workbench_docs/contact_sheet/)" for more information. | -| contact_sheet_css_path | | assets/contact_sheet/contact-sheet.css | Used in `create` tasks to specify the path of the CSS stylesheet to use in contact sheets. Can be relative (to the Workbench directory) or absolute. See "[Generating a contact sheet](/islandora_workbench_docs/contact_sheet/)" for more information. | + +## Config + +!!swagger openapi.json!! When you run Islandora Workbench with the `--check` argument, it will verify that all configuration options required for the current task are present, and if they aren't tell you so. diff --git a/docs/openapi.json b/docs/openapi.json new file mode 100644 index 00000000..15199db8 --- /dev/null +++ b/docs/openapi.json @@ -0,0 +1,688 @@ +{ + "openapi": "3.0.0", + "info": { + "title": "Islandora Workbench Config Schema", + "version": "0.0.1" + }, + "paths": { + "/api/config/validate": { + "post": { + "requestBody": { + "required": true, + "content": { + "application/yaml": { + "schema": { + "$ref": "#/components/schemas/CombinedSchema" + } + } + } + }, + "responses": { + "200": { + "description": "Task executed successfully" + }, + "400": { + "description": "Bad request, check request parameters" + } + } + } + } + }, + "components": { + "schemas": { + "CombinedSchema": { + "allOf": [ + { + "$ref": "#/components/schemas/Base" + }, + { + "$ref": "#/components/schemas/DrupalSettings" + }, + { + "$ref": "#/components/schemas/InputDataLocationSettings" + }, + { + "$ref": "#/components/schemas/InputCSVFileSettings" + }, + { + "$ref": "#/components/schemas/OutputCSVSettings" + }, + { + "$ref": "#/components/schemas/MediaSettings" + }, + { + "$ref": "#/components/schemas/IslandoraModelSettings" + }, + { + "$ref": "#/components/schemas/PagedAndCompoundContentSettings" + }, + { + "$ref": "#/components/schemas/LoggingSettings" + }, + { + "$ref": "#/components/schemas/HttpSettings" + }, + { + "$ref": "#/components/schemas/MiscellaneousSettings" + } + ] + }, + "Base": { + "type": "object", + "properties": { + "task": { + "type": "string", + "enum": [ + "create", + "create_from_files", + "update", + "delete", + "add_media", + "delete_media", + "update_media", + "export_csv", + "get_data_from_view", + "create_terms", + "delete_media_by_node" + ], + "description": "One of 'create', 'create_from_files', 'update', delete', 'add_media', 'delete_media', 'update_media', 'export_csv', 'get_data_from_view', 'create_terms', or 'delete_media_by_node'. See \"[Choosing a task](/islandora_workbench_docs/choosing_a_task/)\" for more information." + }, + "host": { + "type": "string", + "format": "uri", + "description": "The hostname, including \\`http://\\` or \\`https://\\` of your Islandora repository, and port number if not the default 80. " + }, + "username": { + "type": "string", + "description": "The username used to authenticate the requests. This Drupal user should be a member of the \"Administrator\" role. If you want to create nodes that are owned by a specific Drupal user, include their numeric user ID in the \\`uid\\` column in your CSV. " + }, + "password": { + "type": "string", + "description": "The user's password. You can also set the password in your \\`ISLANDORA_WORKBENCH_PASSWORD\\` environment variable. If you do this, omit the \\`password\\` option in your configuration file. If a password is not available in either your configuration file or in the environment variable, Workbench will prompt for a password." + } + }, + "required": [ + "task", + "host", + "username", + "password" + ] + }, + "DrupalSettings": { + "type": "object", + "properties": { + "content_type": { + "type": "string", + "description": "The machine name of the Drupal node content type you are creating or updating. Required in \"create\" and \"update\" tasks. " + }, + "drupal_filesystem": { + "type": "string", + "description": "One of 'fedora://', 'public://', or 'private://' (the wrapping quotation marks are required). Only used with Drupal 8.x - 9.1; starting with Drupal 9.2, the filesystem is automatically detected from the media's configuration. Will eventually be deprecated. " + }, + "allow_adding_terms": { + "type": "boolean", + "description": "In \\`create\\` and \\`update\\` tasks, determines if Workbench will add taxonomy terms if they do not exist in the target vocabulary. See more information in the \"[Taxonomy reference fields](/islandora_workbench_docs/fields/#field-types)\" section. Note: this setting is not required in \\`create_terms\\` tasks. " + }, + "vocab_id": { + "type": "string", + "description": "Identifies the vocabulary you are adding terms to in \\`create_tersm\\` tasks. See more information in the \"[Creating taxonomy terms](/islandora_workbench_docs/creating_taxonomy_terms)\" section. " + }, + "update_mode": { + "type": "string", + "description": "Determines if Workbench will \\`replace\\`, \\`append\\` (add to) , or \\`delete\\` field values during \\`update\\` tasks. See more information in the \"[Updating nodes](/islandora_workbench_docs/updating_nodes)\" section. " + }, + "validate_terms_exist": { + "type": "boolean", + "description": "If set to false, during \\`--check\\` Workbench will not query Drupal to determine if taxonomy terms exist. The structure of term values in CSV are still validated; this option only tells Workbench to not check for each term's existence in the target Drupal. Useful to speed up the \\`--check\\` process if you know terms don't exist in the target Drupal. " + }, + "validate_parent_node_exists": { + "type": "boolean", + "description": "If set to false, during \\`--check\\` Workbench will not query Drupal to determine if nodes whose node IDs are in \\`field_member_of\\` exist. Useful to speed up the \\`--check\\` process if you know terms already exist in the target Drupal. " + }, + "max_node_title_length": { + "type": "integer", + "description": "Set to the number of allowed characters for node titles if your Drupal uses [Node Title Length](https://www.drupal.org/project/title_length). If unsure what your the maximum length of the node titles your site allows, check the length of the \"title\" column in your Drupal database's \"node_field_data\" table. " + }, + "list_missing_drupal_fields": { + "type": "boolean", + "description": "Set to \\`true\\` to tell Workbench to provide a list of fields that exist in your input CSV but that cannot be matched to Drupal field names (or reserved column names such as \"file\"). If \\`false\\`, Workbench will still check for CSV column headers that it can't match to Drupal fields, but will exit upon finding the first such field. This option produces a list of fields instead of exiting on detecting the first field." + }, + "standalone_media_url": { + "type": "boolean", + "description": "Set to \\`true\\` if your Drupal instance has the \"Standalone media URL\" option at \\`/admin/config/media/media-settings\\` checked. The Drupal default is to have this unchecked, so you only need to use this Workbench option if you have changed Drupal's default. [More information](/islandora_workbench_docs/installation/#configuring-drupals-media-urls) is available. " + }, + "require_entity_reference_views": { + "type": "boolean", + "description": "Set to \\`false\\` to tell Workbench to not require a View to expose the values in an entity reference field configured to use an Entity Reference View. Additional information is available [here](/islandora_workbench_docs/fields/#entity-reference-views-fields). " + }, + "text_format_id": { + "type": "string", + "description": "The text format ID (machine name) to apply to all Drupal text fields that have a \"formatted\" field type. Use \\`text_format_ids\\` (plural) to provide a text format ID for a specific Drupal field. See \"[Text fields with markup](/islandora_workbench_docs/fields/#text-fields-with-markup)\" for more information. " + } + } + }, + "InputDataLocationSettings": { + "type": "object", + "properties": { + "input_dir": { + "type": "string", + "description": "The full or relative path to the directory containing the files and metadata CSV file. ", + "default": "input_data" + }, + "input_csv": { + "type": "string", + "description": "Path to the CSV metadata file. Can be absolute, or if just the filename is provided, will be assumed to be in the directory named in \\`input_dir\\`. Can also be the URL to a Google spreadsheet (see the \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information). ", + "default": "metadata.csv" + }, + "google_sheets_csv_filename": { + "type": "string", + "description": "Local CSV filename for data from a Google spreadsheet. See the \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information. " + }, + "google_sheets_gid": { + "type": "integer", + "description": "The \"gid\" of the worksheet to use in a Google Sheet. See \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information. ", + "default": 0 + }, + "excel_worksheet": { + "type": "string", + "description": "If using an Excel file as your input CSV file, the name of the worksheet that the CSV data will be extracted from. ", + "default": "Sheet1" + } + }, + "required": [ + "input_dir", + "input_csv" + ] + }, + "InputCSVFileSettings": { + "type": "object", + "properties": { + "id_field": { + "type": "string", + "description": "The name of the field in the CSV that uniquely identifies each record. ", + "default": "id" + }, + "delimiter": { + "type": "string", + "description": "The delimiter used in the CSV file, for example, \",\" or \"\\t\" (must use double quotes with \"\\t\"). If omitted, defaults to \",\". ", + "default": "," + }, + "subdelimiter": { + "type": "string", + "description": "The subdelimiter used in the CSV file to define multiple values in one field. If omitted, defaults to \"|\". Can be a string of multiple characters, e.g. \"^^^\". ", + "default": "|" + }, + "csv_field_templates": { + "type": "object", + "description": "Used in the \\`create\\` and \\`update\\` tasks only. A list of Drupal field machine names and corresponding values that are copied into the CSV input file. More detail provided in the \"[CSV field templates](/islandora_workbench_docs/field_templates/)\" section.", + "additionalProperties": { + "type": "string" + } + }, + "csv_value_templates": { + "type": "object", + "description": "Used in the \\`create\\` and \\`update\\` tasks only. A list of Drupal field machine names and corresponding templates. More detail provided in the \"[CSV value templates](/islandora_workbench_docs/csv_value_templates/)\" section." + }, + "ignore_csv_columns": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Used in the \\`create\\` and \\`update\\` tasks only. A list of CSV column headers that Workbench should ignore. For example, \\`ignore_csv_columns: [Target Collection, Ready to publish]\\`" + }, + "csv_start_row": { + "type": "integer", + "description": "Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) before the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available. " + }, + "csv_stop_row": { + "type": "integer", + "description": "Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) after the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available." + }, + "csv_headers": { + "type": "string", + "enum": [ + "names", + "labels" + ], + "description": "Used in \"create\", \"update\" and \"create_terms\" tasks. Set to \"labels\" to allow use of field labels (as opposed to machine names) as CSV column headers. ", + "default": "names" + }, + "clean_csv_values_skip": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Used in all tasks that use CSV input files. See \"[How Workbench cleans your input data](/islandora_workbench_docs/preparing_data/#how-workbench-cleans-your-input-data)\" for more information. " + } + }, + "required": [ + "id_field" + ] + }, + "OutputCSVSettings": { + "type": "object", + "description": "See \"[Generating CSV files](generating_csv_files/)\" section for more information.", + "properties": { + "output_csv": { + "type": "string", + "description": "The full or relative (to the \"workbench\" script) path to a CSV file with one record per node created by Workbench. " + }, + "output_csv_include_input_csv": { + "type": "boolean", + "description": "Include in the output CSV all the fields (and their values) from the input CSV. ", + "default": false + }, + "export_csv_term_mode": { + "type": "string", + "enum": [ + "tid", + "name" + ], + "description": "Used in \"export_csv\" tasks to indicate whether vocabulary term IDs or names are included in the output CSV file. Set to \"tid\" (the default) to include term IDs, or set to \"name\" to include term names. See \"[Exporting field data into a CSV file](/islandora_workbench_docs/generating_csv_files/#exporting-field-data-into-a-csv-file)\" for more information. " + }, + "export_csv_field_list": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of fields to include in exported CSV data. If empty, all fields will be included. See \"[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)\" for more information. " + }, + "view_parameters": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of URL parameter/value strings to include in requests to a View. See \"[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)\" for more information. " + }, + "export_csv_file_path": { + "type": "string", + "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The path to the exported CSV file. Required in the \"get_data_from_view\" task; in the \"export_csv\" task, if left empty (the default), the file will be named after the value of the \\`input_csv\\` with \".csv_file_with_field_values\" appended and saved in the directory identified in \\`input_dir\\`. " + }, + "export_file_directory": { + "type": "string", + "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The path to the directory where files corresponding to the data in the CSV output file will be written. " + }, + "export_file_media_use_term_id": { + "type": "string", + "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The term ID or URI from the Islandora Media Use vocabulary that identifies the file you want to export. " + } + }, + "required": [ + "export_csv_file_path" + ] + }, + "MediaSettings": { + "type": "object", + "properties": { + "nodes_only": { + "type": "boolean", + "description": "Include this option in \\`create\\` tasks, set to \\`true\\`, if you want to only create nodes and not their accompanying media. See the \"Creating nodes but not media\" section for more information. ", + "default": false + }, + "allow_missing_files": { + "type": "boolean", + "description": "Determines if empty \\`file\\` values are allowed. Used in the \\`create\\` and \\`add_media\\` tasks. If set to true, empty \\`file\\` values are allowed. For \\`create\\` tasks, a \\`true\\` value will result in nodes without attached media. For \\`add_media\\` tasks, a \\`true\\` value will skip adding a media for the empty \\`file\\` CSV value. Defaults to false (which means all file values must contain the name of a file that exists in the \\`input_data\\` directory). " + }, + "strict_check": { + "type": "boolean", + "description": "Replaced with \\`perform_soft_checks\\` as of commit dfa60ff (July 14, 2023). " + }, + "perform_soft_checks": { + "type": "boolean", + "description": "Use soft checks for validation during processing." + }, + "media_use_tid": { + "type": "string", + "description": "The term ID for the term from the \"Islandora Media Use\" vocabulary you want to apply to the media being created in \\`create\\` and \\`add_media\\` tasks. You can provide a term URI instead of a term ID, for example \\`\"http://pcdm.org/use#OriginalFile\"\\`. You can specify multiple values for this setting by joining them with the subdelimiter configured in the \\`subdelimiter\\` setting; for example, \\`media_use_tid: 17" + }, + "media_type": { + "type": "string", + "description": "Overrides, for all media being created, Workbench's default definition of whether the media being created is an image, file, document, audio, or video. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section. " + }, + "media_types_override": { + "type": "object", + "description": "Overrides default media type definitions on a per file extension basis. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section. " + }, + "media_type_file_fields": { + "type": "string", + "description": "Defines the name of the media field that references media's file (i.e., the field on the Media type). Usually used with custom media types and accompanied by either the \\`media_type\\` or \\`media_types_override\\` option. For more information, see the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section. " + }, + "mimetype_extensions": { + "type": "object", + "description": "Overrides Workbench's default mappings between MIME types and file extensions. Usually used with remote files where the remote web server returns a MIME type that is not standard. For more information, see the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section. " + }, + "delete_media_with_nodes": { + "type": "boolean", + "description": "When a node is deleted using a \\`delete\\` task, by default, all if its media are automatically deleted. Set this option to false to not delete all of a node's media (you do not generally want to keep the media without the node). " + }, + "use_node_title_for_media_title": { + "type": "boolean", + "description": "If set to \\`true\\` (default), name media the same as the parent node's title value. Truncates the value of the field to 255 characters. Applies to both \\`create\\` and \\`add_media\\` tasks. " + }, + "use_nid_in_media_title": { + "type": "boolean", + "description": "If set to \\`true\\`, assigns a name to the media following the pattern \\`{node_id}-Original File\\`. Set to true to use the parent node's node ID as the media title. Applies to both \\`create\\` and \\`add_media\\` tasks. " + }, + "field_for_media_title": { + "type": "string", + "description": "Identifies a CSV field name (machine name, not human readable) that will be used as the media title in create tasks. For example, \\`field_for_media_title: id\\`. Truncates the value of the field to 255 characters. Applies to both \\`create\\` and \\`add_media\\` tasks." + }, + "use_node_title_for_remote_filename": { + "type": "boolean", + "description": "Set to true to use a version of the parent node's title as the filename for a remote (http[s]) file. Replaces all non-alphanumeric characters with an underscore (\\`_\\`). Truncates the value of the field to 255 characters. Applies to both \\`create\\` and \\`add_media\\` tasks. Note: this setting replaces (the previously undocumented) \\`use_nid_in_media_filename\\` setting." + }, + "field_for_remote_filename": { + "type": "string", + "description": "Identifies a CSV field name (machine name, not human readable) that will be used as the filename for a remote (http[s]) file. For example, \\`field_for_remote_filename: id\\`. Truncates the value of the field to 255 characters. If the field is empty in the CSV, the CSV ID field value will be used. Applies to both \\`create\\` and \\`add_media\\` tasks. Note: this setting replaces (the previously undocumented) \\`field_for_media_filename\\` setting." + }, + "delete_tmp_upload": { + "type": "boolean", + "description": "For remote files, if set to \\`true\\`, the temporary copy of the remote file is deleted after it is used to create media. If \\`false\\`, the copy will remain in the location defined in your \\`temp_dir\\` setting. If the file cannot be deleted (e.g. a virus scanner is scanning it), it will remain and an error message will be added to the log file. " + }, + "additional_files": { + "type": "object", + "description": "Maps a set of CSV field names to media use terms IDs to create additional media (additional to the media created from the file named in the \"file\" column, that is) in \\`create\\` and \\`add_media\\` tasks. See \"[Adding multiple media](/islandora_workbench_docs/adding_multiple_media)\" for more information. " + }, + "fixity_algorithm": { + "type": "string", + "enum": [ + "md5", + "sha1", + "sha256" + ], + "description": "Checksum/hash algorithm to use during transmission fixity checking. Must be one of \"md5\", \"sha1\", or \"sha256\". See \"[Fixity checking](/islandora_workbench_docs/fixity)\" for more information. " + }, + "validate_fixity_during_check": { + "type": "boolean", + "description": "Perform checksum validation during \\`--check\\`. See \"[Fixity checking](/islandora_workbench_docs/fixity)\" for more information. " + }, + "delete_media_by_node_media_use_tids": { + "type": "array", + "items": { + "type": "string" + }, + "description": "During \\`delete_media_by_node\\` tasks, allows you to specify which media to delete. Only media with the listed terms IDs from the Islandora Media Use vocabulary will be deleted. By default (an empty list), all media are deleted. See \"[Deleting Media](/islandora_workbench_docs/deleting_media)\" for more information." + }, + "exit_on_first_missing_file_during_check": { + "description": "Removed as a configuration setting November 1, 2022. Use \\`strict_check\\` instead. " + } + } + }, + "IslandoraModelSettings": { + "type": "object", + "properties": { + "model": { + "type": "string", + "description": "Used in the \\`create_from_files\\` task only. Defines the term ID from the the \"Islandora Models\" vocabulary for all nodes created using this task. Note: one of \\`model\\` or \\`models\\` is required. More detail provided in the \"[Creating nodes from files](/islandora_workbench_docs/creating_nodes_from_files/)\" section." + }, + "models": { + "type": "object", + "description": "Used in the \\`create_from_files\\` task only. Provides a mapping between file extensions and terms in the \"Islandora Models\" vocabulary. Note: one of \\`model\\` or \\`models\\` is required. More detail provided in the [Creating nodes from files](/islandora_workbench_docs/creating_nodes_from_files/)\" section." + } + } + }, + "PagedAndCompoundContentSettings": { + "type": "object", + "description": "See the section \"[Creating paged content](paged_and_compound/)\" for more information.", + "properties": { + "paged_content_from_directories": { + "type": "boolean", + "description": "Set to true if you are using the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method of creating paged content. " + }, + "paged_content_sequence_separator": { + "type": "string", + "description": "The character used to separate the page sequence number from the rest of the filename. Used when creating paged content with the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method. Note: this configuration option was originally misspelled \"paged_content_sequence_seprator\". ", + "default": "-" + }, + "paged_content_page_model_tid": { + "type": "string", + "description": "Required if \\`paged_content_from_directories\\` is true. The the term ID from the Islandora Models (or its URI) taxonomy to assign to pages. " + }, + "paged_content_page_display_hints": { + "type": "string", + "description": "The term ID from the Islandora Display taxonomy to assign to pages. If not included, defaults to the value of the \\`field_display_hints\\` in the parent's record in the CSV file. " + }, + "paged_content_page_content_type": { + "type": "string", + "description": "Set to the machine name of the Drupal node content type for pages created using the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method if it is different than the content type of the parent (which is specified in the content_type setting). " + }, + "page_title_template": { + "type": "string", + "description": "Template used to generate the titles of pages/members in the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method. ", + "default": "$parent_title, page $weight" + }, + "secondary_tasks": { + "type": "array", + "items": { + "type": "string" + }, + "description": "A list of configuration file names that are executed as secondary tasks after the primary task to create compound objects. See \"[Using a secondary task](/islandora_workbench_docs/paged_and_compound/#using-a-secondary-task)\" for more information. " + }, + "csv_id_to_node_id_map_path": { + "type": "string", + "description": "Name of the SQLite database filename used to store CSV row ID to node ID mappings for nodes created during \\`create\\` and \\`create_from_files\\` tasks. If you want to store your map database outside of a temporary directory, use an absolute path to the database file for this setting. If you want to disable population of this database, set this config setting to \\`false\\`. See \"[Generating CSV files](/islandora_workbench_docs/generating_csv_files/#using-the-csv-id-to-node-id-map)\" for more information. ", + "default": "[temp_dir]/csv_id_to_node_id_map.db" + }, + "query_csv_id_to_node_id_map_for_parents": { + "type": "boolean", + "description": "Queries the CSV ID to node ID map when creating compound content. Set to \\`true\\` if you want to use parent IDs from previous Workbench sessions. Note: this setting is automatically set to true in secondary task config files. See \"[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\" " + }, + "ignore_duplicate_parent_ids": { + "type": "boolean", + "description": "Tells Workbench to ignore entries in the CSV ID to node ID map that have the same parent ID value. Set to \\`false\\` if you want Workbench to warn you that there are duplicate parent IDs in your CSV ID to node ID map. See \"[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\" ", + "default": true + } + } + }, + "LoggingSettings": { + "type": "object", + "description": "See the \"[Logging](logging/)\" section for more information.", + "properties": { + "log_file_path": { + "type": "string", + "description": "The path to the log file, absolute or relative to the directory Workbench is run from. ", + "default": "workbench.log" + }, + "log_file_mode": { + "type": "string", + "enum": [ + "a", + "w" + ], + "description": "Set to \"w\" to overwrite the log file, if it exists. ", + "default": "a" + }, + "log_request_url": { + "type": "boolean", + "description": "Whether or not to log the request URL (and its method). Useful for debugging. ", + "default": false + }, + "log_json": { + "type": "boolean", + "description": "Whether or not to log the raw request JSON POSTed, PUT, or PATCHed to Drupal. Useful for debugging. ", + "default": false + }, + "log_headers": { + "type": "boolean", + "description": "Whether or not to log the raw HTTP headers used in all requests. Useful for debugging. ", + "default": false + }, + "log_response_status_code": { + "type": "boolean", + "description": "Whether or not to log the HTTP response code. Useful for debugging. ", + "default": false + }, + "log_response_time": { + "type": "boolean", + "description": "Whether or not to log the response time of each request that is slower than the average response time for the last 20 HTTP requests Workbench makes to the Drupal server. Useful for debugging. ", + "default": false + }, + "log_response_body": { + "type": "boolean", + "description": "Whether or not to log the raw HTTP response body. Useful for debugging. ", + "default": false + }, + "log_term_creation": { + "type": "boolean", + "description": "Whether or not to log the creation of new terms during \"create\" and \"update\" tasks (does not apply to the \"create_terms\" task). \\`--check\\` will still report that terms in the CSV do not exist in their respective vocabularies. ", + "default": true + }, + "allow_redirects": { + "description": "Whether or not to allow Islandora Workbench to respond to HTTP redirects. " + }, + "secure_ssl_only": { + "description": "Whether or not to require valid SSL certificates. Set to \\`false\\` if you want to ignore SSL certificates. " + }, + "enable_http_cache": { + "description": "Whether or not to enable Workbench's client-side request cache. Set to \\`false\\` if you want to disable the cache during troubleshooting, etc. " + }, + "http_cache_storage": { + "description": "The backend storage type for the client-side cache. Set to \\`sqlite\\` if you are getting out of memory errors while running Islandora Workbench. " + }, + "http_cache_storage_expire_after": { + "description": "Length of the client-side cache lifespan (in seconds). Reduce this number if you are using the \\`sqlite\\` storage backend and the database is using too much disk space. Note that reducing the cache lifespan will result in increased load on your Drupal server. " + } + } + }, + "HttpSettings": { + "type": "object", + "properties": { + "user_agent": { + "type": "string", + "description": "String to use as the User-Agent header in HTTP requests. ", + "default": "Islandora Workbench" + }, + "allow_redirects": { + "type": "boolean", + "description": "Whether or not to allow Islandora Workbench to respond to HTTP redirects.", + "default": true + }, + "secure_ssl_only": { + "type": "boolean", + "description": "Whether or not to require valid SSL certificates. Set to false if you want to ignore SSL certificates.", + "default": true + }, + "enable_http_cache": { + "type": "boolean", + "description": "Whether or not to enable Workbench's client-side request cache. Set to false if you want to disable the cache during troubleshooting, etc.", + "default": true + }, + "http_cache_storage": { + "type": "string", + "description": "The backend storage type for the client-side cache. Set to sqlite if you are getting out of memory errors while running Islandora Workbench.", + "default": "memory" + }, + "http_cache_storage_expire_after": { + "type": "integer", + "description": "Length of the client-side cache lifespan (in seconds). Reduce this number if you are using the sqlite storage backend and the database is using too much disk space. Note that reducing the cache lifespan will result in increased load on your Drupal server.", + "default": 1200 + } + } + }, + "MiscellaneousSettings": { + "type": "object", + "properties": { + "perform_soft_checks": { + "type": "boolean", + "description": "If set to true, \\`--check\\` will not exit when it encounters an error with parent/child order, file extension registration with Drupal media file fields, or EDTF validation. Instead, it will log any errors it encounters and exit after it has checked all rows in the CSV input file. Note: this setting replaces \\`strict_check\\`. ", + "default": false + }, + "temp_dir": { + "type": "string", + "description": "Relative or absolute path to the directory where you want Workbench's temporary files to be written. These include the \".preprocessed\" version of the your input CSV, remote files temporarily downloaded to create media, and the CSV ID to node ID map database. " + }, + "sqlite_db_filename": { + "type": "string", + "description": "Name of the SQLite database filename used to store session data. ", + "default": "[temp_dir]/workbench_temp_data.db" + }, + "rollback_dir": { + "type": "string", + "description": "Absolute path to the directory where you want your \"rollback.csv\" file to be written. See \"[Rolling back](/islandora_workbench_docs/rolling_back/)\" for more information. " + }, + "timestamp_rollback": { + "type": "boolean", + "description": "Set to \\`true\\` to add a timestamp to the \"rollback.yml\" and corresponding \"rollback.csv\" generated in \"create\" and \"create_from_files\" tasks. See \"[Rolling back](/islandora_workbench_docs/rolling_back/)\" for more information. " + }, + "pause": { + "type": "number", + "description": "Defines the number of seconds to pause between all 'POST', 'PUT', 'PATCH', 'DELETE' requests to Drupal. Include it in your configuration to lessen the impact of Islandora Workbench on your site during large jobs, for example pause: 1.5. More information is available in the \"[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)\" documentation. " + }, + "adaptive_pause": { + "type": "number", + "description": "Defines the number of seconds to pause between each REST request to Drupal. Works like \"pause\" but only takes effect when the Drupal server's response to the most recent request is slower (determined by the \"adaptive_pause_threshold\" value) than the average response time for the last 20 requests. More information is available in the \"[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)\" documentation. " + }, + "adaptive_pause_threshold": { + "type": "number", + "description": "A weighting of the response time for the most recent request, relative to the average response times of the last 20 requests. This weighting determines how much slower the Drupal server's response to the most recent Workbench request must be in order for adaptive pausing to take effect for the next request.", + "default": 2 + }, + "progress_bar": { + "type": "boolean", + "description": "Show a progress bar when running Workbench instead of row-by-row output.", + "default": false + }, + "bootstrap": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of absolute paths to one or more scripts that execute prior to Workbench connecting to Drupal." + }, + "shutdown": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of absolute paths to one or more scripts that execute after Workbench connecting to Drupal." + }, + "preprocessors": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of absolute paths to one or more scripts that are applied to CSV values prior to the values being ingested into Drupal." + }, + "node_post_create": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of absolute paths to one or more scripts that execute after a node is created." + }, + "node_post_update": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of absolute paths to one or more scripts that execute after a node is updated." + }, + "media_post_create": { + "type": "array", + "items": { + "type": "string" + }, + "description": "List of absolute paths to one or more scripts that execute after a media is created." + }, + "path_to_python": { + "type": "string", + "description": "Used in create tasks that also use the secondary_tasks option. Tells Workbench the path to the python interpreter." + }, + "path_to_workbench_script": { + "type": "string", + "description": "Used in create tasks that also use the secondary_tasks option. Tells Workbench the path to the python interpreter." + }, + "contact_sheet_output_dir": { + "type": "string", + "description": "Used in create tasks to specify the name of the directory where contact sheet output is written. Can be relative (to the Workbench directory) or absolute." + }, + "contact_sheet_css_path": { + "type": "string", + "description": "Used in create tasks to specify the path of the CSS stylesheet to use in contact sheets. Can be relative (to the Workbench directory) or absolute.", + "default": "assets/contact_sheet/contact-sheet.css" + } + } + } + } + } +} \ No newline at end of file diff --git a/mkdocs.yml b/mkdocs.yml index af4bc159..aed4780f 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -55,3 +55,6 @@ markdown_extensions: extra_css: - css/extra.css edit_uri: 'edit/main/docs/' +plugins: + - search + - render_swagger diff --git a/openapi.yml b/openapi.yml new file mode 100644 index 00000000..d95c0249 --- /dev/null +++ b/openapi.yml @@ -0,0 +1,496 @@ +openapi: "3.0.0" +info: + title: Islandora Workbench Config Schema + version: 0.0.1 +paths: + /api/config/validate: + post: + requestBody: + required: true + content: + application/yaml: + schema: + $ref: '#/components/schemas/CombinedSchema' + responses: + '200': + description: Task executed successfully + '400': + description: Bad request, check request parameters +components: + schemas: + CombinedSchema: + allOf: + - $ref: '#/components/schemas/Base' + - $ref: '#/components/schemas/DrupalSettings' + - $ref: '#/components/schemas/InputDataLocationSettings' + - $ref: '#/components/schemas/InputCSVFileSettings' + - $ref: '#/components/schemas/OutputCSVSettings' + - $ref: '#/components/schemas/MediaSettings' + - $ref: '#/components/schemas/IslandoraModelSettings' + - $ref: '#/components/schemas/PagedAndCompoundContentSettings' + - $ref: '#/components/schemas/LoggingSettings' + - $ref: '#/components/schemas/HttpSettings' + - $ref: '#/components/schemas/MiscellaneousSettings' + Base: + type: object + properties: + task: + type: string + enum: + - create + - create_from_files + - update + - delete + - add_media + - delete_media + - update_media + - export_csv + - get_data_from_view + - create_terms + - delete_media_by_node + description: >- + One of 'create', 'create_from_files', 'update', delete', 'add_media', 'delete_media', 'update_media', 'export_csv', 'get_data_from_view', 'create_terms', or 'delete_media_by_node'. See "[Choosing a task](/islandora_workbench_docs/choosing_a_task/)" for more information. + host: + type: string + format: uri + description: "The hostname, including \\`http://\\` or \\`https://\\` of your Islandora repository, and port number if not the default 80. " + username: + type: string + description: "The username used to authenticate the requests. This Drupal user should be a member of the \"Administrator\" role. If you want to create nodes that are owned by a specific Drupal user, include their numeric user ID in the \\`uid\\` column in your CSV. " + password: + type: string + description: >- + The user's password. You can also set the password in your \`ISLANDORA_WORKBENCH_PASSWORD\` environment variable. If you do this, omit the \`password\` option in your configuration file. If a password is not available in either your configuration file or in the environment variable, Workbench will prompt for a password. + required: + - task + - host + - username + - password + DrupalSettings: + type: object + properties: + content_type: + type: string + description: 'The machine name of the Drupal node content type you are creating or updating. Required in "create" and "update" tasks. ' + drupal_filesystem: + type: string + description: 'One of ''fedora://'', ''public://'', or ''private://'' (the wrapping quotation marks are required). Only used with Drupal 8.x - 9.1; starting with Drupal 9.2, the filesystem is automatically detected from the media''s configuration. Will eventually be deprecated. ' + allow_adding_terms: + type: boolean + description: 'In \`create\` and \`update\` tasks, determines if Workbench will add taxonomy terms if they do not exist in the target vocabulary. See more information in the "[Taxonomy reference fields](/islandora_workbench_docs/fields/#field-types)" section. Note: this setting is not required in \`create_terms\` tasks. ' + vocab_id: + type: string + description: 'Identifies the vocabulary you are adding terms to in \`create_tersm\` tasks. See more information in the "[Creating taxonomy terms](/islandora_workbench_docs/creating_taxonomy_terms)" section. ' + update_mode: + type: string + description: 'Determines if Workbench will \`replace\`, \`append\` (add to) , or \`delete\` field values during \`update\` tasks. See more information in the "[Updating nodes](/islandora_workbench_docs/updating_nodes)" section. ' + validate_terms_exist: + type: boolean + description: 'If set to false, during \`--check\` Workbench will not query Drupal to determine if taxonomy terms exist. The structure of term values in CSV are still validated; this option only tells Workbench to not check for each term''s existence in the target Drupal. Useful to speed up the \`--check\` process if you know terms don''t exist in the target Drupal. ' + validate_parent_node_exists: + type: boolean + description: 'If set to false, during \`--check\` Workbench will not query Drupal to determine if nodes whose node IDs are in \`field_member_of\` exist. Useful to speed up the \`--check\` process if you know terms already exist in the target Drupal. ' + max_node_title_length: + type: integer + description: 'Set to the number of allowed characters for node titles if your Drupal uses [Node Title Length](https://www.drupal.org/project/title_length). If unsure what your the maximum length of the node titles your site allows, check the length of the "title" column in your Drupal database''s "node_field_data" table. ' + list_missing_drupal_fields: + type: boolean + description: Set to \`true\` to tell Workbench to provide a list of fields that exist in your input CSV but that cannot be matched to Drupal field names (or reserved column names such as "file"). If \`false\`, Workbench will still check for CSV column headers that it can't match to Drupal fields, but will exit upon finding the first such field. This option produces a list of fields instead of exiting on detecting the first field. + standalone_media_url: + type: boolean + description: 'Set to \`true\` if your Drupal instance has the "Standalone media URL" option at \`/admin/config/media/media-settings\` checked. The Drupal default is to have this unchecked, so you only need to use this Workbench option if you have changed Drupal''s default. [More information](/islandora_workbench_docs/installation/#configuring-drupals-media-urls) is available. ' + require_entity_reference_views: + type: boolean + description: 'Set to \`false\` to tell Workbench to not require a View to expose the values in an entity reference field configured to use an Entity Reference View. Additional information is available [here](/islandora_workbench_docs/fields/#entity-reference-views-fields). ' + text_format_id: + type: string + description: 'The text format ID (machine name) to apply to all Drupal text fields that have a "formatted" field type. Use \`text_format_ids\` (plural) to provide a text format ID for a specific Drupal field. See "[Text fields with markup](/islandora_workbench_docs/fields/#text-fields-with-markup)" for more information. ' + InputDataLocationSettings: + type: object + properties: + input_dir: + type: string + description: 'The full or relative path to the directory containing the files and metadata CSV file. ' + default: input_data + input_csv: + type: string + description: 'Path to the CSV metadata file. Can be absolute, or if just the filename is provided, will be assumed to be in the directory named in \`input_dir\`. Can also be the URL to a Google spreadsheet (see the "[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)" section for more information). ' + default: metadata.csv + google_sheets_csv_filename: + type: string + description: 'Local CSV filename for data from a Google spreadsheet. See the "[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)" section for more information. ' + google_sheets_gid: + type: integer + description: 'The "gid" of the worksheet to use in a Google Sheet. See "[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)" section for more information. ' + default: 0 + excel_worksheet: + type: string + description: 'If using an Excel file as your input CSV file, the name of the worksheet that the CSV data will be extracted from. ' + default: Sheet1 + required: + - input_dir + - input_csv + InputCSVFileSettings: + type: object + properties: + id_field: + type: string + description: 'The name of the field in the CSV that uniquely identifies each record. ' + default: id + delimiter: + type: string + description: 'The delimiter used in the CSV file, for example, "," or "\t" (must use double quotes with "\t"). If omitted, defaults to ",". ' + default: "," + subdelimiter: + type: string + description: 'The subdelimiter used in the CSV file to define multiple values in one field. If omitted, defaults to "|". Can be a string of multiple characters, e.g. "^^^". ' + default: "|" + csv_field_templates: + type: object + description: Used in the \`create\` and \`update\` tasks only. A list of Drupal field machine names and corresponding values that are copied into the CSV input file. More detail provided in the "[CSV field templates](/islandora_workbench_docs/field_templates/)" section. + additionalProperties: + type: string + csv_value_templates: + type: object + description: Used in the \`create\` and \`update\` tasks only. A list of Drupal field machine names and corresponding templates. More detail provided in the "[CSV value templates](/islandora_workbench_docs/csv_value_templates/)" section. + ignore_csv_columns: + type: array + items: + type: string + description: 'Used in the \`create\` and \`update\` tasks only. A list of CSV column headers that Workbench should ignore. For example, \`ignore_csv_columns: [Target Collection, Ready to publish]\`' + csv_start_row: + type: integer + description: 'Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) before the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available. ' + csv_stop_row: + type: integer + description: Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) after the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available. + csv_headers: + type: string + enum: + - names + - labels + description: 'Used in "create", "update" and "create_terms" tasks. Set to "labels" to allow use of field labels (as opposed to machine names) as CSV column headers. ' + default: names + clean_csv_values_skip: + type: array + items: + type: string + description: 'Used in all tasks that use CSV input files. See "[How Workbench cleans your input data](/islandora_workbench_docs/preparing_data/#how-workbench-cleans-your-input-data)" for more information. ' + required: + - id_field + OutputCSVSettings: + type: object + description: See "[Generating CSV files](generating_csv_files/)" section for more information. + properties: + output_csv: + type: string + description: 'The full or relative (to the "workbench" script) path to a CSV file with one record per node created by Workbench. ' + output_csv_include_input_csv: + type: boolean + description: 'Include in the output CSV all the fields (and their values) from the input CSV. ' + default: false + export_csv_term_mode: + type: string + enum: + - tid + - name + description: 'Used in "export_csv" tasks to indicate whether vocabulary term IDs or names are included in the output CSV file. Set to "tid" (the default) to include term IDs, or set to "name" to include term names. See "[Exporting field data into a CSV file](/islandora_workbench_docs/generating_csv_files/#exporting-field-data-into-a-csv-file)" for more information. ' + export_csv_field_list: + type: array + items: + type: string + description: 'List of fields to include in exported CSV data. If empty, all fields will be included. See "[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)" for more information. ' + view_parameters: + type: array + items: + type: string + description: 'List of URL parameter/value strings to include in requests to a View. See "[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)" for more information. ' + export_csv_file_path: + type: string + description: 'Used in the "export_csv" and "get_data_from_view" tasks. The path to the exported CSV file. Required in the "get_data_from_view" task; in the "export_csv" task, if left empty (the default), the file will be named after the value of the \`input_csv\` with ".csv_file_with_field_values" appended and saved in the directory identified in \`input_dir\`. ' + export_file_directory: + type: string + description: 'Used in the "export_csv" and "get_data_from_view" tasks. The path to the directory where files corresponding to the data in the CSV output file will be written. ' + export_file_media_use_term_id: + type: string + description: 'Used in the "export_csv" and "get_data_from_view" tasks. The term ID or URI from the Islandora Media Use vocabulary that identifies the file you want to export. ' + required: + - export_csv_file_path + MediaSettings: + type: object + properties: + nodes_only: + type: boolean + description: 'Include this option in \`create\` tasks, set to \`true\`, if you want to only create nodes and not their accompanying media. See the "Creating nodes but not media" section for more information. ' + default: false + allow_missing_files: + type: boolean + description: 'Determines if empty \`file\` values are allowed. Used in the \`create\` and \`add_media\` tasks. If set to true, empty \`file\` values are allowed. For \`create\` tasks, a \`true\` value will result in nodes without attached media. For \`add_media\` tasks, a \`true\` value will skip adding a media for the empty \`file\` CSV value. Defaults to false (which means all file values must contain the name of a file that exists in the \`input_data\` directory). ' + strict_check: + type: boolean + description: 'Replaced with \`perform_soft_checks\` as of commit dfa60ff (July 14, 2023). ' + perform_soft_checks: + type: boolean + description: Use soft checks for validation during processing. + media_use_tid: + type: string + description: 'The term ID for the term from the "Islandora Media Use" vocabulary you want to apply to the media being created in \`create\` and \`add_media\` tasks. You can provide a term URI instead of a term ID, for example \`"http://pcdm.org/use#OriginalFile"\`. You can specify multiple values for this setting by joining them with the subdelimiter configured in the \`subdelimiter\` setting; for example, \`media_use_tid: 17' + media_type: + type: string + description: 'Overrides, for all media being created, Workbench''s default definition of whether the media being created is an image, file, document, audio, or video. Used in the \`create\`, \`add_media\`, and \`create_from_files\` tasks. More detail provided in the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. ' + media_types_override: + type: object + description: 'Overrides default media type definitions on a per file extension basis. Used in the \`create\`, \`add_media\`, and \`create_from_files\` tasks. More detail provided in the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. ' + media_type_file_fields: + type: string + description: 'Defines the name of the media field that references media''s file (i.e., the field on the Media type). Usually used with custom media types and accompanied by either the \`media_type\` or \`media_types_override\` option. For more information, see the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. ' + mimetype_extensions: + type: object + description: 'Overrides Workbench''s default mappings between MIME types and file extensions. Usually used with remote files where the remote web server returns a MIME type that is not standard. For more information, see the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. ' + delete_media_with_nodes: + type: boolean + description: 'When a node is deleted using a \`delete\` task, by default, all if its media are automatically deleted. Set this option to false to not delete all of a node''s media (you do not generally want to keep the media without the node). ' + use_node_title_for_media_title: + type: boolean + description: 'If set to \`true\` (default), name media the same as the parent node''s title value. Truncates the value of the field to 255 characters. Applies to both \`create\` and \`add_media\` tasks. ' + use_nid_in_media_title: + type: boolean + description: 'If set to \`true\`, assigns a name to the media following the pattern \`{node_id}-Original File\`. Set to true to use the parent node''s node ID as the media title. Applies to both \`create\` and \`add_media\` tasks. ' + field_for_media_title: + type: string + description: 'Identifies a CSV field name (machine name, not human readable) that will be used as the media title in create tasks. For example, \`field_for_media_title: id\`. Truncates the value of the field to 255 characters. Applies to both \`create\` and \`add_media\` tasks.' + use_node_title_for_remote_filename: + type: boolean + description: 'Set to true to use a version of the parent node''s title as the filename for a remote (http[s]) file. Replaces all non-alphanumeric characters with an underscore (\`_\`). Truncates the value of the field to 255 characters. Applies to both \`create\` and \`add_media\` tasks. Note: this setting replaces (the previously undocumented) \`use_nid_in_media_filename\` setting.' + field_for_remote_filename: + type: string + description: 'Identifies a CSV field name (machine name, not human readable) that will be used as the filename for a remote (http[s]) file. For example, \`field_for_remote_filename: id\`. Truncates the value of the field to 255 characters. If the field is empty in the CSV, the CSV ID field value will be used. Applies to both \`create\` and \`add_media\` tasks. Note: this setting replaces (the previously undocumented) \`field_for_media_filename\` setting.' + delete_tmp_upload: + type: boolean + description: 'For remote files, if set to \`true\`, the temporary copy of the remote file is deleted after it is used to create media. If \`false\`, the copy will remain in the location defined in your \`temp_dir\` setting. If the file cannot be deleted (e.g. a virus scanner is scanning it), it will remain and an error message will be added to the log file. ' + additional_files: + type: object + description: 'Maps a set of CSV field names to media use terms IDs to create additional media (additional to the media created from the file named in the "file" column, that is) in \`create\` and \`add_media\` tasks. See "[Adding multiple media](/islandora_workbench_docs/adding_multiple_media)" for more information. ' + fixity_algorithm: + type: string + enum: + - md5 + - sha1 + - sha256 + description: 'Checksum/hash algorithm to use during transmission fixity checking. Must be one of "md5", "sha1", or "sha256". See "[Fixity checking](/islandora_workbench_docs/fixity)" for more information. ' + validate_fixity_during_check: + type: boolean + description: 'Perform checksum validation during \`--check\`. See "[Fixity checking](/islandora_workbench_docs/fixity)" for more information. ' + delete_media_by_node_media_use_tids: + type: array + items: + type: string + description: During \`delete_media_by_node\` tasks, allows you to specify which media to delete. Only media with the listed terms IDs from the Islandora Media Use vocabulary will be deleted. By default (an empty list), all media are deleted. See "[Deleting Media](/islandora_workbench_docs/deleting_media)" for more information. + exit_on_first_missing_file_during_check: + description: 'Removed as a configuration setting November 1, 2022. Use \`strict_check\` instead. ' + IslandoraModelSettings: + type: object + properties: + model: + type: string + description: 'Used in the \`create_from_files\` task only. Defines the term ID from the the "Islandora Models" vocabulary for all nodes created using this task. Note: one of \`model\` or \`models\` is required. More detail provided in the "[Creating nodes from files](/islandora_workbench_docs/creating_nodes_from_files/)" section.' + models: + type: object + description: 'Used in the \`create_from_files\` task only. Provides a mapping between file extensions and terms in the "Islandora Models" vocabulary. Note: one of \`model\` or \`models\` is required. More detail provided in the [Creating nodes from files](/islandora_workbench_docs/creating_nodes_from_files/)" section.' + PagedAndCompoundContentSettings: + type: object + description: See the section "[Creating paged content](paged_and_compound/)" for more information. + properties: + paged_content_from_directories: + type: boolean + description: 'Set to true if you are using the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method of creating paged content. ' + paged_content_sequence_separator: + type: string + description: 'The character used to separate the page sequence number from the rest of the filename. Used when creating paged content with the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method. Note: this configuration option was originally misspelled "paged_content_sequence_seprator". ' + default: "-" + paged_content_page_model_tid: + type: string + description: 'Required if \`paged_content_from_directories\` is true. The the term ID from the Islandora Models (or its URI) taxonomy to assign to pages. ' + paged_content_page_display_hints: + type: string + description: 'The term ID from the Islandora Display taxonomy to assign to pages. If not included, defaults to the value of the \`field_display_hints\` in the parent''s record in the CSV file. ' + paged_content_page_content_type: + type: string + description: 'Set to the machine name of the Drupal node content type for pages created using the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method if it is different than the content type of the parent (which is specified in the content_type setting). ' + page_title_template: + type: string + description: 'Template used to generate the titles of pages/members in the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method. ' + default: '$parent_title, page $weight' + secondary_tasks: + type: array + items: + type: string + description: 'A list of configuration file names that are executed as secondary tasks after the primary task to create compound objects. See "[Using a secondary task](/islandora_workbench_docs/paged_and_compound/#using-a-secondary-task)" for more information. ' + csv_id_to_node_id_map_path: + type: string + description: 'Name of the SQLite database filename used to store CSV row ID to node ID mappings for nodes created during \`create\` and \`create_from_files\` tasks. If you want to store your map database outside of a temporary directory, use an absolute path to the database file for this setting. If you want to disable population of this database, set this config setting to \`false\`. See "[Generating CSV files](/islandora_workbench_docs/generating_csv_files/#using-the-csv-id-to-node-id-map)" for more information. ' + default: "[temp_dir]/csv_id_to_node_id_map.db" + query_csv_id_to_node_id_map_for_parents: + type: boolean + description: "Queries the CSV ID to node ID map when creating compound content. Set to \\`true\\` if you want to use parent IDs from previous Workbench sessions. Note: this setting is automatically set to true in secondary task config files. See \"[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\" " + ignore_duplicate_parent_ids: + type: boolean + description: 'Tells Workbench to ignore entries in the CSV ID to node ID map that have the same parent ID value. Set to \`false\` if you want Workbench to warn you that there are duplicate parent IDs in your CSV ID to node ID map. See "[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information." ' + default: true + LoggingSettings: + type: object + description: See the "[Logging](logging/)" section for more information. + properties: + log_file_path: + type: string + description: 'The path to the log file, absolute or relative to the directory Workbench is run from. ' + default: workbench.log + log_file_mode: + type: string + enum: + - a + - w + description: 'Set to "w" to overwrite the log file, if it exists. ' + default: a + log_request_url: + type: boolean + description: 'Whether or not to log the request URL (and its method). Useful for debugging. ' + default: false + log_json: + type: boolean + description: 'Whether or not to log the raw request JSON POSTed, PUT, or PATCHed to Drupal. Useful for debugging. ' + default: false + log_headers: + type: boolean + description: 'Whether or not to log the raw HTTP headers used in all requests. Useful for debugging. ' + default: false + log_response_status_code: + type: boolean + description: 'Whether or not to log the HTTP response code. Useful for debugging. ' + default: false + log_response_time: + type: boolean + description: 'Whether or not to log the response time of each request that is slower than the average response time for the last 20 HTTP requests Workbench makes to the Drupal server. Useful for debugging. ' + default: false + log_response_body: + type: boolean + description: 'Whether or not to log the raw HTTP response body. Useful for debugging. ' + default: false + log_term_creation: + type: boolean + description: 'Whether or not to log the creation of new terms during "create" and "update" tasks (does not apply to the "create_terms" task). \`--check\` will still report that terms in the CSV do not exist in their respective vocabularies. ' + default: true + allow_redirects: + description: 'Whether or not to allow Islandora Workbench to respond to HTTP redirects. ' + secure_ssl_only: + description: 'Whether or not to require valid SSL certificates. Set to \`false\` if you want to ignore SSL certificates. ' + enable_http_cache: + description: 'Whether or not to enable Workbench''s client-side request cache. Set to \`false\` if you want to disable the cache during troubleshooting, etc. ' + http_cache_storage: + description: 'The backend storage type for the client-side cache. Set to \`sqlite\` if you are getting out of memory errors while running Islandora Workbench. ' + http_cache_storage_expire_after: + description: 'Length of the client-side cache lifespan (in seconds). Reduce this number if you are using the \`sqlite\` storage backend and the database is using too much disk space. Note that reducing the cache lifespan will result in increased load on your Drupal server. ' + HttpSettings: + type: object + properties: + user_agent: + type: string + description: 'String to use as the User-Agent header in HTTP requests. ' + default: Islandora Workbench + allow_redirects: + type: boolean + description: Whether or not to allow Islandora Workbench to respond to HTTP redirects. + default: true + secure_ssl_only: + type: boolean + description: Whether or not to require valid SSL certificates. Set to false if you want to ignore SSL certificates. + default: true + enable_http_cache: + type: boolean + description: Whether or not to enable Workbench's client-side request cache. Set to false if you want to disable the cache during troubleshooting, etc. + default: true + http_cache_storage: + type: string + description: The backend storage type for the client-side cache. Set to sqlite if you are getting out of memory errors while running Islandora Workbench. + default: memory + http_cache_storage_expire_after: + type: integer + description: Length of the client-side cache lifespan (in seconds). Reduce this number if you are using the sqlite storage backend and the database is using too much disk space. Note that reducing the cache lifespan will result in increased load on your Drupal server. + default: 1200 + MiscellaneousSettings: + type: object + properties: + perform_soft_checks: + type: boolean + description: "If set to true, \\`--check\\` will not exit when it encounters an error with parent/child order, file extension registration with Drupal media file fields, or EDTF validation. Instead, it will log any errors it encounters and exit after it has checked all rows in the CSV input file. Note: this setting replaces \\`strict_check\\`. " + default: false + temp_dir: + type: string + description: 'Relative or absolute path to the directory where you want Workbench''s temporary files to be written. These include the ".preprocessed" version of the your input CSV, remote files temporarily downloaded to create media, and the CSV ID to node ID map database. ' + sqlite_db_filename: + type: string + description: 'Name of the SQLite database filename used to store session data. ' + default: "[temp_dir]/workbench_temp_data.db" + rollback_dir: + type: string + description: 'Absolute path to the directory where you want your "rollback.csv" file to be written. See "[Rolling back](/islandora_workbench_docs/rolling_back/)" for more information. ' + timestamp_rollback: + type: boolean + description: 'Set to \`true\` to add a timestamp to the "rollback.yml" and corresponding "rollback.csv" generated in "create" and "create_from_files" tasks. See "[Rolling back](/islandora_workbench_docs/rolling_back/)" for more information. ' + pause: + type: number + description: 'Defines the number of seconds to pause between all ''POST'', ''PUT'', ''PATCH'', ''DELETE'' requests to Drupal. Include it in your configuration to lessen the impact of Islandora Workbench on your site during large jobs, for example pause: 1.5. More information is available in the "[Reducing Workbench''s impact on Drupal](/islandora_workbench_docs/reducing_load/)" documentation. ' + adaptive_pause: + type: number + description: 'Defines the number of seconds to pause between each REST request to Drupal. Works like "pause" but only takes effect when the Drupal server''s response to the most recent request is slower (determined by the "adaptive_pause_threshold" value) than the average response time for the last 20 requests. More information is available in the "[Reducing Workbench''s impact on Drupal](/islandora_workbench_docs/reducing_load/)" documentation. ' + adaptive_pause_threshold: + type: number + description: A weighting of the response time for the most recent request, relative to the average response times of the last 20 requests. This weighting determines how much slower the Drupal server's response to the most recent Workbench request must be in order for adaptive pausing to take effect for the next request. + default: 2 + progress_bar: + type: boolean + description: Show a progress bar when running Workbench instead of row-by-row output. + default: false + bootstrap: + type: array + items: + type: string + description: List of absolute paths to one or more scripts that execute prior to Workbench connecting to Drupal. + shutdown: + type: array + items: + type: string + description: List of absolute paths to one or more scripts that execute after Workbench connecting to Drupal. + preprocessors: + type: array + items: + type: string + description: List of absolute paths to one or more scripts that are applied to CSV values prior to the values being ingested into Drupal. + node_post_create: + type: array + items: + type: string + description: List of absolute paths to one or more scripts that execute after a node is created. + node_post_update: + type: array + items: + type: string + description: List of absolute paths to one or more scripts that execute after a node is updated. + media_post_create: + type: array + items: + type: string + description: List of absolute paths to one or more scripts that execute after a media is created. + path_to_python: + type: string + description: Used in create tasks that also use the secondary_tasks option. Tells Workbench the path to the python interpreter. + path_to_workbench_script: + type: string + description: Used in create tasks that also use the secondary_tasks option. Tells Workbench the path to the python interpreter. + contact_sheet_output_dir: + type: string + description: Used in create tasks to specify the name of the directory where contact sheet output is written. Can be relative (to the Workbench directory) or absolute. + contact_sheet_css_path: + type: string + description: Used in create tasks to specify the path of the CSS stylesheet to use in contact sheets. Can be relative (to the Workbench directory) or absolute. + default: assets/contact_sheet/contact-sheet.css From 4aba1c12ec0c24b5c0942b4e0a82d6ea2ebc2bca Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Mon, 20 Nov 2023 15:22:12 -0500 Subject: [PATCH 02/16] Hide everything on open api except the schema --- docs/css/extra.css | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/css/extra.css b/docs/css/extra.css index 7dcd68d5..39b52b25 100644 --- a/docs/css/extra.css +++ b/docs/css/extra.css @@ -5,3 +5,13 @@ code.yaml { white-space: pre-wrap; word-break: keep-all; } + +/** Only display OpenAPI schema */ +.swagger-ui section { + display: none !important; +} +.swagger-ui section:has(> section.models), +.swagger-ui section.models +{ + display: block !important; +} From f27e3b9e086aee7c33c0afac5db7069413f3bc4e Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Mon, 20 Nov 2023 15:24:24 -0500 Subject: [PATCH 03/16] Expand all schemas by default --- docs/javascripts/extra.js | 7 +++++++ mkdocs.yml | 2 ++ 2 files changed, 9 insertions(+) create mode 100644 docs/javascripts/extra.js diff --git a/docs/javascripts/extra.js b/docs/javascripts/extra.js new file mode 100644 index 00000000..72613dc1 --- /dev/null +++ b/docs/javascripts/extra.js @@ -0,0 +1,7 @@ +(() => { + const i = setInterval(() => { + [...document.querySelectorAll('[aria-expanded="false"]')].map((el) => + el.click() + ).length || clearInterval(i); + }, 1000); +})(); diff --git a/mkdocs.yml b/mkdocs.yml index aed4780f..6ff05881 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -54,6 +54,8 @@ markdown_extensions: - admonition extra_css: - css/extra.css +extra_javascript: + - javascripts/extra.js edit_uri: 'edit/main/docs/' plugins: - search From 05256a484505eeb1fd434e43349a730f1cb827c1 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Mon, 20 Nov 2023 15:24:34 -0500 Subject: [PATCH 04/16] Remove combined schema --- docs/openapi.json | 42 +++--------------------------------------- openapi.yml | 17 ++--------------- 2 files changed, 5 insertions(+), 54 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index 15199db8..e87a5462 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -1,5 +1,6 @@ { "openapi": "3.0.0", + "docExpansion": "full", "info": { "title": "Islandora Workbench Config Schema", "version": "0.0.1" @@ -12,7 +13,7 @@ "content": { "application/yaml": { "schema": { - "$ref": "#/components/schemas/CombinedSchema" + "$ref": "#/components/schemas/Required" } } } @@ -30,44 +31,7 @@ }, "components": { "schemas": { - "CombinedSchema": { - "allOf": [ - { - "$ref": "#/components/schemas/Base" - }, - { - "$ref": "#/components/schemas/DrupalSettings" - }, - { - "$ref": "#/components/schemas/InputDataLocationSettings" - }, - { - "$ref": "#/components/schemas/InputCSVFileSettings" - }, - { - "$ref": "#/components/schemas/OutputCSVSettings" - }, - { - "$ref": "#/components/schemas/MediaSettings" - }, - { - "$ref": "#/components/schemas/IslandoraModelSettings" - }, - { - "$ref": "#/components/schemas/PagedAndCompoundContentSettings" - }, - { - "$ref": "#/components/schemas/LoggingSettings" - }, - { - "$ref": "#/components/schemas/HttpSettings" - }, - { - "$ref": "#/components/schemas/MiscellaneousSettings" - } - ] - }, - "Base": { + "Required": { "type": "object", "properties": { "task": { diff --git a/openapi.yml b/openapi.yml index d95c0249..aa1c0aa8 100644 --- a/openapi.yml +++ b/openapi.yml @@ -10,7 +10,7 @@ paths: content: application/yaml: schema: - $ref: '#/components/schemas/CombinedSchema' + $ref: '#/components/schemas/Required' responses: '200': description: Task executed successfully @@ -18,20 +18,7 @@ paths: description: Bad request, check request parameters components: schemas: - CombinedSchema: - allOf: - - $ref: '#/components/schemas/Base' - - $ref: '#/components/schemas/DrupalSettings' - - $ref: '#/components/schemas/InputDataLocationSettings' - - $ref: '#/components/schemas/InputCSVFileSettings' - - $ref: '#/components/schemas/OutputCSVSettings' - - $ref: '#/components/schemas/MediaSettings' - - $ref: '#/components/schemas/IslandoraModelSettings' - - $ref: '#/components/schemas/PagedAndCompoundContentSettings' - - $ref: '#/components/schemas/LoggingSettings' - - $ref: '#/components/schemas/HttpSettings' - - $ref: '#/components/schemas/MiscellaneousSettings' - Base: + Required: type: object properties: task: From b38eaf6394d43aca714e66283cac24a708be8838 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Mon, 20 Nov 2023 15:30:33 -0500 Subject: [PATCH 05/16] rm --- openapi.yml | 483 ---------------------------------------------------- 1 file changed, 483 deletions(-) delete mode 100644 openapi.yml diff --git a/openapi.yml b/openapi.yml deleted file mode 100644 index aa1c0aa8..00000000 --- a/openapi.yml +++ /dev/null @@ -1,483 +0,0 @@ -openapi: "3.0.0" -info: - title: Islandora Workbench Config Schema - version: 0.0.1 -paths: - /api/config/validate: - post: - requestBody: - required: true - content: - application/yaml: - schema: - $ref: '#/components/schemas/Required' - responses: - '200': - description: Task executed successfully - '400': - description: Bad request, check request parameters -components: - schemas: - Required: - type: object - properties: - task: - type: string - enum: - - create - - create_from_files - - update - - delete - - add_media - - delete_media - - update_media - - export_csv - - get_data_from_view - - create_terms - - delete_media_by_node - description: >- - One of 'create', 'create_from_files', 'update', delete', 'add_media', 'delete_media', 'update_media', 'export_csv', 'get_data_from_view', 'create_terms', or 'delete_media_by_node'. See "[Choosing a task](/islandora_workbench_docs/choosing_a_task/)" for more information. - host: - type: string - format: uri - description: "The hostname, including \\`http://\\` or \\`https://\\` of your Islandora repository, and port number if not the default 80. " - username: - type: string - description: "The username used to authenticate the requests. This Drupal user should be a member of the \"Administrator\" role. If you want to create nodes that are owned by a specific Drupal user, include their numeric user ID in the \\`uid\\` column in your CSV. " - password: - type: string - description: >- - The user's password. You can also set the password in your \`ISLANDORA_WORKBENCH_PASSWORD\` environment variable. If you do this, omit the \`password\` option in your configuration file. If a password is not available in either your configuration file or in the environment variable, Workbench will prompt for a password. - required: - - task - - host - - username - - password - DrupalSettings: - type: object - properties: - content_type: - type: string - description: 'The machine name of the Drupal node content type you are creating or updating. Required in "create" and "update" tasks. ' - drupal_filesystem: - type: string - description: 'One of ''fedora://'', ''public://'', or ''private://'' (the wrapping quotation marks are required). Only used with Drupal 8.x - 9.1; starting with Drupal 9.2, the filesystem is automatically detected from the media''s configuration. Will eventually be deprecated. ' - allow_adding_terms: - type: boolean - description: 'In \`create\` and \`update\` tasks, determines if Workbench will add taxonomy terms if they do not exist in the target vocabulary. See more information in the "[Taxonomy reference fields](/islandora_workbench_docs/fields/#field-types)" section. Note: this setting is not required in \`create_terms\` tasks. ' - vocab_id: - type: string - description: 'Identifies the vocabulary you are adding terms to in \`create_tersm\` tasks. See more information in the "[Creating taxonomy terms](/islandora_workbench_docs/creating_taxonomy_terms)" section. ' - update_mode: - type: string - description: 'Determines if Workbench will \`replace\`, \`append\` (add to) , or \`delete\` field values during \`update\` tasks. See more information in the "[Updating nodes](/islandora_workbench_docs/updating_nodes)" section. ' - validate_terms_exist: - type: boolean - description: 'If set to false, during \`--check\` Workbench will not query Drupal to determine if taxonomy terms exist. The structure of term values in CSV are still validated; this option only tells Workbench to not check for each term''s existence in the target Drupal. Useful to speed up the \`--check\` process if you know terms don''t exist in the target Drupal. ' - validate_parent_node_exists: - type: boolean - description: 'If set to false, during \`--check\` Workbench will not query Drupal to determine if nodes whose node IDs are in \`field_member_of\` exist. Useful to speed up the \`--check\` process if you know terms already exist in the target Drupal. ' - max_node_title_length: - type: integer - description: 'Set to the number of allowed characters for node titles if your Drupal uses [Node Title Length](https://www.drupal.org/project/title_length). If unsure what your the maximum length of the node titles your site allows, check the length of the "title" column in your Drupal database''s "node_field_data" table. ' - list_missing_drupal_fields: - type: boolean - description: Set to \`true\` to tell Workbench to provide a list of fields that exist in your input CSV but that cannot be matched to Drupal field names (or reserved column names such as "file"). If \`false\`, Workbench will still check for CSV column headers that it can't match to Drupal fields, but will exit upon finding the first such field. This option produces a list of fields instead of exiting on detecting the first field. - standalone_media_url: - type: boolean - description: 'Set to \`true\` if your Drupal instance has the "Standalone media URL" option at \`/admin/config/media/media-settings\` checked. The Drupal default is to have this unchecked, so you only need to use this Workbench option if you have changed Drupal''s default. [More information](/islandora_workbench_docs/installation/#configuring-drupals-media-urls) is available. ' - require_entity_reference_views: - type: boolean - description: 'Set to \`false\` to tell Workbench to not require a View to expose the values in an entity reference field configured to use an Entity Reference View. Additional information is available [here](/islandora_workbench_docs/fields/#entity-reference-views-fields). ' - text_format_id: - type: string - description: 'The text format ID (machine name) to apply to all Drupal text fields that have a "formatted" field type. Use \`text_format_ids\` (plural) to provide a text format ID for a specific Drupal field. See "[Text fields with markup](/islandora_workbench_docs/fields/#text-fields-with-markup)" for more information. ' - InputDataLocationSettings: - type: object - properties: - input_dir: - type: string - description: 'The full or relative path to the directory containing the files and metadata CSV file. ' - default: input_data - input_csv: - type: string - description: 'Path to the CSV metadata file. Can be absolute, or if just the filename is provided, will be assumed to be in the directory named in \`input_dir\`. Can also be the URL to a Google spreadsheet (see the "[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)" section for more information). ' - default: metadata.csv - google_sheets_csv_filename: - type: string - description: 'Local CSV filename for data from a Google spreadsheet. See the "[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)" section for more information. ' - google_sheets_gid: - type: integer - description: 'The "gid" of the worksheet to use in a Google Sheet. See "[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)" section for more information. ' - default: 0 - excel_worksheet: - type: string - description: 'If using an Excel file as your input CSV file, the name of the worksheet that the CSV data will be extracted from. ' - default: Sheet1 - required: - - input_dir - - input_csv - InputCSVFileSettings: - type: object - properties: - id_field: - type: string - description: 'The name of the field in the CSV that uniquely identifies each record. ' - default: id - delimiter: - type: string - description: 'The delimiter used in the CSV file, for example, "," or "\t" (must use double quotes with "\t"). If omitted, defaults to ",". ' - default: "," - subdelimiter: - type: string - description: 'The subdelimiter used in the CSV file to define multiple values in one field. If omitted, defaults to "|". Can be a string of multiple characters, e.g. "^^^". ' - default: "|" - csv_field_templates: - type: object - description: Used in the \`create\` and \`update\` tasks only. A list of Drupal field machine names and corresponding values that are copied into the CSV input file. More detail provided in the "[CSV field templates](/islandora_workbench_docs/field_templates/)" section. - additionalProperties: - type: string - csv_value_templates: - type: object - description: Used in the \`create\` and \`update\` tasks only. A list of Drupal field machine names and corresponding templates. More detail provided in the "[CSV value templates](/islandora_workbench_docs/csv_value_templates/)" section. - ignore_csv_columns: - type: array - items: - type: string - description: 'Used in the \`create\` and \`update\` tasks only. A list of CSV column headers that Workbench should ignore. For example, \`ignore_csv_columns: [Target Collection, Ready to publish]\`' - csv_start_row: - type: integer - description: 'Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) before the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available. ' - csv_stop_row: - type: integer - description: Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) after the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available. - csv_headers: - type: string - enum: - - names - - labels - description: 'Used in "create", "update" and "create_terms" tasks. Set to "labels" to allow use of field labels (as opposed to machine names) as CSV column headers. ' - default: names - clean_csv_values_skip: - type: array - items: - type: string - description: 'Used in all tasks that use CSV input files. See "[How Workbench cleans your input data](/islandora_workbench_docs/preparing_data/#how-workbench-cleans-your-input-data)" for more information. ' - required: - - id_field - OutputCSVSettings: - type: object - description: See "[Generating CSV files](generating_csv_files/)" section for more information. - properties: - output_csv: - type: string - description: 'The full or relative (to the "workbench" script) path to a CSV file with one record per node created by Workbench. ' - output_csv_include_input_csv: - type: boolean - description: 'Include in the output CSV all the fields (and their values) from the input CSV. ' - default: false - export_csv_term_mode: - type: string - enum: - - tid - - name - description: 'Used in "export_csv" tasks to indicate whether vocabulary term IDs or names are included in the output CSV file. Set to "tid" (the default) to include term IDs, or set to "name" to include term names. See "[Exporting field data into a CSV file](/islandora_workbench_docs/generating_csv_files/#exporting-field-data-into-a-csv-file)" for more information. ' - export_csv_field_list: - type: array - items: - type: string - description: 'List of fields to include in exported CSV data. If empty, all fields will be included. See "[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)" for more information. ' - view_parameters: - type: array - items: - type: string - description: 'List of URL parameter/value strings to include in requests to a View. See "[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)" for more information. ' - export_csv_file_path: - type: string - description: 'Used in the "export_csv" and "get_data_from_view" tasks. The path to the exported CSV file. Required in the "get_data_from_view" task; in the "export_csv" task, if left empty (the default), the file will be named after the value of the \`input_csv\` with ".csv_file_with_field_values" appended and saved in the directory identified in \`input_dir\`. ' - export_file_directory: - type: string - description: 'Used in the "export_csv" and "get_data_from_view" tasks. The path to the directory where files corresponding to the data in the CSV output file will be written. ' - export_file_media_use_term_id: - type: string - description: 'Used in the "export_csv" and "get_data_from_view" tasks. The term ID or URI from the Islandora Media Use vocabulary that identifies the file you want to export. ' - required: - - export_csv_file_path - MediaSettings: - type: object - properties: - nodes_only: - type: boolean - description: 'Include this option in \`create\` tasks, set to \`true\`, if you want to only create nodes and not their accompanying media. See the "Creating nodes but not media" section for more information. ' - default: false - allow_missing_files: - type: boolean - description: 'Determines if empty \`file\` values are allowed. Used in the \`create\` and \`add_media\` tasks. If set to true, empty \`file\` values are allowed. For \`create\` tasks, a \`true\` value will result in nodes without attached media. For \`add_media\` tasks, a \`true\` value will skip adding a media for the empty \`file\` CSV value. Defaults to false (which means all file values must contain the name of a file that exists in the \`input_data\` directory). ' - strict_check: - type: boolean - description: 'Replaced with \`perform_soft_checks\` as of commit dfa60ff (July 14, 2023). ' - perform_soft_checks: - type: boolean - description: Use soft checks for validation during processing. - media_use_tid: - type: string - description: 'The term ID for the term from the "Islandora Media Use" vocabulary you want to apply to the media being created in \`create\` and \`add_media\` tasks. You can provide a term URI instead of a term ID, for example \`"http://pcdm.org/use#OriginalFile"\`. You can specify multiple values for this setting by joining them with the subdelimiter configured in the \`subdelimiter\` setting; for example, \`media_use_tid: 17' - media_type: - type: string - description: 'Overrides, for all media being created, Workbench''s default definition of whether the media being created is an image, file, document, audio, or video. Used in the \`create\`, \`add_media\`, and \`create_from_files\` tasks. More detail provided in the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. ' - media_types_override: - type: object - description: 'Overrides default media type definitions on a per file extension basis. Used in the \`create\`, \`add_media\`, and \`create_from_files\` tasks. More detail provided in the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. ' - media_type_file_fields: - type: string - description: 'Defines the name of the media field that references media''s file (i.e., the field on the Media type). Usually used with custom media types and accompanied by either the \`media_type\` or \`media_types_override\` option. For more information, see the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. ' - mimetype_extensions: - type: object - description: 'Overrides Workbench''s default mappings between MIME types and file extensions. Usually used with remote files where the remote web server returns a MIME type that is not standard. For more information, see the "[Configuring Media Types](/islandora_workbench_docs/media_types)" section. ' - delete_media_with_nodes: - type: boolean - description: 'When a node is deleted using a \`delete\` task, by default, all if its media are automatically deleted. Set this option to false to not delete all of a node''s media (you do not generally want to keep the media without the node). ' - use_node_title_for_media_title: - type: boolean - description: 'If set to \`true\` (default), name media the same as the parent node''s title value. Truncates the value of the field to 255 characters. Applies to both \`create\` and \`add_media\` tasks. ' - use_nid_in_media_title: - type: boolean - description: 'If set to \`true\`, assigns a name to the media following the pattern \`{node_id}-Original File\`. Set to true to use the parent node''s node ID as the media title. Applies to both \`create\` and \`add_media\` tasks. ' - field_for_media_title: - type: string - description: 'Identifies a CSV field name (machine name, not human readable) that will be used as the media title in create tasks. For example, \`field_for_media_title: id\`. Truncates the value of the field to 255 characters. Applies to both \`create\` and \`add_media\` tasks.' - use_node_title_for_remote_filename: - type: boolean - description: 'Set to true to use a version of the parent node''s title as the filename for a remote (http[s]) file. Replaces all non-alphanumeric characters with an underscore (\`_\`). Truncates the value of the field to 255 characters. Applies to both \`create\` and \`add_media\` tasks. Note: this setting replaces (the previously undocumented) \`use_nid_in_media_filename\` setting.' - field_for_remote_filename: - type: string - description: 'Identifies a CSV field name (machine name, not human readable) that will be used as the filename for a remote (http[s]) file. For example, \`field_for_remote_filename: id\`. Truncates the value of the field to 255 characters. If the field is empty in the CSV, the CSV ID field value will be used. Applies to both \`create\` and \`add_media\` tasks. Note: this setting replaces (the previously undocumented) \`field_for_media_filename\` setting.' - delete_tmp_upload: - type: boolean - description: 'For remote files, if set to \`true\`, the temporary copy of the remote file is deleted after it is used to create media. If \`false\`, the copy will remain in the location defined in your \`temp_dir\` setting. If the file cannot be deleted (e.g. a virus scanner is scanning it), it will remain and an error message will be added to the log file. ' - additional_files: - type: object - description: 'Maps a set of CSV field names to media use terms IDs to create additional media (additional to the media created from the file named in the "file" column, that is) in \`create\` and \`add_media\` tasks. See "[Adding multiple media](/islandora_workbench_docs/adding_multiple_media)" for more information. ' - fixity_algorithm: - type: string - enum: - - md5 - - sha1 - - sha256 - description: 'Checksum/hash algorithm to use during transmission fixity checking. Must be one of "md5", "sha1", or "sha256". See "[Fixity checking](/islandora_workbench_docs/fixity)" for more information. ' - validate_fixity_during_check: - type: boolean - description: 'Perform checksum validation during \`--check\`. See "[Fixity checking](/islandora_workbench_docs/fixity)" for more information. ' - delete_media_by_node_media_use_tids: - type: array - items: - type: string - description: During \`delete_media_by_node\` tasks, allows you to specify which media to delete. Only media with the listed terms IDs from the Islandora Media Use vocabulary will be deleted. By default (an empty list), all media are deleted. See "[Deleting Media](/islandora_workbench_docs/deleting_media)" for more information. - exit_on_first_missing_file_during_check: - description: 'Removed as a configuration setting November 1, 2022. Use \`strict_check\` instead. ' - IslandoraModelSettings: - type: object - properties: - model: - type: string - description: 'Used in the \`create_from_files\` task only. Defines the term ID from the the "Islandora Models" vocabulary for all nodes created using this task. Note: one of \`model\` or \`models\` is required. More detail provided in the "[Creating nodes from files](/islandora_workbench_docs/creating_nodes_from_files/)" section.' - models: - type: object - description: 'Used in the \`create_from_files\` task only. Provides a mapping between file extensions and terms in the "Islandora Models" vocabulary. Note: one of \`model\` or \`models\` is required. More detail provided in the [Creating nodes from files](/islandora_workbench_docs/creating_nodes_from_files/)" section.' - PagedAndCompoundContentSettings: - type: object - description: See the section "[Creating paged content](paged_and_compound/)" for more information. - properties: - paged_content_from_directories: - type: boolean - description: 'Set to true if you are using the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method of creating paged content. ' - paged_content_sequence_separator: - type: string - description: 'The character used to separate the page sequence number from the rest of the filename. Used when creating paged content with the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method. Note: this configuration option was originally misspelled "paged_content_sequence_seprator". ' - default: "-" - paged_content_page_model_tid: - type: string - description: 'Required if \`paged_content_from_directories\` is true. The the term ID from the Islandora Models (or its URI) taxonomy to assign to pages. ' - paged_content_page_display_hints: - type: string - description: 'The term ID from the Islandora Display taxonomy to assign to pages. If not included, defaults to the value of the \`field_display_hints\` in the parent''s record in the CSV file. ' - paged_content_page_content_type: - type: string - description: 'Set to the machine name of the Drupal node content type for pages created using the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method if it is different than the content type of the parent (which is specified in the content_type setting). ' - page_title_template: - type: string - description: 'Template used to generate the titles of pages/members in the "[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)" method. ' - default: '$parent_title, page $weight' - secondary_tasks: - type: array - items: - type: string - description: 'A list of configuration file names that are executed as secondary tasks after the primary task to create compound objects. See "[Using a secondary task](/islandora_workbench_docs/paged_and_compound/#using-a-secondary-task)" for more information. ' - csv_id_to_node_id_map_path: - type: string - description: 'Name of the SQLite database filename used to store CSV row ID to node ID mappings for nodes created during \`create\` and \`create_from_files\` tasks. If you want to store your map database outside of a temporary directory, use an absolute path to the database file for this setting. If you want to disable population of this database, set this config setting to \`false\`. See "[Generating CSV files](/islandora_workbench_docs/generating_csv_files/#using-the-csv-id-to-node-id-map)" for more information. ' - default: "[temp_dir]/csv_id_to_node_id_map.db" - query_csv_id_to_node_id_map_for_parents: - type: boolean - description: "Queries the CSV ID to node ID map when creating compound content. Set to \\`true\\` if you want to use parent IDs from previous Workbench sessions. Note: this setting is automatically set to true in secondary task config files. See \"[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\" " - ignore_duplicate_parent_ids: - type: boolean - description: 'Tells Workbench to ignore entries in the CSV ID to node ID map that have the same parent ID value. Set to \`false\` if you want Workbench to warn you that there are duplicate parent IDs in your CSV ID to node ID map. See "[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information." ' - default: true - LoggingSettings: - type: object - description: See the "[Logging](logging/)" section for more information. - properties: - log_file_path: - type: string - description: 'The path to the log file, absolute or relative to the directory Workbench is run from. ' - default: workbench.log - log_file_mode: - type: string - enum: - - a - - w - description: 'Set to "w" to overwrite the log file, if it exists. ' - default: a - log_request_url: - type: boolean - description: 'Whether or not to log the request URL (and its method). Useful for debugging. ' - default: false - log_json: - type: boolean - description: 'Whether or not to log the raw request JSON POSTed, PUT, or PATCHed to Drupal. Useful for debugging. ' - default: false - log_headers: - type: boolean - description: 'Whether or not to log the raw HTTP headers used in all requests. Useful for debugging. ' - default: false - log_response_status_code: - type: boolean - description: 'Whether or not to log the HTTP response code. Useful for debugging. ' - default: false - log_response_time: - type: boolean - description: 'Whether or not to log the response time of each request that is slower than the average response time for the last 20 HTTP requests Workbench makes to the Drupal server. Useful for debugging. ' - default: false - log_response_body: - type: boolean - description: 'Whether or not to log the raw HTTP response body. Useful for debugging. ' - default: false - log_term_creation: - type: boolean - description: 'Whether or not to log the creation of new terms during "create" and "update" tasks (does not apply to the "create_terms" task). \`--check\` will still report that terms in the CSV do not exist in their respective vocabularies. ' - default: true - allow_redirects: - description: 'Whether or not to allow Islandora Workbench to respond to HTTP redirects. ' - secure_ssl_only: - description: 'Whether or not to require valid SSL certificates. Set to \`false\` if you want to ignore SSL certificates. ' - enable_http_cache: - description: 'Whether or not to enable Workbench''s client-side request cache. Set to \`false\` if you want to disable the cache during troubleshooting, etc. ' - http_cache_storage: - description: 'The backend storage type for the client-side cache. Set to \`sqlite\` if you are getting out of memory errors while running Islandora Workbench. ' - http_cache_storage_expire_after: - description: 'Length of the client-side cache lifespan (in seconds). Reduce this number if you are using the \`sqlite\` storage backend and the database is using too much disk space. Note that reducing the cache lifespan will result in increased load on your Drupal server. ' - HttpSettings: - type: object - properties: - user_agent: - type: string - description: 'String to use as the User-Agent header in HTTP requests. ' - default: Islandora Workbench - allow_redirects: - type: boolean - description: Whether or not to allow Islandora Workbench to respond to HTTP redirects. - default: true - secure_ssl_only: - type: boolean - description: Whether or not to require valid SSL certificates. Set to false if you want to ignore SSL certificates. - default: true - enable_http_cache: - type: boolean - description: Whether or not to enable Workbench's client-side request cache. Set to false if you want to disable the cache during troubleshooting, etc. - default: true - http_cache_storage: - type: string - description: The backend storage type for the client-side cache. Set to sqlite if you are getting out of memory errors while running Islandora Workbench. - default: memory - http_cache_storage_expire_after: - type: integer - description: Length of the client-side cache lifespan (in seconds). Reduce this number if you are using the sqlite storage backend and the database is using too much disk space. Note that reducing the cache lifespan will result in increased load on your Drupal server. - default: 1200 - MiscellaneousSettings: - type: object - properties: - perform_soft_checks: - type: boolean - description: "If set to true, \\`--check\\` will not exit when it encounters an error with parent/child order, file extension registration with Drupal media file fields, or EDTF validation. Instead, it will log any errors it encounters and exit after it has checked all rows in the CSV input file. Note: this setting replaces \\`strict_check\\`. " - default: false - temp_dir: - type: string - description: 'Relative or absolute path to the directory where you want Workbench''s temporary files to be written. These include the ".preprocessed" version of the your input CSV, remote files temporarily downloaded to create media, and the CSV ID to node ID map database. ' - sqlite_db_filename: - type: string - description: 'Name of the SQLite database filename used to store session data. ' - default: "[temp_dir]/workbench_temp_data.db" - rollback_dir: - type: string - description: 'Absolute path to the directory where you want your "rollback.csv" file to be written. See "[Rolling back](/islandora_workbench_docs/rolling_back/)" for more information. ' - timestamp_rollback: - type: boolean - description: 'Set to \`true\` to add a timestamp to the "rollback.yml" and corresponding "rollback.csv" generated in "create" and "create_from_files" tasks. See "[Rolling back](/islandora_workbench_docs/rolling_back/)" for more information. ' - pause: - type: number - description: 'Defines the number of seconds to pause between all ''POST'', ''PUT'', ''PATCH'', ''DELETE'' requests to Drupal. Include it in your configuration to lessen the impact of Islandora Workbench on your site during large jobs, for example pause: 1.5. More information is available in the "[Reducing Workbench''s impact on Drupal](/islandora_workbench_docs/reducing_load/)" documentation. ' - adaptive_pause: - type: number - description: 'Defines the number of seconds to pause between each REST request to Drupal. Works like "pause" but only takes effect when the Drupal server''s response to the most recent request is slower (determined by the "adaptive_pause_threshold" value) than the average response time for the last 20 requests. More information is available in the "[Reducing Workbench''s impact on Drupal](/islandora_workbench_docs/reducing_load/)" documentation. ' - adaptive_pause_threshold: - type: number - description: A weighting of the response time for the most recent request, relative to the average response times of the last 20 requests. This weighting determines how much slower the Drupal server's response to the most recent Workbench request must be in order for adaptive pausing to take effect for the next request. - default: 2 - progress_bar: - type: boolean - description: Show a progress bar when running Workbench instead of row-by-row output. - default: false - bootstrap: - type: array - items: - type: string - description: List of absolute paths to one or more scripts that execute prior to Workbench connecting to Drupal. - shutdown: - type: array - items: - type: string - description: List of absolute paths to one or more scripts that execute after Workbench connecting to Drupal. - preprocessors: - type: array - items: - type: string - description: List of absolute paths to one or more scripts that are applied to CSV values prior to the values being ingested into Drupal. - node_post_create: - type: array - items: - type: string - description: List of absolute paths to one or more scripts that execute after a node is created. - node_post_update: - type: array - items: - type: string - description: List of absolute paths to one or more scripts that execute after a node is updated. - media_post_create: - type: array - items: - type: string - description: List of absolute paths to one or more scripts that execute after a media is created. - path_to_python: - type: string - description: Used in create tasks that also use the secondary_tasks option. Tells Workbench the path to the python interpreter. - path_to_workbench_script: - type: string - description: Used in create tasks that also use the secondary_tasks option. Tells Workbench the path to the python interpreter. - contact_sheet_output_dir: - type: string - description: Used in create tasks to specify the name of the directory where contact sheet output is written. Can be relative (to the Workbench directory) or absolute. - contact_sheet_css_path: - type: string - description: Used in create tasks to specify the path of the CSS stylesheet to use in contact sheets. Can be relative (to the Workbench directory) or absolute. - default: assets/contact_sheet/contact-sheet.css From 803f0f42695a9b9373289f9c55ff7c047c2f45a2 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Mon, 20 Nov 2023 15:36:25 -0500 Subject: [PATCH 06/16] Update extra.js --- docs/javascripts/extra.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/javascripts/extra.js b/docs/javascripts/extra.js index 72613dc1..ddb36cd6 100644 --- a/docs/javascripts/extra.js +++ b/docs/javascripts/extra.js @@ -1,6 +1,7 @@ +// fully expand the open api schema (() => { const i = setInterval(() => { - [...document.querySelectorAll('[aria-expanded="false"]')].map((el) => + [...document.querySelectorAll('.swagger-ui [aria-expanded="false"]')].map((el) => el.click() ).length || clearInterval(i); }, 1000); From b62e31f2e90c6465736642615e37b8dae2a7b899 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Mon, 20 Nov 2023 16:04:58 -0500 Subject: [PATCH 07/16] Remove test variable from schema --- docs/openapi.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index e87a5462..cf728e2f 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -1,6 +1,5 @@ { "openapi": "3.0.0", - "docExpansion": "full", "info": { "title": "Islandora Workbench Config Schema", "version": "0.0.1" @@ -649,4 +648,4 @@ } } } -} \ No newline at end of file +} From 206c163edc90b332a11790f9f5a08ccf7a6a6433 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Tue, 21 Nov 2023 12:08:43 -0500 Subject: [PATCH 08/16] Password is not strictly required Password is not strictly required in the schema since there are other alternatives to supply it (stdin and env var) --- docs/openapi.json | 1 - 1 file changed, 1 deletion(-) diff --git a/docs/openapi.json b/docs/openapi.json index cf728e2f..4aff523f 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -68,7 +68,6 @@ "task", "host", "username", - "password" ] }, "DrupalSettings": { From 1bf1c439775872f759a08f7a8e96df07b5827501 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Tue, 21 Nov 2023 12:09:10 -0500 Subject: [PATCH 09/16] Update openapi.json --- docs/openapi.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/openapi.json b/docs/openapi.json index 4aff523f..4247e98c 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -67,7 +67,7 @@ "required": [ "task", "host", - "username", + "username" ] }, "DrupalSettings": { From d683367c1f302d95f1edff4042eadb6d8f5f5e52 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Tue, 21 Nov 2023 14:15:56 -0500 Subject: [PATCH 10/16] Add missed defaults --- docs/openapi.json | 101 ++++++++++++++++++++++++++-------------------- 1 file changed, 57 insertions(+), 44 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index 4247e98c..ec63bb8e 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -75,15 +75,18 @@ "properties": { "content_type": { "type": "string", - "description": "The machine name of the Drupal node content type you are creating or updating. Required in \"create\" and \"update\" tasks. " + "description": "The machine name of the Drupal node content type you are creating or updating. Required in \"create\" and \"update\" tasks. ", + "default": "islandora_object" }, "drupal_filesystem": { "type": "string", - "description": "One of 'fedora://', 'public://', or 'private://' (the wrapping quotation marks are required). Only used with Drupal 8.x - 9.1; starting with Drupal 9.2, the filesystem is automatically detected from the media's configuration. Will eventually be deprecated. " + "description": "One of 'fedora://', 'public://', or 'private://' (the wrapping quotation marks are required). Only used with Drupal 8.x - 9.1; starting with Drupal 9.2, the filesystem is automatically detected from the media's configuration. Will eventually be deprecated. ", + "default": "fedora://" }, "allow_adding_terms": { "type": "boolean", - "description": "In \\`create\\` and \\`update\\` tasks, determines if Workbench will add taxonomy terms if they do not exist in the target vocabulary. See more information in the \"[Taxonomy reference fields](/islandora_workbench_docs/fields/#field-types)\" section. Note: this setting is not required in \\`create_terms\\` tasks. " + "description": "In \\`create\\` and \\`update\\` tasks, determines if Workbench will add taxonomy terms if they do not exist in the target vocabulary. See more information in the \"[Taxonomy reference fields](/islandora_workbench_docs/fields/#field-types)\" section. Note: this setting is not required in \\`create_terms\\` tasks. ", + "default": false }, "vocab_id": { "type": "string", @@ -91,35 +94,43 @@ }, "update_mode": { "type": "string", - "description": "Determines if Workbench will \\`replace\\`, \\`append\\` (add to) , or \\`delete\\` field values during \\`update\\` tasks. See more information in the \"[Updating nodes](/islandora_workbench_docs/updating_nodes)\" section. " + "description": "Determines if Workbench will \\`replace\\`, \\`append\\` (add to) , or \\`delete\\` field values during \\`update\\` tasks. See more information in the \"[Updating nodes](/islandora_workbench_docs/updating_nodes)\" section. ", + "default": "replace" }, "validate_terms_exist": { "type": "boolean", - "description": "If set to false, during \\`--check\\` Workbench will not query Drupal to determine if taxonomy terms exist. The structure of term values in CSV are still validated; this option only tells Workbench to not check for each term's existence in the target Drupal. Useful to speed up the \\`--check\\` process if you know terms don't exist in the target Drupal. " + "description": "If set to false, during \\`--check\\` Workbench will not query Drupal to determine if taxonomy terms exist. The structure of term values in CSV are still validated; this option only tells Workbench to not check for each term's existence in the target Drupal. Useful to speed up the \\`--check\\` process if you know terms don't exist in the target Drupal. ", + "default": true }, "validate_parent_node_exists": { "type": "boolean", - "description": "If set to false, during \\`--check\\` Workbench will not query Drupal to determine if nodes whose node IDs are in \\`field_member_of\\` exist. Useful to speed up the \\`--check\\` process if you know terms already exist in the target Drupal. " + "description": "If set to false, during \\`--check\\` Workbench will not query Drupal to determine if nodes whose node IDs are in \\`field_member_of\\` exist. Useful to speed up the \\`--check\\` process if you know terms already exist in the target Drupal. ", + "default": true }, "max_node_title_length": { "type": "integer", - "description": "Set to the number of allowed characters for node titles if your Drupal uses [Node Title Length](https://www.drupal.org/project/title_length). If unsure what your the maximum length of the node titles your site allows, check the length of the \"title\" column in your Drupal database's \"node_field_data\" table. " + "description": "Set to the number of allowed characters for node titles if your Drupal uses [Node Title Length](https://www.drupal.org/project/title_length). If unsure what your the maximum length of the node titles your site allows, check the length of the \"title\" column in your Drupal database's \"node_field_data\" table. ", + "default": 255 }, "list_missing_drupal_fields": { "type": "boolean", - "description": "Set to \\`true\\` to tell Workbench to provide a list of fields that exist in your input CSV but that cannot be matched to Drupal field names (or reserved column names such as \"file\"). If \\`false\\`, Workbench will still check for CSV column headers that it can't match to Drupal fields, but will exit upon finding the first such field. This option produces a list of fields instead of exiting on detecting the first field." + "description": "Set to \\`true\\` to tell Workbench to provide a list of fields that exist in your input CSV but that cannot be matched to Drupal field names (or reserved column names such as \"file\"). If \\`false\\`, Workbench will still check for CSV column headers that it can't match to Drupal fields, but will exit upon finding the first such field. This option produces a list of fields instead of exiting on detecting the first field.", + "default": false }, "standalone_media_url": { "type": "boolean", - "description": "Set to \\`true\\` if your Drupal instance has the \"Standalone media URL\" option at \\`/admin/config/media/media-settings\\` checked. The Drupal default is to have this unchecked, so you only need to use this Workbench option if you have changed Drupal's default. [More information](/islandora_workbench_docs/installation/#configuring-drupals-media-urls) is available. " + "description": "Set to \\`true\\` if your Drupal instance has the \"Standalone media URL\" option at \\`/admin/config/media/media-settings\\` checked. The Drupal default is to have this unchecked, so you only need to use this Workbench option if you have changed Drupal's default. [More information](/islandora_workbench_docs/installation/#configuring-drupals-media-urls) is available. ", + "default": false }, "require_entity_reference_views": { "type": "boolean", - "description": "Set to \\`false\\` to tell Workbench to not require a View to expose the values in an entity reference field configured to use an Entity Reference View. Additional information is available [here](/islandora_workbench_docs/fields/#entity-reference-views-fields). " + "description": "Set to \\`false\\` to tell Workbench to not require a View to expose the values in an entity reference field configured to use an Entity Reference View. Additional information is available [here](/islandora_workbench_docs/fields/#entity-reference-views-fields). ", + "default": true }, "text_format_id": { "type": "string", - "description": "The text format ID (machine name) to apply to all Drupal text fields that have a \"formatted\" field type. Use \\`text_format_ids\\` (plural) to provide a text format ID for a specific Drupal field. See \"[Text fields with markup](/islandora_workbench_docs/fields/#text-fields-with-markup)\" for more information. " + "description": "The text format ID (machine name) to apply to all Drupal text fields that have a \"formatted\" field type. Use \\`text_format_ids\\` (plural) to provide a text format ID for a specific Drupal field. See \"[Text fields with markup](/islandora_workbench_docs/fields/#text-fields-with-markup)\" for more information. ", + "default": "basic_html" } } }, @@ -240,7 +251,8 @@ "tid", "name" ], - "description": "Used in \"export_csv\" tasks to indicate whether vocabulary term IDs or names are included in the output CSV file. Set to \"tid\" (the default) to include term IDs, or set to \"name\" to include term names. See \"[Exporting field data into a CSV file](/islandora_workbench_docs/generating_csv_files/#exporting-field-data-into-a-csv-file)\" for more information. " + "description": "Used in \"export_csv\" tasks to indicate whether vocabulary term IDs or names are included in the output CSV file. Set to \"tid\" (the default) to include term IDs, or set to \"name\" to include term names. See \"[Exporting field data into a CSV file](/islandora_workbench_docs/generating_csv_files/#exporting-field-data-into-a-csv-file)\" for more information. ", + "default": "tid" }, "export_csv_field_list": { "type": "array", @@ -266,7 +278,8 @@ }, "export_file_media_use_term_id": { "type": "string", - "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The term ID or URI from the Islandora Media Use vocabulary that identifies the file you want to export. " + "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The term ID or URI from the Islandora Media Use vocabulary that identifies the file you want to export. ", + "default": "http://pcdm.org/use#OriginalFile" } }, "required": [ @@ -283,7 +296,8 @@ }, "allow_missing_files": { "type": "boolean", - "description": "Determines if empty \\`file\\` values are allowed. Used in the \\`create\\` and \\`add_media\\` tasks. If set to true, empty \\`file\\` values are allowed. For \\`create\\` tasks, a \\`true\\` value will result in nodes without attached media. For \\`add_media\\` tasks, a \\`true\\` value will skip adding a media for the empty \\`file\\` CSV value. Defaults to false (which means all file values must contain the name of a file that exists in the \\`input_data\\` directory). " + "description": "Determines if empty \\`file\\` values are allowed. Used in the \\`create\\` and \\`add_media\\` tasks. If set to true, empty \\`file\\` values are allowed. For \\`create\\` tasks, a \\`true\\` value will result in nodes without attached media. For \\`add_media\\` tasks, a \\`true\\` value will skip adding a media for the empty \\`file\\` CSV value. Defaults to false (which means all file values must contain the name of a file that exists in the \\`input_data\\` directory). ", + "default": false }, "strict_check": { "type": "boolean", @@ -315,15 +329,18 @@ }, "delete_media_with_nodes": { "type": "boolean", - "description": "When a node is deleted using a \\`delete\\` task, by default, all if its media are automatically deleted. Set this option to false to not delete all of a node's media (you do not generally want to keep the media without the node). " + "description": "When a node is deleted using a \\`delete\\` task, by default, all if its media are automatically deleted. Set this option to false to not delete all of a node's media (you do not generally want to keep the media without the node). ", + "default": true }, "use_node_title_for_media_title": { "type": "boolean", - "description": "If set to \\`true\\` (default), name media the same as the parent node's title value. Truncates the value of the field to 255 characters. Applies to both \\`create\\` and \\`add_media\\` tasks. " + "description": "If set to \\`true\\` (default), name media the same as the parent node's title value. Truncates the value of the field to 255 characters. Applies to both \\`create\\` and \\`add_media\\` tasks. ", + "default": true }, "use_nid_in_media_title": { "type": "boolean", - "description": "If set to \\`true\\`, assigns a name to the media following the pattern \\`{node_id}-Original File\\`. Set to true to use the parent node's node ID as the media title. Applies to both \\`create\\` and \\`add_media\\` tasks. " + "description": "If set to \\`true\\`, assigns a name to the media following the pattern \\`{node_id}-Original File\\`. Set to true to use the parent node's node ID as the media title. Applies to both \\`create\\` and \\`add_media\\` tasks. ", + "default": false }, "field_for_media_title": { "type": "string", @@ -331,7 +348,8 @@ }, "use_node_title_for_remote_filename": { "type": "boolean", - "description": "Set to true to use a version of the parent node's title as the filename for a remote (http[s]) file. Replaces all non-alphanumeric characters with an underscore (\\`_\\`). Truncates the value of the field to 255 characters. Applies to both \\`create\\` and \\`add_media\\` tasks. Note: this setting replaces (the previously undocumented) \\`use_nid_in_media_filename\\` setting." + "description": "Set to true to use a version of the parent node's title as the filename for a remote (http[s]) file. Replaces all non-alphanumeric characters with an underscore (\\`_\\`). Truncates the value of the field to 255 characters. Applies to both \\`create\\` and \\`add_media\\` tasks. Note: this setting replaces (the previously undocumented) \\`use_nid_in_media_filename\\` setting.", + "default": false }, "field_for_remote_filename": { "type": "string", @@ -339,7 +357,8 @@ }, "delete_tmp_upload": { "type": "boolean", - "description": "For remote files, if set to \\`true\\`, the temporary copy of the remote file is deleted after it is used to create media. If \\`false\\`, the copy will remain in the location defined in your \\`temp_dir\\` setting. If the file cannot be deleted (e.g. a virus scanner is scanning it), it will remain and an error message will be added to the log file. " + "description": "For remote files, if set to \\`true\\`, the temporary copy of the remote file is deleted after it is used to create media. If \\`false\\`, the copy will remain in the location defined in your \\`temp_dir\\` setting. If the file cannot be deleted (e.g. a virus scanner is scanning it), it will remain and an error message will be added to the log file. ", + "default": false }, "additional_files": { "type": "object", @@ -356,17 +375,20 @@ }, "validate_fixity_during_check": { "type": "boolean", - "description": "Perform checksum validation during \\`--check\\`. See \"[Fixity checking](/islandora_workbench_docs/fixity)\" for more information. " + "description": "Perform checksum validation during \\`--check\\`. See \"[Fixity checking](/islandora_workbench_docs/fixity)\" for more information. ", + "default": false }, "delete_media_by_node_media_use_tids": { "type": "array", "items": { - "type": "string" + "type": "integer" }, "description": "During \\`delete_media_by_node\\` tasks, allows you to specify which media to delete. Only media with the listed terms IDs from the Islandora Media Use vocabulary will be deleted. By default (an empty list), all media are deleted. See \"[Deleting Media](/islandora_workbench_docs/deleting_media)\" for more information." }, "exit_on_first_missing_file_during_check": { - "description": "Removed as a configuration setting November 1, 2022. Use \\`strict_check\\` instead. " + "type": "boolean", + "description": "Removed as a configuration setting November 1, 2022. Use \\`strict_check\\` instead. ", + "default": true } } }, @@ -389,7 +411,8 @@ "properties": { "paged_content_from_directories": { "type": "boolean", - "description": "Set to true if you are using the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method of creating paged content. " + "description": "Set to true if you are using the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method of creating paged content. ", + "default": false }, "paged_content_sequence_separator": { "type": "string", @@ -488,21 +511,6 @@ "type": "boolean", "description": "Whether or not to log the creation of new terms during \"create\" and \"update\" tasks (does not apply to the \"create_terms\" task). \\`--check\\` will still report that terms in the CSV do not exist in their respective vocabularies. ", "default": true - }, - "allow_redirects": { - "description": "Whether or not to allow Islandora Workbench to respond to HTTP redirects. " - }, - "secure_ssl_only": { - "description": "Whether or not to require valid SSL certificates. Set to \\`false\\` if you want to ignore SSL certificates. " - }, - "enable_http_cache": { - "description": "Whether or not to enable Workbench's client-side request cache. Set to \\`false\\` if you want to disable the cache during troubleshooting, etc. " - }, - "http_cache_storage": { - "description": "The backend storage type for the client-side cache. Set to \\`sqlite\\` if you are getting out of memory errors while running Islandora Workbench. " - }, - "http_cache_storage_expire_after": { - "description": "Length of the client-side cache lifespan (in seconds). Reduce this number if you are using the \\`sqlite\\` storage backend and the database is using too much disk space. Note that reducing the cache lifespan will result in increased load on your Drupal server. " } } }, @@ -531,6 +539,10 @@ }, "http_cache_storage": { "type": "string", + "enum": [ + "memory", + "sqlite" + ], "description": "The backend storage type for the client-side cache. Set to sqlite if you are getting out of memory errors while running Islandora Workbench.", "default": "memory" }, @@ -560,22 +572,23 @@ }, "rollback_dir": { "type": "string", - "description": "Absolute path to the directory where you want your \"rollback.csv\" file to be written. See \"[Rolling back](/islandora_workbench_docs/rolling_back/)\" for more information. " + "description": "Absolute path to the directory where you want your \"rollback.csv\" file to be written. See \"[Rolling back](/islandora_workbench_docs/rolling_back/)\" for more information." }, "timestamp_rollback": { "type": "boolean", - "description": "Set to \\`true\\` to add a timestamp to the \"rollback.yml\" and corresponding \"rollback.csv\" generated in \"create\" and \"create_from_files\" tasks. See \"[Rolling back](/islandora_workbench_docs/rolling_back/)\" for more information. " + "description": "Set to \\`true\\` to add a timestamp to the \"rollback.yml\" and corresponding \"rollback.csv\" generated in \"create\" and \"create_from_files\" tasks. See \"[Rolling back](/islandora_workbench_docs/rolling_back/)\" for more information.", + "default": false }, "pause": { - "type": "number", - "description": "Defines the number of seconds to pause between all 'POST', 'PUT', 'PATCH', 'DELETE' requests to Drupal. Include it in your configuration to lessen the impact of Islandora Workbench on your site during large jobs, for example pause: 1.5. More information is available in the \"[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)\" documentation. " + "type": "integer", + "description": "Defines the number of seconds to pause between all 'POST', 'PUT', 'PATCH', 'DELETE' requests to Drupal. Include it in your configuration to lessen the impact of Islandora Workbench on your site during large jobs, for example pause: 1.5. More information is available in the \"[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)\" documentation." }, "adaptive_pause": { - "type": "number", + "type": "integer", "description": "Defines the number of seconds to pause between each REST request to Drupal. Works like \"pause\" but only takes effect when the Drupal server's response to the most recent request is slower (determined by the \"adaptive_pause_threshold\" value) than the average response time for the last 20 requests. More information is available in the \"[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)\" documentation. " }, "adaptive_pause_threshold": { - "type": "number", + "type": "integer", "description": "A weighting of the response time for the most recent request, relative to the average response times of the last 20 requests. This weighting determines how much slower the Drupal server's response to the most recent Workbench request must be in order for adaptive pausing to take effect for the next request.", "default": 2 }, From 96b6cb99177eeb076ede83e32016e80d4b6c148b Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Tue, 21 Nov 2023 14:16:26 -0500 Subject: [PATCH 11/16] Cleanup description --- docs/openapi.json | 142 +++++++++++++++++++++++----------------------- 1 file changed, 71 insertions(+), 71 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index ec63bb8e..00280fdc 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -53,11 +53,11 @@ "host": { "type": "string", "format": "uri", - "description": "The hostname, including \\`http://\\` or \\`https://\\` of your Islandora repository, and port number if not the default 80. " + "description": "The hostname, including \\`http://\\` or \\`https://\\` of your Islandora repository, and port number if not the default 80." }, "username": { "type": "string", - "description": "The username used to authenticate the requests. This Drupal user should be a member of the \"Administrator\" role. If you want to create nodes that are owned by a specific Drupal user, include their numeric user ID in the \\`uid\\` column in your CSV. " + "description": "The username used to authenticate the requests. This Drupal user should be a member of the \"Administrator\" role. If you want to create nodes that are owned by a specific Drupal user, include their numeric user ID in the \\`uid\\` column in your CSV." }, "password": { "type": "string", @@ -75,41 +75,41 @@ "properties": { "content_type": { "type": "string", - "description": "The machine name of the Drupal node content type you are creating or updating. Required in \"create\" and \"update\" tasks. ", + "description": "The machine name of the Drupal node content type you are creating or updating. Required in \"create\" and \"update\" tasks.", "default": "islandora_object" }, "drupal_filesystem": { "type": "string", - "description": "One of 'fedora://', 'public://', or 'private://' (the wrapping quotation marks are required). Only used with Drupal 8.x - 9.1; starting with Drupal 9.2, the filesystem is automatically detected from the media's configuration. Will eventually be deprecated. ", + "description": "One of 'fedora://', 'public://', or 'private://' (the wrapping quotation marks are required). Only used with Drupal 8.x - 9.1; starting with Drupal 9.2, the filesystem is automatically detected from the media's configuration. Will eventually be deprecated.", "default": "fedora://" }, "allow_adding_terms": { "type": "boolean", - "description": "In \\`create\\` and \\`update\\` tasks, determines if Workbench will add taxonomy terms if they do not exist in the target vocabulary. See more information in the \"[Taxonomy reference fields](/islandora_workbench_docs/fields/#field-types)\" section. Note: this setting is not required in \\`create_terms\\` tasks. ", + "description": "In \\`create\\` and \\`update\\` tasks, determines if Workbench will add taxonomy terms if they do not exist in the target vocabulary. See more information in the \"[Taxonomy reference fields](/islandora_workbench_docs/fields/#field-types)\" section. Note: this setting is not required in \\`create_terms\\` tasks.", "default": false }, "vocab_id": { "type": "string", - "description": "Identifies the vocabulary you are adding terms to in \\`create_tersm\\` tasks. See more information in the \"[Creating taxonomy terms](/islandora_workbench_docs/creating_taxonomy_terms)\" section. " + "description": "Identifies the vocabulary you are adding terms to in \\`create_tersm\\` tasks. See more information in the \"[Creating taxonomy terms](/islandora_workbench_docs/creating_taxonomy_terms)\" section." }, "update_mode": { "type": "string", - "description": "Determines if Workbench will \\`replace\\`, \\`append\\` (add to) , or \\`delete\\` field values during \\`update\\` tasks. See more information in the \"[Updating nodes](/islandora_workbench_docs/updating_nodes)\" section. ", + "description": "Determines if Workbench will \\`replace\\`, \\`append\\` (add to) , or \\`delete\\` field values during \\`update\\` tasks. See more information in the \"[Updating nodes](/islandora_workbench_docs/updating_nodes)\" section.", "default": "replace" }, "validate_terms_exist": { "type": "boolean", - "description": "If set to false, during \\`--check\\` Workbench will not query Drupal to determine if taxonomy terms exist. The structure of term values in CSV are still validated; this option only tells Workbench to not check for each term's existence in the target Drupal. Useful to speed up the \\`--check\\` process if you know terms don't exist in the target Drupal. ", + "description": "If set to false, during \\`--check\\` Workbench will not query Drupal to determine if taxonomy terms exist. The structure of term values in CSV are still validated; this option only tells Workbench to not check for each term's existence in the target Drupal. Useful to speed up the \\`--check\\` process if you know terms don't exist in the target Drupal.", "default": true }, "validate_parent_node_exists": { "type": "boolean", - "description": "If set to false, during \\`--check\\` Workbench will not query Drupal to determine if nodes whose node IDs are in \\`field_member_of\\` exist. Useful to speed up the \\`--check\\` process if you know terms already exist in the target Drupal. ", + "description": "If set to false, during \\`--check\\` Workbench will not query Drupal to determine if nodes whose node IDs are in \\`field_member_of\\` exist. Useful to speed up the \\`--check\\` process if you know terms already exist in the target Drupal.", "default": true }, "max_node_title_length": { "type": "integer", - "description": "Set to the number of allowed characters for node titles if your Drupal uses [Node Title Length](https://www.drupal.org/project/title_length). If unsure what your the maximum length of the node titles your site allows, check the length of the \"title\" column in your Drupal database's \"node_field_data\" table. ", + "description": "Set to the number of allowed characters for node titles if your Drupal uses [Node Title Length](https://www.drupal.org/project/title_length). If unsure what your the maximum length of the node titles your site allows, check the length of the \"title\" column in your Drupal database's \"node_field_data\" table.", "default": 255 }, "list_missing_drupal_fields": { @@ -119,17 +119,17 @@ }, "standalone_media_url": { "type": "boolean", - "description": "Set to \\`true\\` if your Drupal instance has the \"Standalone media URL\" option at \\`/admin/config/media/media-settings\\` checked. The Drupal default is to have this unchecked, so you only need to use this Workbench option if you have changed Drupal's default. [More information](/islandora_workbench_docs/installation/#configuring-drupals-media-urls) is available. ", + "description": "Set to \\`true\\` if your Drupal instance has the \"Standalone media URL\" option at \\`/admin/config/media/media-settings\\` checked. The Drupal default is to have this unchecked, so you only need to use this Workbench option if you have changed Drupal's default. [More information](/islandora_workbench_docs/installation/#configuring-drupals-media-urls) is available.", "default": false }, "require_entity_reference_views": { "type": "boolean", - "description": "Set to \\`false\\` to tell Workbench to not require a View to expose the values in an entity reference field configured to use an Entity Reference View. Additional information is available [here](/islandora_workbench_docs/fields/#entity-reference-views-fields). ", + "description": "Set to \\`false\\` to tell Workbench to not require a View to expose the values in an entity reference field configured to use an Entity Reference View. Additional information is available [here](/islandora_workbench_docs/fields/#entity-reference-views-fields).", "default": true }, "text_format_id": { "type": "string", - "description": "The text format ID (machine name) to apply to all Drupal text fields that have a \"formatted\" field type. Use \\`text_format_ids\\` (plural) to provide a text format ID for a specific Drupal field. See \"[Text fields with markup](/islandora_workbench_docs/fields/#text-fields-with-markup)\" for more information. ", + "description": "The text format ID (machine name) to apply to all Drupal text fields that have a \"formatted\" field type. Use \\`text_format_ids\\` (plural) to provide a text format ID for a specific Drupal field. See \"[Text fields with markup](/islandora_workbench_docs/fields/#text-fields-with-markup)\" for more information.", "default": "basic_html" } } @@ -139,26 +139,26 @@ "properties": { "input_dir": { "type": "string", - "description": "The full or relative path to the directory containing the files and metadata CSV file. ", + "description": "The full or relative path to the directory containing the files and metadata CSV file.", "default": "input_data" }, "input_csv": { "type": "string", - "description": "Path to the CSV metadata file. Can be absolute, or if just the filename is provided, will be assumed to be in the directory named in \\`input_dir\\`. Can also be the URL to a Google spreadsheet (see the \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information). ", + "description": "Path to the CSV metadata file. Can be absolute, or if just the filename is provided, will be assumed to be in the directory named in \\`input_dir\\`. Can also be the URL to a Google spreadsheet (see the \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information).", "default": "metadata.csv" }, "google_sheets_csv_filename": { "type": "string", - "description": "Local CSV filename for data from a Google spreadsheet. See the \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information. " + "description": "Local CSV filename for data from a Google spreadsheet. See the \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information." }, "google_sheets_gid": { "type": "integer", - "description": "The \"gid\" of the worksheet to use in a Google Sheet. See \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information. ", + "description": "The \"gid\" of the worksheet to use in a Google Sheet. See \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information.", "default": 0 }, "excel_worksheet": { "type": "string", - "description": "If using an Excel file as your input CSV file, the name of the worksheet that the CSV data will be extracted from. ", + "description": "If using an Excel file as your input CSV file, the name of the worksheet that the CSV data will be extracted from.", "default": "Sheet1" } }, @@ -172,17 +172,17 @@ "properties": { "id_field": { "type": "string", - "description": "The name of the field in the CSV that uniquely identifies each record. ", + "description": "The name of the field in the CSV that uniquely identifies each record.", "default": "id" }, "delimiter": { "type": "string", - "description": "The delimiter used in the CSV file, for example, \",\" or \"\\t\" (must use double quotes with \"\\t\"). If omitted, defaults to \",\". ", + "description": "The delimiter used in the CSV file, for example, \",\" or \"\\t\" (must use double quotes with \"\\t\"). If omitted, defaults to \",\".", "default": "," }, "subdelimiter": { "type": "string", - "description": "The subdelimiter used in the CSV file to define multiple values in one field. If omitted, defaults to \"|\". Can be a string of multiple characters, e.g. \"^^^\". ", + "description": "The subdelimiter used in the CSV file to define multiple values in one field. If omitted, defaults to \"|\". Can be a string of multiple characters, e.g. \"^^^\".", "default": "|" }, "csv_field_templates": { @@ -205,7 +205,7 @@ }, "csv_start_row": { "type": "integer", - "description": "Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) before the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available. " + "description": "Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) before the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available." }, "csv_stop_row": { "type": "integer", @@ -217,7 +217,7 @@ "names", "labels" ], - "description": "Used in \"create\", \"update\" and \"create_terms\" tasks. Set to \"labels\" to allow use of field labels (as opposed to machine names) as CSV column headers. ", + "description": "Used in \"create\", \"update\" and \"create_terms\" tasks. Set to \"labels\" to allow use of field labels (as opposed to machine names) as CSV column headers.", "default": "names" }, "clean_csv_values_skip": { @@ -225,7 +225,7 @@ "items": { "type": "string" }, - "description": "Used in all tasks that use CSV input files. See \"[How Workbench cleans your input data](/islandora_workbench_docs/preparing_data/#how-workbench-cleans-your-input-data)\" for more information. " + "description": "Used in all tasks that use CSV input files. See \"[How Workbench cleans your input data](/islandora_workbench_docs/preparing_data/#how-workbench-cleans-your-input-data)\" for more information." } }, "required": [ @@ -238,11 +238,11 @@ "properties": { "output_csv": { "type": "string", - "description": "The full or relative (to the \"workbench\" script) path to a CSV file with one record per node created by Workbench. " + "description": "The full or relative (to the \"workbench\" script) path to a CSV file with one record per node created by Workbench." }, "output_csv_include_input_csv": { "type": "boolean", - "description": "Include in the output CSV all the fields (and their values) from the input CSV. ", + "description": "Include in the output CSV all the fields (and their values) from the input CSV.", "default": false }, "export_csv_term_mode": { @@ -251,7 +251,7 @@ "tid", "name" ], - "description": "Used in \"export_csv\" tasks to indicate whether vocabulary term IDs or names are included in the output CSV file. Set to \"tid\" (the default) to include term IDs, or set to \"name\" to include term names. See \"[Exporting field data into a CSV file](/islandora_workbench_docs/generating_csv_files/#exporting-field-data-into-a-csv-file)\" for more information. ", + "description": "Used in \"export_csv\" tasks to indicate whether vocabulary term IDs or names are included in the output CSV file. Set to \"tid\" (the default) to include term IDs, or set to \"name\" to include term names. See \"[Exporting field data into a CSV file](/islandora_workbench_docs/generating_csv_files/#exporting-field-data-into-a-csv-file)\" for more information.", "default": "tid" }, "export_csv_field_list": { @@ -259,26 +259,26 @@ "items": { "type": "string" }, - "description": "List of fields to include in exported CSV data. If empty, all fields will be included. See \"[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)\" for more information. " + "description": "List of fields to include in exported CSV data. If empty, all fields will be included. See \"[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)\" for more information." }, "view_parameters": { "type": "array", "items": { "type": "string" }, - "description": "List of URL parameter/value strings to include in requests to a View. See \"[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)\" for more information. " + "description": "List of URL parameter/value strings to include in requests to a View. See \"[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)\" for more information." }, "export_csv_file_path": { "type": "string", - "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The path to the exported CSV file. Required in the \"get_data_from_view\" task; in the \"export_csv\" task, if left empty (the default), the file will be named after the value of the \\`input_csv\\` with \".csv_file_with_field_values\" appended and saved in the directory identified in \\`input_dir\\`. " + "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The path to the exported CSV file. Required in the \"get_data_from_view\" task; in the \"export_csv\" task, if left empty (the default), the file will be named after the value of the \\`input_csv\\` with \".csv_file_with_field_values\" appended and saved in the directory identified in \\`input_dir\\`." }, "export_file_directory": { "type": "string", - "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The path to the directory where files corresponding to the data in the CSV output file will be written. " + "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The path to the directory where files corresponding to the data in the CSV output file will be written." }, "export_file_media_use_term_id": { "type": "string", - "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The term ID or URI from the Islandora Media Use vocabulary that identifies the file you want to export. ", + "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The term ID or URI from the Islandora Media Use vocabulary that identifies the file you want to export.", "default": "http://pcdm.org/use#OriginalFile" } }, @@ -291,17 +291,17 @@ "properties": { "nodes_only": { "type": "boolean", - "description": "Include this option in \\`create\\` tasks, set to \\`true\\`, if you want to only create nodes and not their accompanying media. See the \"Creating nodes but not media\" section for more information. ", + "description": "Include this option in \\`create\\` tasks, set to \\`true\\`, if you want to only create nodes and not their accompanying media. See the \"Creating nodes but not media\" section for more information.", "default": false }, "allow_missing_files": { "type": "boolean", - "description": "Determines if empty \\`file\\` values are allowed. Used in the \\`create\\` and \\`add_media\\` tasks. If set to true, empty \\`file\\` values are allowed. For \\`create\\` tasks, a \\`true\\` value will result in nodes without attached media. For \\`add_media\\` tasks, a \\`true\\` value will skip adding a media for the empty \\`file\\` CSV value. Defaults to false (which means all file values must contain the name of a file that exists in the \\`input_data\\` directory). ", + "description": "Determines if empty \\`file\\` values are allowed. Used in the \\`create\\` and \\`add_media\\` tasks. If set to true, empty \\`file\\` values are allowed. For \\`create\\` tasks, a \\`true\\` value will result in nodes without attached media. For \\`add_media\\` tasks, a \\`true\\` value will skip adding a media for the empty \\`file\\` CSV value. Defaults to false (which means all file values must contain the name of a file that exists in the \\`input_data\\` directory).", "default": false }, "strict_check": { "type": "boolean", - "description": "Replaced with \\`perform_soft_checks\\` as of commit dfa60ff (July 14, 2023). " + "description": "Replaced with \\`perform_soft_checks\\` as of commit dfa60ff (July 14, 2023)." }, "perform_soft_checks": { "type": "boolean", @@ -313,33 +313,33 @@ }, "media_type": { "type": "string", - "description": "Overrides, for all media being created, Workbench's default definition of whether the media being created is an image, file, document, audio, or video. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section. " + "description": "Overrides, for all media being created, Workbench's default definition of whether the media being created is an image, file, document, audio, or video. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section." }, "media_types_override": { "type": "object", - "description": "Overrides default media type definitions on a per file extension basis. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section. " + "description": "Overrides default media type definitions on a per file extension basis. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section." }, "media_type_file_fields": { "type": "string", - "description": "Defines the name of the media field that references media's file (i.e., the field on the Media type). Usually used with custom media types and accompanied by either the \\`media_type\\` or \\`media_types_override\\` option. For more information, see the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section. " + "description": "Defines the name of the media field that references media's file (i.e., the field on the Media type). Usually used with custom media types and accompanied by either the \\`media_type\\` or \\`media_types_override\\` option. For more information, see the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section." }, "mimetype_extensions": { "type": "object", - "description": "Overrides Workbench's default mappings between MIME types and file extensions. Usually used with remote files where the remote web server returns a MIME type that is not standard. For more information, see the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section. " + "description": "Overrides Workbench's default mappings between MIME types and file extensions. Usually used with remote files where the remote web server returns a MIME type that is not standard. For more information, see the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section." }, "delete_media_with_nodes": { "type": "boolean", - "description": "When a node is deleted using a \\`delete\\` task, by default, all if its media are automatically deleted. Set this option to false to not delete all of a node's media (you do not generally want to keep the media without the node). ", + "description": "When a node is deleted using a \\`delete\\` task, by default, all if its media are automatically deleted. Set this option to false to not delete all of a node's media (you do not generally want to keep the media without the node).", "default": true }, "use_node_title_for_media_title": { "type": "boolean", - "description": "If set to \\`true\\` (default), name media the same as the parent node's title value. Truncates the value of the field to 255 characters. Applies to both \\`create\\` and \\`add_media\\` tasks. ", + "description": "If set to \\`true\\` (default), name media the same as the parent node's title value. Truncates the value of the field to 255 characters. Applies to both \\`create\\` and \\`add_media\\` tasks.", "default": true }, "use_nid_in_media_title": { "type": "boolean", - "description": "If set to \\`true\\`, assigns a name to the media following the pattern \\`{node_id}-Original File\\`. Set to true to use the parent node's node ID as the media title. Applies to both \\`create\\` and \\`add_media\\` tasks. ", + "description": "If set to \\`true\\`, assigns a name to the media following the pattern \\`{node_id}-Original File\\`. Set to true to use the parent node's node ID as the media title. Applies to both \\`create\\` and \\`add_media\\` tasks.", "default": false }, "field_for_media_title": { @@ -357,12 +357,12 @@ }, "delete_tmp_upload": { "type": "boolean", - "description": "For remote files, if set to \\`true\\`, the temporary copy of the remote file is deleted after it is used to create media. If \\`false\\`, the copy will remain in the location defined in your \\`temp_dir\\` setting. If the file cannot be deleted (e.g. a virus scanner is scanning it), it will remain and an error message will be added to the log file. ", + "description": "For remote files, if set to \\`true\\`, the temporary copy of the remote file is deleted after it is used to create media. If \\`false\\`, the copy will remain in the location defined in your \\`temp_dir\\` setting. If the file cannot be deleted (e.g. a virus scanner is scanning it), it will remain and an error message will be added to the log file.", "default": false }, "additional_files": { "type": "object", - "description": "Maps a set of CSV field names to media use terms IDs to create additional media (additional to the media created from the file named in the \"file\" column, that is) in \\`create\\` and \\`add_media\\` tasks. See \"[Adding multiple media](/islandora_workbench_docs/adding_multiple_media)\" for more information. " + "description": "Maps a set of CSV field names to media use terms IDs to create additional media (additional to the media created from the file named in the \"file\" column, that is) in \\`create\\` and \\`add_media\\` tasks. See \"[Adding multiple media](/islandora_workbench_docs/adding_multiple_media)\" for more information." }, "fixity_algorithm": { "type": "string", @@ -371,11 +371,11 @@ "sha1", "sha256" ], - "description": "Checksum/hash algorithm to use during transmission fixity checking. Must be one of \"md5\", \"sha1\", or \"sha256\". See \"[Fixity checking](/islandora_workbench_docs/fixity)\" for more information. " + "description": "Checksum/hash algorithm to use during transmission fixity checking. Must be one of \"md5\", \"sha1\", or \"sha256\". See \"[Fixity checking](/islandora_workbench_docs/fixity)\" for more information." }, "validate_fixity_during_check": { "type": "boolean", - "description": "Perform checksum validation during \\`--check\\`. See \"[Fixity checking](/islandora_workbench_docs/fixity)\" for more information. ", + "description": "Perform checksum validation during \\`--check\\`. See \"[Fixity checking](/islandora_workbench_docs/fixity)\" for more information.", "default": false }, "delete_media_by_node_media_use_tids": { @@ -387,7 +387,7 @@ }, "exit_on_first_missing_file_during_check": { "type": "boolean", - "description": "Removed as a configuration setting November 1, 2022. Use \\`strict_check\\` instead. ", + "description": "Removed as a configuration setting November 1, 2022. Use \\`strict_check\\` instead.", "default": true } } @@ -411,29 +411,29 @@ "properties": { "paged_content_from_directories": { "type": "boolean", - "description": "Set to true if you are using the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method of creating paged content. ", + "description": "Set to true if you are using the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method of creating paged content.", "default": false }, "paged_content_sequence_separator": { "type": "string", - "description": "The character used to separate the page sequence number from the rest of the filename. Used when creating paged content with the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method. Note: this configuration option was originally misspelled \"paged_content_sequence_seprator\". ", + "description": "The character used to separate the page sequence number from the rest of the filename. Used when creating paged content with the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method. Note: this configuration option was originally misspelled \"paged_content_sequence_seprator\".", "default": "-" }, "paged_content_page_model_tid": { "type": "string", - "description": "Required if \\`paged_content_from_directories\\` is true. The the term ID from the Islandora Models (or its URI) taxonomy to assign to pages. " + "description": "Required if \\`paged_content_from_directories\\` is true. The the term ID from the Islandora Models (or its URI) taxonomy to assign to pages." }, "paged_content_page_display_hints": { "type": "string", - "description": "The term ID from the Islandora Display taxonomy to assign to pages. If not included, defaults to the value of the \\`field_display_hints\\` in the parent's record in the CSV file. " + "description": "The term ID from the Islandora Display taxonomy to assign to pages. If not included, defaults to the value of the \\`field_display_hints\\` in the parent's record in the CSV file." }, "paged_content_page_content_type": { "type": "string", - "description": "Set to the machine name of the Drupal node content type for pages created using the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method if it is different than the content type of the parent (which is specified in the content_type setting). " + "description": "Set to the machine name of the Drupal node content type for pages created using the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method if it is different than the content type of the parent (which is specified in the content_type setting)." }, "page_title_template": { "type": "string", - "description": "Template used to generate the titles of pages/members in the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method. ", + "description": "Template used to generate the titles of pages/members in the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method.", "default": "$parent_title, page $weight" }, "secondary_tasks": { @@ -441,20 +441,20 @@ "items": { "type": "string" }, - "description": "A list of configuration file names that are executed as secondary tasks after the primary task to create compound objects. See \"[Using a secondary task](/islandora_workbench_docs/paged_and_compound/#using-a-secondary-task)\" for more information. " + "description": "A list of configuration file names that are executed as secondary tasks after the primary task to create compound objects. See \"[Using a secondary task](/islandora_workbench_docs/paged_and_compound/#using-a-secondary-task)\" for more information." }, "csv_id_to_node_id_map_path": { "type": "string", - "description": "Name of the SQLite database filename used to store CSV row ID to node ID mappings for nodes created during \\`create\\` and \\`create_from_files\\` tasks. If you want to store your map database outside of a temporary directory, use an absolute path to the database file for this setting. If you want to disable population of this database, set this config setting to \\`false\\`. See \"[Generating CSV files](/islandora_workbench_docs/generating_csv_files/#using-the-csv-id-to-node-id-map)\" for more information. ", + "description": "Name of the SQLite database filename used to store CSV row ID to node ID mappings for nodes created during \\`create\\` and \\`create_from_files\\` tasks. If you want to store your map database outside of a temporary directory, use an absolute path to the database file for this setting. If you want to disable population of this database, set this config setting to \\`false\\`. See \"[Generating CSV files](/islandora_workbench_docs/generating_csv_files/#using-the-csv-id-to-node-id-map)\" for more information.", "default": "[temp_dir]/csv_id_to_node_id_map.db" }, "query_csv_id_to_node_id_map_for_parents": { "type": "boolean", - "description": "Queries the CSV ID to node ID map when creating compound content. Set to \\`true\\` if you want to use parent IDs from previous Workbench sessions. Note: this setting is automatically set to true in secondary task config files. See \"[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\" " + "description": "Queries the CSV ID to node ID map when creating compound content. Set to \\`true\\` if you want to use parent IDs from previous Workbench sessions. Note: this setting is automatically set to true in secondary task config files. See \"[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\"" }, "ignore_duplicate_parent_ids": { "type": "boolean", - "description": "Tells Workbench to ignore entries in the CSV ID to node ID map that have the same parent ID value. Set to \\`false\\` if you want Workbench to warn you that there are duplicate parent IDs in your CSV ID to node ID map. See \"[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\" ", + "description": "Tells Workbench to ignore entries in the CSV ID to node ID map that have the same parent ID value. Set to \\`false\\` if you want Workbench to warn you that there are duplicate parent IDs in your CSV ID to node ID map. See \"[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\"", "default": true } } @@ -465,7 +465,7 @@ "properties": { "log_file_path": { "type": "string", - "description": "The path to the log file, absolute or relative to the directory Workbench is run from. ", + "description": "The path to the log file, absolute or relative to the directory Workbench is run from.", "default": "workbench.log" }, "log_file_mode": { @@ -474,42 +474,42 @@ "a", "w" ], - "description": "Set to \"w\" to overwrite the log file, if it exists. ", + "description": "Set to \"w\" to overwrite the log file, if it exists.", "default": "a" }, "log_request_url": { "type": "boolean", - "description": "Whether or not to log the request URL (and its method). Useful for debugging. ", + "description": "Whether or not to log the request URL (and its method). Useful for debugging.", "default": false }, "log_json": { "type": "boolean", - "description": "Whether or not to log the raw request JSON POSTed, PUT, or PATCHed to Drupal. Useful for debugging. ", + "description": "Whether or not to log the raw request JSON POSTed, PUT, or PATCHed to Drupal. Useful for debugging.", "default": false }, "log_headers": { "type": "boolean", - "description": "Whether or not to log the raw HTTP headers used in all requests. Useful for debugging. ", + "description": "Whether or not to log the raw HTTP headers used in all requests. Useful for debugging.", "default": false }, "log_response_status_code": { "type": "boolean", - "description": "Whether or not to log the HTTP response code. Useful for debugging. ", + "description": "Whether or not to log the HTTP response code. Useful for debugging.", "default": false }, "log_response_time": { "type": "boolean", - "description": "Whether or not to log the response time of each request that is slower than the average response time for the last 20 HTTP requests Workbench makes to the Drupal server. Useful for debugging. ", + "description": "Whether or not to log the response time of each request that is slower than the average response time for the last 20 HTTP requests Workbench makes to the Drupal server. Useful for debugging.", "default": false }, "log_response_body": { "type": "boolean", - "description": "Whether or not to log the raw HTTP response body. Useful for debugging. ", + "description": "Whether or not to log the raw HTTP response body. Useful for debugging.", "default": false }, "log_term_creation": { "type": "boolean", - "description": "Whether or not to log the creation of new terms during \"create\" and \"update\" tasks (does not apply to the \"create_terms\" task). \\`--check\\` will still report that terms in the CSV do not exist in their respective vocabularies. ", + "description": "Whether or not to log the creation of new terms during \"create\" and \"update\" tasks (does not apply to the \"create_terms\" task). \\`--check\\` will still report that terms in the CSV do not exist in their respective vocabularies.", "default": true } } @@ -519,7 +519,7 @@ "properties": { "user_agent": { "type": "string", - "description": "String to use as the User-Agent header in HTTP requests. ", + "description": "String to use as the User-Agent header in HTTP requests.", "default": "Islandora Workbench" }, "allow_redirects": { @@ -558,16 +558,16 @@ "properties": { "perform_soft_checks": { "type": "boolean", - "description": "If set to true, \\`--check\\` will not exit when it encounters an error with parent/child order, file extension registration with Drupal media file fields, or EDTF validation. Instead, it will log any errors it encounters and exit after it has checked all rows in the CSV input file. Note: this setting replaces \\`strict_check\\`. ", + "description": "If set to true, \\`--check\\` will not exit when it encounters an error with parent/child order, file extension registration with Drupal media file fields, or EDTF validation. Instead, it will log any errors it encounters and exit after it has checked all rows in the CSV input file. Note: this setting replaces \\`strict_check\\`.", "default": false }, "temp_dir": { "type": "string", - "description": "Relative or absolute path to the directory where you want Workbench's temporary files to be written. These include the \".preprocessed\" version of the your input CSV, remote files temporarily downloaded to create media, and the CSV ID to node ID map database. " + "description": "Relative or absolute path to the directory where you want Workbench's temporary files to be written. These include the \".preprocessed\" version of the your input CSV, remote files temporarily downloaded to create media, and the CSV ID to node ID map database." }, "sqlite_db_filename": { "type": "string", - "description": "Name of the SQLite database filename used to store session data. ", + "description": "Name of the SQLite database filename used to store session data.", "default": "[temp_dir]/workbench_temp_data.db" }, "rollback_dir": { @@ -585,7 +585,7 @@ }, "adaptive_pause": { "type": "integer", - "description": "Defines the number of seconds to pause between each REST request to Drupal. Works like \"pause\" but only takes effect when the Drupal server's response to the most recent request is slower (determined by the \"adaptive_pause_threshold\" value) than the average response time for the last 20 requests. More information is available in the \"[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)\" documentation. " + "description": "Defines the number of seconds to pause between each REST request to Drupal. Works like \"pause\" but only takes effect when the Drupal server's response to the most recent request is slower (determined by the \"adaptive_pause_threshold\" value) than the average response time for the last 20 requests. More information is available in the \"[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)\" documentation." }, "adaptive_pause_threshold": { "type": "integer", From 9fd4d75117a9605a5ac19e79bd24a7ab0ff34a03 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Tue, 21 Nov 2023 14:23:50 -0500 Subject: [PATCH 12/16] Absolute URL when linking from external systems --- docs/openapi.json | 80 +++++++++++++++++++++++------------------------ 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index 00280fdc..59338c7e 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -48,7 +48,7 @@ "create_terms", "delete_media_by_node" ], - "description": "One of 'create', 'create_from_files', 'update', delete', 'add_media', 'delete_media', 'update_media', 'export_csv', 'get_data_from_view', 'create_terms', or 'delete_media_by_node'. See \"[Choosing a task](/islandora_workbench_docs/choosing_a_task/)\" for more information." + "description": "One of 'create', 'create_from_files', 'update', delete', 'add_media', 'delete_media', 'update_media', 'export_csv', 'get_data_from_view', 'create_terms', or 'delete_media_by_node'. See \"[Choosing a task](https://mjordan.github.io/islandora_workbench_docs/choosing_a_task/)\" for more information." }, "host": { "type": "string", @@ -85,16 +85,16 @@ }, "allow_adding_terms": { "type": "boolean", - "description": "In \\`create\\` and \\`update\\` tasks, determines if Workbench will add taxonomy terms if they do not exist in the target vocabulary. See more information in the \"[Taxonomy reference fields](/islandora_workbench_docs/fields/#field-types)\" section. Note: this setting is not required in \\`create_terms\\` tasks.", + "description": "In \\`create\\` and \\`update\\` tasks, determines if Workbench will add taxonomy terms if they do not exist in the target vocabulary. See more information in the \"[Taxonomy reference fields](https://mjordan.github.io/islandora_workbench_docs/fields/#field-types)\" section. Note: this setting is not required in \\`create_terms\\` tasks.", "default": false }, "vocab_id": { "type": "string", - "description": "Identifies the vocabulary you are adding terms to in \\`create_tersm\\` tasks. See more information in the \"[Creating taxonomy terms](/islandora_workbench_docs/creating_taxonomy_terms)\" section." + "description": "Identifies the vocabulary you are adding terms to in \\`create_tersm\\` tasks. See more information in the \"[Creating taxonomy terms](https://mjordan.github.io/islandora_workbench_docs/creating_taxonomy_terms)\" section." }, "update_mode": { "type": "string", - "description": "Determines if Workbench will \\`replace\\`, \\`append\\` (add to) , or \\`delete\\` field values during \\`update\\` tasks. See more information in the \"[Updating nodes](/islandora_workbench_docs/updating_nodes)\" section.", + "description": "Determines if Workbench will \\`replace\\`, \\`append\\` (add to) , or \\`delete\\` field values during \\`update\\` tasks. See more information in the \"[Updating nodes](https://mjordan.github.io/islandora_workbench_docs/updating_nodes)\" section.", "default": "replace" }, "validate_terms_exist": { @@ -119,17 +119,17 @@ }, "standalone_media_url": { "type": "boolean", - "description": "Set to \\`true\\` if your Drupal instance has the \"Standalone media URL\" option at \\`/admin/config/media/media-settings\\` checked. The Drupal default is to have this unchecked, so you only need to use this Workbench option if you have changed Drupal's default. [More information](/islandora_workbench_docs/installation/#configuring-drupals-media-urls) is available.", + "description": "Set to \\`true\\` if your Drupal instance has the \"Standalone media URL\" option at \\`/admin/config/media/media-settings\\` checked. The Drupal default is to have this unchecked, so you only need to use this Workbench option if you have changed Drupal's default. [More information](https://mjordan.github.io/islandora_workbench_docs/installation/#configuring-drupals-media-urls) is available.", "default": false }, "require_entity_reference_views": { "type": "boolean", - "description": "Set to \\`false\\` to tell Workbench to not require a View to expose the values in an entity reference field configured to use an Entity Reference View. Additional information is available [here](/islandora_workbench_docs/fields/#entity-reference-views-fields).", + "description": "Set to \\`false\\` to tell Workbench to not require a View to expose the values in an entity reference field configured to use an Entity Reference View. Additional information is available [here](https://mjordan.github.io/islandora_workbench_docs/fields/#entity-reference-views-fields).", "default": true }, "text_format_id": { "type": "string", - "description": "The text format ID (machine name) to apply to all Drupal text fields that have a \"formatted\" field type. Use \\`text_format_ids\\` (plural) to provide a text format ID for a specific Drupal field. See \"[Text fields with markup](/islandora_workbench_docs/fields/#text-fields-with-markup)\" for more information.", + "description": "The text format ID (machine name) to apply to all Drupal text fields that have a \"formatted\" field type. Use \\`text_format_ids\\` (plural) to provide a text format ID for a specific Drupal field. See \"[Text fields with markup](https://mjordan.github.io/islandora_workbench_docs/fields/#text-fields-with-markup)\" for more information.", "default": "basic_html" } } @@ -144,16 +144,16 @@ }, "input_csv": { "type": "string", - "description": "Path to the CSV metadata file. Can be absolute, or if just the filename is provided, will be assumed to be in the directory named in \\`input_dir\\`. Can also be the URL to a Google spreadsheet (see the \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information).", + "description": "Path to the CSV metadata file. Can be absolute, or if just the filename is provided, will be assumed to be in the directory named in \\`input_dir\\`. Can also be the URL to a Google spreadsheet (see the \"[Using Google Sheets as input data](https://mjordan.github.io/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information).", "default": "metadata.csv" }, "google_sheets_csv_filename": { "type": "string", - "description": "Local CSV filename for data from a Google spreadsheet. See the \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information." + "description": "Local CSV filename for data from a Google spreadsheet. See the \"[Using Google Sheets as input data](https://mjordan.github.io/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information." }, "google_sheets_gid": { "type": "integer", - "description": "The \"gid\" of the worksheet to use in a Google Sheet. See \"[Using Google Sheets as input data](/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information.", + "description": "The \"gid\" of the worksheet to use in a Google Sheet. See \"[Using Google Sheets as input data](https://mjordan.github.io/islandora_workbench_docs/preparing_data/#using-a-google-sheet-as-the-input-csv-file)\" section for more information.", "default": 0 }, "excel_worksheet": { @@ -187,14 +187,14 @@ }, "csv_field_templates": { "type": "object", - "description": "Used in the \\`create\\` and \\`update\\` tasks only. A list of Drupal field machine names and corresponding values that are copied into the CSV input file. More detail provided in the \"[CSV field templates](/islandora_workbench_docs/field_templates/)\" section.", + "description": "Used in the \\`create\\` and \\`update\\` tasks only. A list of Drupal field machine names and corresponding values that are copied into the CSV input file. More detail provided in the \"[CSV field templates](https://mjordan.github.io/islandora_workbench_docs/field_templates/)\" section.", "additionalProperties": { "type": "string" } }, "csv_value_templates": { "type": "object", - "description": "Used in the \\`create\\` and \\`update\\` tasks only. A list of Drupal field machine names and corresponding templates. More detail provided in the \"[CSV value templates](/islandora_workbench_docs/csv_value_templates/)\" section." + "description": "Used in the \\`create\\` and \\`update\\` tasks only. A list of Drupal field machine names and corresponding templates. More detail provided in the \"[CSV value templates](https://mjordan.github.io/islandora_workbench_docs/csv_value_templates/)\" section." }, "ignore_csv_columns": { "type": "array", @@ -205,11 +205,11 @@ }, "csv_start_row": { "type": "integer", - "description": "Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) before the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available." + "description": "Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) before the designated row number. [More information](https://mjordan.github.io/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available." }, "csv_stop_row": { "type": "integer", - "description": "Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) after the designated row number. [More information](/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available." + "description": "Used in all tasks. Tells Workbench to ignore all rows/records in input CSV (or Google Sheet or Excel) after the designated row number. [More information](https://mjordan.github.io/islandora_workbench_docs/ignoring_csv_rows_and_columns/#using-csv-row-ranges) is available." }, "csv_headers": { "type": "string", @@ -225,7 +225,7 @@ "items": { "type": "string" }, - "description": "Used in all tasks that use CSV input files. See \"[How Workbench cleans your input data](/islandora_workbench_docs/preparing_data/#how-workbench-cleans-your-input-data)\" for more information." + "description": "Used in all tasks that use CSV input files. See \"[How Workbench cleans your input data](https://mjordan.github.io/islandora_workbench_docs/preparing_data/#how-workbench-cleans-your-input-data)\" for more information." } }, "required": [ @@ -251,7 +251,7 @@ "tid", "name" ], - "description": "Used in \"export_csv\" tasks to indicate whether vocabulary term IDs or names are included in the output CSV file. Set to \"tid\" (the default) to include term IDs, or set to \"name\" to include term names. See \"[Exporting field data into a CSV file](/islandora_workbench_docs/generating_csv_files/#exporting-field-data-into-a-csv-file)\" for more information.", + "description": "Used in \"export_csv\" tasks to indicate whether vocabulary term IDs or names are included in the output CSV file. Set to \"tid\" (the default) to include term IDs, or set to \"name\" to include term names. See \"[Exporting field data into a CSV file](https://mjordan.github.io/islandora_workbench_docs/generating_csv_files/#exporting-field-data-into-a-csv-file)\" for more information.", "default": "tid" }, "export_csv_field_list": { @@ -259,14 +259,14 @@ "items": { "type": "string" }, - "description": "List of fields to include in exported CSV data. If empty, all fields will be included. See \"[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)\" for more information." + "description": "List of fields to include in exported CSV data. If empty, all fields will be included. See \"[Using a Drupal View to identify content to export as CSV](https://mjordan.github.io/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)\" for more information." }, "view_parameters": { "type": "array", "items": { "type": "string" }, - "description": "List of URL parameter/value strings to include in requests to a View. See \"[Using a Drupal View to identify content to export as CSV](/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)\" for more information." + "description": "List of URL parameter/value strings to include in requests to a View. See \"[Using a Drupal View to identify content to export as CSV](https://mjordan.github.io/islandora_workbench_docs/generating_csv_files/#using-a-drupal-view-to-identify-content-to-export-as-csv)\" for more information." }, "export_csv_file_path": { "type": "string", @@ -313,19 +313,19 @@ }, "media_type": { "type": "string", - "description": "Overrides, for all media being created, Workbench's default definition of whether the media being created is an image, file, document, audio, or video. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section." + "description": "Overrides, for all media being created, Workbench's default definition of whether the media being created is an image, file, document, audio, or video. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](https://mjordan.github.io/islandora_workbench_docs/media_types)\" section." }, "media_types_override": { "type": "object", - "description": "Overrides default media type definitions on a per file extension basis. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section." + "description": "Overrides default media type definitions on a per file extension basis. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](https://mjordan.github.io/islandora_workbench_docs/media_types)\" section." }, "media_type_file_fields": { "type": "string", - "description": "Defines the name of the media field that references media's file (i.e., the field on the Media type). Usually used with custom media types and accompanied by either the \\`media_type\\` or \\`media_types_override\\` option. For more information, see the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section." + "description": "Defines the name of the media field that references media's file (i.e., the field on the Media type). Usually used with custom media types and accompanied by either the \\`media_type\\` or \\`media_types_override\\` option. For more information, see the \"[Configuring Media Types](https://mjordan.github.io/islandora_workbench_docs/media_types)\" section." }, "mimetype_extensions": { "type": "object", - "description": "Overrides Workbench's default mappings between MIME types and file extensions. Usually used with remote files where the remote web server returns a MIME type that is not standard. For more information, see the \"[Configuring Media Types](/islandora_workbench_docs/media_types)\" section." + "description": "Overrides Workbench's default mappings between MIME types and file extensions. Usually used with remote files where the remote web server returns a MIME type that is not standard. For more information, see the \"[Configuring Media Types](https://mjordan.github.io/islandora_workbench_docs/media_types)\" section." }, "delete_media_with_nodes": { "type": "boolean", @@ -362,7 +362,7 @@ }, "additional_files": { "type": "object", - "description": "Maps a set of CSV field names to media use terms IDs to create additional media (additional to the media created from the file named in the \"file\" column, that is) in \\`create\\` and \\`add_media\\` tasks. See \"[Adding multiple media](/islandora_workbench_docs/adding_multiple_media)\" for more information." + "description": "Maps a set of CSV field names to media use terms IDs to create additional media (additional to the media created from the file named in the \"file\" column, that is) in \\`create\\` and \\`add_media\\` tasks. See \"[Adding multiple media](https://mjordan.github.io/islandora_workbench_docs/adding_multiple_media)\" for more information." }, "fixity_algorithm": { "type": "string", @@ -371,11 +371,11 @@ "sha1", "sha256" ], - "description": "Checksum/hash algorithm to use during transmission fixity checking. Must be one of \"md5\", \"sha1\", or \"sha256\". See \"[Fixity checking](/islandora_workbench_docs/fixity)\" for more information." + "description": "Checksum/hash algorithm to use during transmission fixity checking. Must be one of \"md5\", \"sha1\", or \"sha256\". See \"[Fixity checking](https://mjordan.github.io/islandora_workbench_docs/fixity)\" for more information." }, "validate_fixity_during_check": { "type": "boolean", - "description": "Perform checksum validation during \\`--check\\`. See \"[Fixity checking](/islandora_workbench_docs/fixity)\" for more information.", + "description": "Perform checksum validation during \\`--check\\`. See \"[Fixity checking](https://mjordan.github.io/islandora_workbench_docs/fixity)\" for more information.", "default": false }, "delete_media_by_node_media_use_tids": { @@ -383,7 +383,7 @@ "items": { "type": "integer" }, - "description": "During \\`delete_media_by_node\\` tasks, allows you to specify which media to delete. Only media with the listed terms IDs from the Islandora Media Use vocabulary will be deleted. By default (an empty list), all media are deleted. See \"[Deleting Media](/islandora_workbench_docs/deleting_media)\" for more information." + "description": "During \\`delete_media_by_node\\` tasks, allows you to specify which media to delete. Only media with the listed terms IDs from the Islandora Media Use vocabulary will be deleted. By default (an empty list), all media are deleted. See \"[Deleting Media](https://mjordan.github.io/islandora_workbench_docs/deleting_media)\" for more information." }, "exit_on_first_missing_file_during_check": { "type": "boolean", @@ -397,11 +397,11 @@ "properties": { "model": { "type": "string", - "description": "Used in the \\`create_from_files\\` task only. Defines the term ID from the the \"Islandora Models\" vocabulary for all nodes created using this task. Note: one of \\`model\\` or \\`models\\` is required. More detail provided in the \"[Creating nodes from files](/islandora_workbench_docs/creating_nodes_from_files/)\" section." + "description": "Used in the \\`create_from_files\\` task only. Defines the term ID from the the \"Islandora Models\" vocabulary for all nodes created using this task. Note: one of \\`model\\` or \\`models\\` is required. More detail provided in the \"[Creating nodes from files](https://mjordan.github.io/islandora_workbench_docs/creating_nodes_from_files/)\" section." }, "models": { "type": "object", - "description": "Used in the \\`create_from_files\\` task only. Provides a mapping between file extensions and terms in the \"Islandora Models\" vocabulary. Note: one of \\`model\\` or \\`models\\` is required. More detail provided in the [Creating nodes from files](/islandora_workbench_docs/creating_nodes_from_files/)\" section." + "description": "Used in the \\`create_from_files\\` task only. Provides a mapping between file extensions and terms in the \"Islandora Models\" vocabulary. Note: one of \\`model\\` or \\`models\\` is required. More detail provided in the [Creating nodes from files](https://mjordan.github.io/islandora_workbench_docs/creating_nodes_from_files/)\" section." } } }, @@ -411,12 +411,12 @@ "properties": { "paged_content_from_directories": { "type": "boolean", - "description": "Set to true if you are using the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method of creating paged content.", + "description": "Set to true if you are using the \"[Using subdirectories](https://mjordan.github.io/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method of creating paged content.", "default": false }, "paged_content_sequence_separator": { "type": "string", - "description": "The character used to separate the page sequence number from the rest of the filename. Used when creating paged content with the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method. Note: this configuration option was originally misspelled \"paged_content_sequence_seprator\".", + "description": "The character used to separate the page sequence number from the rest of the filename. Used when creating paged content with the \"[Using subdirectories](https://mjordan.github.io/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method. Note: this configuration option was originally misspelled \"paged_content_sequence_seprator\".", "default": "-" }, "paged_content_page_model_tid": { @@ -429,11 +429,11 @@ }, "paged_content_page_content_type": { "type": "string", - "description": "Set to the machine name of the Drupal node content type for pages created using the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method if it is different than the content type of the parent (which is specified in the content_type setting)." + "description": "Set to the machine name of the Drupal node content type for pages created using the \"[Using subdirectories](https://mjordan.github.io/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method if it is different than the content type of the parent (which is specified in the content_type setting)." }, "page_title_template": { "type": "string", - "description": "Template used to generate the titles of pages/members in the \"[Using subdirectories](/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method.", + "description": "Template used to generate the titles of pages/members in the \"[Using subdirectories](https://mjordan.github.io/islandora_workbench_docs/paged_and_compound/#using-subdirectories)\" method.", "default": "$parent_title, page $weight" }, "secondary_tasks": { @@ -441,20 +441,20 @@ "items": { "type": "string" }, - "description": "A list of configuration file names that are executed as secondary tasks after the primary task to create compound objects. See \"[Using a secondary task](/islandora_workbench_docs/paged_and_compound/#using-a-secondary-task)\" for more information." + "description": "A list of configuration file names that are executed as secondary tasks after the primary task to create compound objects. See \"[Using a secondary task](https://mjordan.github.io/islandora_workbench_docs/paged_and_compound/#using-a-secondary-task)\" for more information." }, "csv_id_to_node_id_map_path": { "type": "string", - "description": "Name of the SQLite database filename used to store CSV row ID to node ID mappings for nodes created during \\`create\\` and \\`create_from_files\\` tasks. If you want to store your map database outside of a temporary directory, use an absolute path to the database file for this setting. If you want to disable population of this database, set this config setting to \\`false\\`. See \"[Generating CSV files](/islandora_workbench_docs/generating_csv_files/#using-the-csv-id-to-node-id-map)\" for more information.", + "description": "Name of the SQLite database filename used to store CSV row ID to node ID mappings for nodes created during \\`create\\` and \\`create_from_files\\` tasks. If you want to store your map database outside of a temporary directory, use an absolute path to the database file for this setting. If you want to disable population of this database, set this config setting to \\`false\\`. See \"[Generating CSV files](https://mjordan.github.io/islandora_workbench_docs/generating_csv_files/#using-the-csv-id-to-node-id-map)\" for more information.", "default": "[temp_dir]/csv_id_to_node_id_map.db" }, "query_csv_id_to_node_id_map_for_parents": { "type": "boolean", - "description": "Queries the CSV ID to node ID map when creating compound content. Set to \\`true\\` if you want to use parent IDs from previous Workbench sessions. Note: this setting is automatically set to true in secondary task config files. See \"[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\"" + "description": "Queries the CSV ID to node ID map when creating compound content. Set to \\`true\\` if you want to use parent IDs from previous Workbench sessions. Note: this setting is automatically set to true in secondary task config files. See \"[Creating parent/child relationships across Workbench sessions](https://mjordan.github.io/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\"" }, "ignore_duplicate_parent_ids": { "type": "boolean", - "description": "Tells Workbench to ignore entries in the CSV ID to node ID map that have the same parent ID value. Set to \\`false\\` if you want Workbench to warn you that there are duplicate parent IDs in your CSV ID to node ID map. See \"[Creating parent/child relationships across Workbench sessions](/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\"", + "description": "Tells Workbench to ignore entries in the CSV ID to node ID map that have the same parent ID value. Set to \\`false\\` if you want Workbench to warn you that there are duplicate parent IDs in your CSV ID to node ID map. See \"[Creating parent/child relationships across Workbench sessions](https://mjordan.github.io/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\"", "default": true } } @@ -572,20 +572,20 @@ }, "rollback_dir": { "type": "string", - "description": "Absolute path to the directory where you want your \"rollback.csv\" file to be written. See \"[Rolling back](/islandora_workbench_docs/rolling_back/)\" for more information." + "description": "Absolute path to the directory where you want your \"rollback.csv\" file to be written. See \"[Rolling back](https://mjordan.github.io/islandora_workbench_docs/rolling_back/)\" for more information." }, "timestamp_rollback": { "type": "boolean", - "description": "Set to \\`true\\` to add a timestamp to the \"rollback.yml\" and corresponding \"rollback.csv\" generated in \"create\" and \"create_from_files\" tasks. See \"[Rolling back](/islandora_workbench_docs/rolling_back/)\" for more information.", + "description": "Set to \\`true\\` to add a timestamp to the \"rollback.yml\" and corresponding \"rollback.csv\" generated in \"create\" and \"create_from_files\" tasks. See \"[Rolling back](https://mjordan.github.io/islandora_workbench_docs/rolling_back/)\" for more information.", "default": false }, "pause": { "type": "integer", - "description": "Defines the number of seconds to pause between all 'POST', 'PUT', 'PATCH', 'DELETE' requests to Drupal. Include it in your configuration to lessen the impact of Islandora Workbench on your site during large jobs, for example pause: 1.5. More information is available in the \"[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)\" documentation." + "description": "Defines the number of seconds to pause between all 'POST', 'PUT', 'PATCH', 'DELETE' requests to Drupal. Include it in your configuration to lessen the impact of Islandora Workbench on your site during large jobs, for example pause: 1.5. More information is available in the \"[Reducing Workbench's impact on Drupal](https://mjordan.github.io/islandora_workbench_docs/reducing_load/)\" documentation." }, "adaptive_pause": { "type": "integer", - "description": "Defines the number of seconds to pause between each REST request to Drupal. Works like \"pause\" but only takes effect when the Drupal server's response to the most recent request is slower (determined by the \"adaptive_pause_threshold\" value) than the average response time for the last 20 requests. More information is available in the \"[Reducing Workbench's impact on Drupal](/islandora_workbench_docs/reducing_load/)\" documentation." + "description": "Defines the number of seconds to pause between each REST request to Drupal. Works like \"pause\" but only takes effect when the Drupal server's response to the most recent request is slower (determined by the \"adaptive_pause_threshold\" value) than the average response time for the last 20 requests. More information is available in the \"[Reducing Workbench's impact on Drupal](https://mjordan.github.io/islandora_workbench_docs/reducing_load/)\" documentation." }, "adaptive_pause_threshold": { "type": "integer", From 4d0292e2f865019cf9997eea586b3acbfff77e0a Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Tue, 21 Nov 2023 14:52:41 -0500 Subject: [PATCH 13/16] Add additional properties to object types --- docs/openapi.json | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index 59338c7e..a6e9ebeb 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -194,7 +194,10 @@ }, "csv_value_templates": { "type": "object", - "description": "Used in the \\`create\\` and \\`update\\` tasks only. A list of Drupal field machine names and corresponding templates. More detail provided in the \"[CSV value templates](https://mjordan.github.io/islandora_workbench_docs/csv_value_templates/)\" section." + "description": "Used in the \\`create\\` and \\`update\\` tasks only. A list of Drupal field machine names and corresponding templates. More detail provided in the \"[CSV value templates](https://mjordan.github.io/islandora_workbench_docs/csv_value_templates/)\" section.", + "additionalProperties": { + "type": "string" + } }, "ignore_csv_columns": { "type": "array", @@ -317,7 +320,13 @@ }, "media_types_override": { "type": "object", - "description": "Overrides default media type definitions on a per file extension basis. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](https://mjordan.github.io/islandora_workbench_docs/media_types)\" section." + "description": "Overrides default media type definitions on a per file extension basis. Used in the \\`create\\`, \\`add_media\\`, and \\`create_from_files\\` tasks. More detail provided in the \"[Configuring Media Types](https://mjordan.github.io/islandora_workbench_docs/media_types)\" section.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } }, "media_type_file_fields": { "type": "string", @@ -325,7 +334,10 @@ }, "mimetype_extensions": { "type": "object", - "description": "Overrides Workbench's default mappings between MIME types and file extensions. Usually used with remote files where the remote web server returns a MIME type that is not standard. For more information, see the \"[Configuring Media Types](https://mjordan.github.io/islandora_workbench_docs/media_types)\" section." + "description": "Overrides Workbench's default mappings between MIME types and file extensions. Usually used with remote files where the remote web server returns a MIME type that is not standard. For more information, see the \"[Configuring Media Types](https://mjordan.github.io/islandora_workbench_docs/media_types)\" section.", + "additionalProperties": { + "type": "string" + } }, "delete_media_with_nodes": { "type": "boolean", @@ -362,7 +374,10 @@ }, "additional_files": { "type": "object", - "description": "Maps a set of CSV field names to media use terms IDs to create additional media (additional to the media created from the file named in the \"file\" column, that is) in \\`create\\` and \\`add_media\\` tasks. See \"[Adding multiple media](https://mjordan.github.io/islandora_workbench_docs/adding_multiple_media)\" for more information." + "description": "Maps a set of CSV field names to media use terms IDs to create additional media (additional to the media created from the file named in the \"file\" column, that is) in \\`create\\` and \\`add_media\\` tasks. See \"[Adding multiple media](https://mjordan.github.io/islandora_workbench_docs/adding_multiple_media)\" for more information.", + "additionalProperties": { + "type": "string" + } }, "fixity_algorithm": { "type": "string", @@ -401,7 +416,13 @@ }, "models": { "type": "object", - "description": "Used in the \\`create_from_files\\` task only. Provides a mapping between file extensions and terms in the \"Islandora Models\" vocabulary. Note: one of \\`model\\` or \\`models\\` is required. More detail provided in the [Creating nodes from files](https://mjordan.github.io/islandora_workbench_docs/creating_nodes_from_files/)\" section." + "description": "Used in the \\`create_from_files\\` task only. Provides a mapping between file extensions and terms in the \"Islandora Models\" vocabulary. Note: one of \\`model\\` or \\`models\\` is required. More detail provided in the [Creating nodes from files](https://mjordan.github.io/islandora_workbench_docs/creating_nodes_from_files/)\" section.", + "additionalProperties": { + "type": "array", + "items": { + "type": "string" + } + } } } }, From d0c6a5494489b22a97a9b7dc0e953313ea19a860 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Wed, 22 Nov 2023 12:06:41 -0500 Subject: [PATCH 14/16] A couple more missed default values --- docs/openapi.json | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index a6e9ebeb..b2f5fe57 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -304,11 +304,13 @@ }, "strict_check": { "type": "boolean", - "description": "Replaced with \\`perform_soft_checks\\` as of commit dfa60ff (July 14, 2023)." + "description": "Replaced with \\`perform_soft_checks\\` as of commit dfa60ff (July 14, 2023).", + "default": false }, "perform_soft_checks": { "type": "boolean", - "description": "Use soft checks for validation during processing." + "description": "Use soft checks for validation during processing.", + "default": false }, "media_use_tid": { "type": "string", @@ -471,7 +473,8 @@ }, "query_csv_id_to_node_id_map_for_parents": { "type": "boolean", - "description": "Queries the CSV ID to node ID map when creating compound content. Set to \\`true\\` if you want to use parent IDs from previous Workbench sessions. Note: this setting is automatically set to true in secondary task config files. See \"[Creating parent/child relationships across Workbench sessions](https://mjordan.github.io/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\"" + "description": "Queries the CSV ID to node ID map when creating compound content. Set to \\`true\\` if you want to use parent IDs from previous Workbench sessions. Note: this setting is automatically set to true in secondary task config files. See \"[Creating parent/child relationships across Workbench sessions](https://mjordan.github.io/islandora_workbench_docs/paged_and_compound/#creating-parentchild-relationships-across-workbench-sessions) for more information.\"", + "default": false }, "ignore_duplicate_parent_ids": { "type": "boolean", From 8a725bd18df1947f9e42edac7e300bb4c24ead1d Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Wed, 22 Nov 2023 12:44:49 -0500 Subject: [PATCH 15/16] export_csv_file_path is not universally required --- docs/openapi.json | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/docs/openapi.json b/docs/openapi.json index b2f5fe57..83461d76 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -284,10 +284,7 @@ "description": "Used in the \"export_csv\" and \"get_data_from_view\" tasks. The term ID or URI from the Islandora Media Use vocabulary that identifies the file you want to export.", "default": "http://pcdm.org/use#OriginalFile" } - }, - "required": [ - "export_csv_file_path" - ] + } }, "MediaSettings": { "type": "object", From 82404b049d17843aa346a9520d35524ab39d0a34 Mon Sep 17 00:00:00 2001 From: Joe Corall Date: Wed, 22 Nov 2023 16:15:37 -0500 Subject: [PATCH 16/16] Provide a blank default value for fixity_algorithm --- docs/openapi.json | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/openapi.json b/docs/openapi.json index 83461d76..3cdcd89a 100644 --- a/docs/openapi.json +++ b/docs/openapi.json @@ -381,11 +381,13 @@ "fixity_algorithm": { "type": "string", "enum": [ + "", "md5", "sha1", "sha256" ], - "description": "Checksum/hash algorithm to use during transmission fixity checking. Must be one of \"md5\", \"sha1\", or \"sha256\". See \"[Fixity checking](https://mjordan.github.io/islandora_workbench_docs/fixity)\" for more information." + "description": "Checksum/hash algorithm to use during transmission fixity checking. Must be one of \"md5\", \"sha1\", or \"sha256\". See \"[Fixity checking](https://mjordan.github.io/islandora_workbench_docs/fixity)\" for more information.", + "default": "" }, "validate_fixity_during_check": { "type": "boolean",