Skip to content

Refactor to define document types via configuration? #157

@jimallman

Description

@jimallman

@jar398 and I have talked about a general refactoring that would potentially remove lots of boilerplate code by defining document types (studies, collections, amendments, illustrations, etc.) with configuration. Sort of a type registry where we define:

  • Pattern (regexp) for defining a valid document ID
  • Shard naming convention
  • Distinguish “folderish” types (eg, study, illustration) from simple JSON documents
  • Limitations on file sizes, file types
  • Pattern for shard folder structure and singletons (eg next_ott_id.json)
  • Patterns for corresponding public URLs for a document

I'm pretty sure there would still be a fair amount of type-specific code for validation, testing, etc. But this might drastically shorten the time and expertise requireed to add new document types.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions