Closed tomasciccola closed 1 month ago
This depends on #248 (because @comapeo/geometry doesn't export fromPartial
methods, and it's easier to remove them from here than try to write then for Geometry), so that should be merged first.
The actual changes to add geometry are in https://github.com/digidem/mapeo-schema/pull/234/commits/7733276587d1d57109e502e635f914a7c9a896cc
It is a bit more complicated than I would like because of the need to deal with JSONSchema refs with 3 different libraries that we use (ajv
, @json-schema-tools/dereferencer
and @apidevtools/json-schema-ref-parser
).
Would be nice to replace @json-schema-tools/dereferencer
with @apidevtools/json-schema-ref-parser
at some point, because the latter is already a dep of json-schema-to-typescript
and we need to deal with it for that.
I plan to review this next week.
I think we should not merge this until we have released the MVP, in case we need bug fixes before MVP (having this merged would complicate bug fixes)
wouldn't it make sense to have a 'develop' branch where we merge this so we don't have a bunch of dangling open PRs (but maybe there won't be many of this)?
This adds the
remoteDetectionAlert
doc type. Thegeometry
message is a stub for now, until @gmaclennan implements its decoding conversion to GeoJSON.The only doubt I have is around
sourceId
. Is there a clear format for this string? Should we add concrete validation for it?Also, I reused the
tags
type formetadata
(since they are structurally the same?, basically aRecord<string, any>
). I know that semantically is confusing, but this allows to reuse all the conversion functions regarding tagsshould close #228