Add last_modified and created to settings and workspace API items #99
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Here's a minimal proposal for adding the fields mentioned in #98 to the various API routes for workspaces and settings.
metadata.created
or.last_modified
, but if it appears, should always be an UTC ISO 8601 datetime.PUT
back, the user could modify the value, and it would be written to disk, but then overwritten when read back out. seems a little odd, but still okaycreated
andlast_modified
, and can be a UTC ISO 8601 datetime, ornull
in the event that the user hasn't created a settings file (otherwise, there was actually no way to know, as it always returns at least{}
inraw
).These both use the newly shimmed
tz
inserver
, but as this doesn't provide a way to parse UTC ISO strings, the tests now also use whatjsonschema
would use,strict-rfc3339
... and indeed, it, and a few other packages, as runtime dependencies might provide better conformance to the JSON Schema spec.Longer term... these handlers would probably benefit from some schema, which would go part of the way towards jupyterlab/jupyterlab#6013.