The to_dict function in link.py is not serializing rel properly in case of using a RelType enum.
(rel is an Union[str, RelType])
|
d: Dict[str, Any] = {"rel": self.rel, "href": self.get_href()} |
In my example, by default the rel is pystac.RelType.ROOT and when I call the to_dict function on a Collection object, the link included in the dictionary returned is the following:
'links': [{'rel': <RelType.ROOT: 'root'>, 'href': '/home/paul/code/linz/topo-processor/collection.json', 'type': <MediaType.JSON: 'application/json'>}]
I would expect that to_dict return the str enum value "root" in my case.
Note that causes an Unsupported type: 'RelType' error when calling a jsonschema-rs validator with this dict.