You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The openapi.yaml specification uses multiple different names for the same domain concepts across paths, schema names, parameter names, field names, and descriptions. This causes confusion when reading the spec, generating client SDKs, or writing integration tests. All references to a given concept must use one canonical name throughout.
The three main offenders are:
Edition / Manifestation / Instance — three names for the same resource
Text / Expression — two names for the same resource, including a path that mixes both
Several smaller field/parameter naming divergences
Tasks
Rename Manifestation → Edition everywhere ManifestationOutput, ManifestationInput, ManifestationType schemas must be renamed to EditionOutput, EditionInput, EditionType. All manifestation_id fields in SegmentOutput, AlignmentOutput, AlignmentInput, and all inline descriptions ("ID of the manifestation…", "target manifestation", "List of related manifestations") must be updated to edition_id / "edition".
Rename Instance → Edition everywhere
The GET /v2/texts/{text_id}/editions summary says "Get instances for text", the POST response says "Instance created successfully", and all six request body examples are named valid_diplomatic_instance_* / valid_critical_instance_*. Rename all to use "edition".
Rename Expression → Text everywhere ExpressionOutput, ExpressionInput, ExpressionPatch schemas must be renamed to TextOutput, TextInput, TextPatch. The path /v2/relations/expressions/{expression_id} must become /v2/relations/texts/{text_id}. The path /v2/texts/{expression_id}/tags/{tag_id} uses expression_id as its path parameter despite the path being under /v2/texts/ — that parameter must be renamed to text_id. All inline descriptions referencing "expression" or "expression ID" must be updated.
Standardize {note_id} → {durchen_id}
The durchen endpoint /v2/annotations/durchen/{note_id} is the only annotation endpoint that does not name its path parameter after the resource. All others use {segmentation_id}, {alignment_id}, {pagination_id}, {bibliographic_id}. Rename the parameter to {durchen_id}.
Standardize bibliography_annotation → bibliographic_metadata
The POST /v2/texts/{text_id}/editions request body uses the field name bibliography_annotation (and example keys valid_*_with_bibliography_annotation), while the POST /v2/editions/{edition_id}/annotations endpoint, AnnotationRequestInput, and AnnotationRequestOutput all use bibliographic_metadata. Rename the field and all example keys in the edition creation endpoint to bibliographic_metadata.
Fix schema name suffix inconsistencies
Structural sub-schemas use two conflicting patterns: SpanModel, PageModel, VolumeModel have a *Model suffix, while AlignedSegment has none. Additionally, TextOperation is the only writable input schema that does not follow the *Input suffix used by SegmentationInput, AlignmentInput, PaginationInput, etc. Decide on one pattern and apply it consistently — either drop Model from the three suffixed schemas or add it to AlignedSegment, and rename TextOperation to TextOperationInput.
Description
The
openapi.yamlspecification uses multiple different names for the same domain concepts across paths, schema names, parameter names, field names, and descriptions. This causes confusion when reading the spec, generating client SDKs, or writing integration tests. All references to a given concept must use one canonical name throughout.The three main offenders are:
Tasks
Rename
Manifestation→EditioneverywhereManifestationOutput,ManifestationInput,ManifestationTypeschemas must be renamed toEditionOutput,EditionInput,EditionType. Allmanifestation_idfields inSegmentOutput,AlignmentOutput,AlignmentInput, and all inline descriptions ("ID of the manifestation…", "target manifestation", "List of related manifestations") must be updated toedition_id/ "edition".Rename
Instance→EditioneverywhereThe
GET /v2/texts/{text_id}/editionssummary says "Get instances for text", thePOSTresponse says "Instance created successfully", and all six request body examples are namedvalid_diplomatic_instance_*/valid_critical_instance_*. Rename all to use "edition".Rename
Expression→TexteverywhereExpressionOutput,ExpressionInput,ExpressionPatchschemas must be renamed toTextOutput,TextInput,TextPatch. The path/v2/relations/expressions/{expression_id}must become/v2/relations/texts/{text_id}. The path/v2/texts/{expression_id}/tags/{tag_id}usesexpression_idas its path parameter despite the path being under/v2/texts/— that parameter must be renamed totext_id. All inline descriptions referencing "expression" or "expression ID" must be updated.Standardize
{note_id}→{durchen_id}The durchen endpoint
/v2/annotations/durchen/{note_id}is the only annotation endpoint that does not name its path parameter after the resource. All others use{segmentation_id},{alignment_id},{pagination_id},{bibliographic_id}. Rename the parameter to{durchen_id}.Standardize
bibliography_annotation→bibliographic_metadataThe
POST /v2/texts/{text_id}/editionsrequest body uses the field namebibliography_annotation(and example keysvalid_*_with_bibliography_annotation), while thePOST /v2/editions/{edition_id}/annotationsendpoint,AnnotationRequestInput, andAnnotationRequestOutputall usebibliographic_metadata. Rename the field and all example keys in the edition creation endpoint tobibliographic_metadata.Fix schema name suffix inconsistencies
Structural sub-schemas use two conflicting patterns:
SpanModel,PageModel,VolumeModelhave a*Modelsuffix, whileAlignedSegmenthas none. Additionally,TextOperationis the only writable input schema that does not follow the*Inputsuffix used bySegmentationInput,AlignmentInput,PaginationInput, etc. Decide on one pattern and apply it consistently — either dropModelfrom the three suffixed schemas or add it toAlignedSegment, and renameTextOperationtoTextOperationInput.Reviewer