koki / short

Manageable Kubernetes manifests through a composable, reusable syntax
https://docs.koki.io/short
Apache License 2.0
122 stars 14 forks source link

catching typos by looking for extraneous JSON fields, fixing tests #140

Closed ublubu closed 6 years ago

ublubu commented 6 years ago

in this PR: objutils.ExtraneousFieldPaths, used to check for JSON fields that aren't used during parsing.

It isn't implemented as part of the JSON decoder because we can't control which JSON library the kube-native decoder uses.

135 @wlan0

not in this PR: custom JSON library that annotates errors with the "path" where they occurred. (works, but json tests need to be cleaned up) better formatting of errors with context, i.e. util.ContextualizeErrorf (not started yet)

wlan0 commented 6 years ago

Pls rebase

ublubu commented 6 years ago

rebased. all commits were previously merged (#148)