overture-stack / lectern

Data Schema / Dictionary management system
GNU Affero General Public License v3.0
0 stars 1 forks source link

Feature Request: Endpoint to download TSV File templates matching schema headers #182

Open joneubank opened 1 year ago

joneubank commented 1 year ago

Lectern schemas are structured as they are to work with TSV data files. To facilitate the creation of compatible data files Lectern should have an endpoint that can generate a TSV template file for any schema (or for every schema in a dictionary).

A TSV template file for a schema includes a header row with the field names from a schema separated by tabs. The file should be named with the schema name, ie. schema_name.tsv.

All templates for a dictionary can be generated following this pattern and then provided in a single zip file for download. The zip file should be named with the dictionary name and version number.

Detailed Description

Two endpoints needed:

  1. GET /dictionaries/:dictId/templates - Download all schema templates for dictionary in zip file.
  2. GET /dictionaries/:dictId/schemas/:schemaId/template - Download template for an individual schema