Package com.babelqueue.schema
Class SensitivePaths
java.lang.Object
com.babelqueue.schema.SensitivePaths
Extracts the
x-gdpr-sensitive marks (ADR-0030) from a decoded JSON Schema. It walks the
same raw schema Map the PayloadValidator validates against — the Java schema model
is the decoded Map/List/scalar tree, so there is nothing extra to parse — and
returns every marked property as a SensitivePath, in sorted path order.
x-gdpr-sensitive is a validation-neutral extension keyword: it never makes a
value valid or invalid (the validator ignores unknown keywords), so annotating a schema with it is
never a breaking change (GR-1). It is recognised in two shapes, matching the Go reference and the
babelqueue-registry parser:
- the boolean
true→ sensitive, empty category; - a non-empty string → sensitive, that string as the category (e.g.
"email").
false, "", a number — leaves the property unmarked.
The walk descends nested objects (dotted paths, e.g. profile.full_name), array item
schemas (the "field[]" segment, e.g. addresses[].line), and reports a mark on the
root schema itself as the empty path "". The Java mirror of the Go
schema.Schema.SensitivePaths.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
KEYWORD
The extension keyword that marks a property as carrying personal/sensitive data.- See Also:
-
-
Method Details
-
of
Every property markedx-gdpr-sensitiveinschema, in sorted path order.- Parameters:
schema- a decoded JSON Schema (Map);nullyields an empty list- Returns:
- the sensitive paths, sorted by path
-