Skip to content

Commit

Permalink
change "quotes" schema field names to "anchors"
Browse files Browse the repository at this point in the history
closes #98
  • Loading branch information
mscarey committed May 21, 2021
1 parent ab515ea commit 5f78186
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions authorityspoke/io/schemas_json.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,26 +259,26 @@ def make_object(self, data, **kwargs):

class NamedAnchors(NamedTuple):
name: Factor
quotes: List[TextQuoteSelector]
anchors: List[TextQuoteSelector]


class NamedAnchorsSchema(Schema):
__model__ = NamedAnchors

name = fields.Nested(FactorSchema)
quotes = fields.Nested(SelectorSchema, many=True)
anchors = fields.Nested(SelectorSchema, many=True)


class AnchoredEnactments(NamedTuple):
enactment: Enactment
quotes: List[TextQuoteSelector]
anchors: List[TextQuoteSelector]


class AnchoredEnactmentsSchema(Schema):
__model__ = AnchoredEnactments

enactment = fields.Nested(EnactmentSchema)
quotes = fields.Nested(SelectorSchema, many=True)
anchors = fields.Nested(SelectorSchema, many=True)


SCHEMAS = list(Schema.__subclasses__()) + [SelectorSchema, EnactmentSchema]
Expand Down

0 comments on commit 5f78186

Please sign in to comment.