class HeaderSchema(colander.MappingSchema): """Base schema used for validating and deserializing request headers. """ missing = colander.drop if_match = HeaderQuotedInteger(name="If-Match") if_none_match = HeaderQuotedInteger(name="If-None-Match") @staticmethod def schema_type(): return colander.Mapping(unknown="preserve")
class ResponseHeaderSchema(colander.MappingSchema): """Kinto API custom response headers.""" etag = HeaderQuotedInteger(name="Etag") last_modified = colander.SchemaNode(colander.String(), name="Last-Modified")