Add method for metadata keys to be unset back to their default values

Open
#650 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
15/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
json
Domain
api

Research direction

Start by reading how PUT currently updates metadata in baseDeltas.json and whether it supports empty-string or null values. The issue does not name implementation files or tests; identify the existing update mechanism and clarify how removing a key should restore its default. Done means a defined, safe way to unset metadata keys.

Written by the indexing model from the issue text.

Description

This is about manipulating metadata (baseDeltas.json) using PUT.

Currently, there is no mechanism to unset a key. This limits our ability to set metadata keys back to their default values once the key is present in baseDeltas.json.

For example:
We can, for a given path meta, use PUT to update displayName and:

  1. Create/update the key with a given string value
  2. We can set the value to an empty string ''
  3. We can (not sure if supported yet) set value to null to indicate no value should be use

But we cannot remove the key, which would effectively unset the key and have said metadata key go back to its default value.

I think sk could have plugin that exposes metadata keys using a thread save jsonPatch mechanism, or do we already have something similar?

Dominant language
JavaScript
Stars
105
Forks
72
Avg merge
11h 49m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from SignalK/specification

All issues in SignalK/specification

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.