@tracepass/dpp-schemas 0.4.0 → 0.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +10 -1
- package/package.json +1 -1
- package/schema.json +2 -2
package/README.md
CHANGED
|
@@ -118,7 +118,8 @@ are `"day"` or `"year"`; absent means `"day"`:
|
|
|
118
118
|
- **`"day"`** — a real statutory date. Battery is `2027-02-18`, set by ESPR Article 77.
|
|
119
119
|
- **`"year"`** — only the year is known, because the governing delegated or implementing
|
|
120
120
|
act is not yet adopted. The day and month are filler. **Do not render these as a
|
|
121
|
-
deadline.**
|
|
121
|
+
deadline.** Eleven of the twelve categories are currently `"year"`; only battery is
|
|
122
|
+
`"day"`.
|
|
122
123
|
|
|
123
124
|
```python
|
|
124
125
|
r = template["regulation"]
|
|
@@ -128,6 +129,14 @@ else:
|
|
|
128
129
|
print(f"DPP obligation from {r['effectiveDate']}") # "2027-02-18"
|
|
129
130
|
```
|
|
130
131
|
|
|
132
|
+
> **Upgrading from 0.3.x?** The date values did not change and no key was removed, so
|
|
133
|
+
> code that reads this data keeps working. One case does break: if you **vendored a copy
|
|
134
|
+
> of `schema.json` from 0.3.x** and validate 0.4.0 template data against it, eleven of
|
|
135
|
+
> the twelve templates are rejected — that version closed the `regulation` object with
|
|
136
|
+
> `additionalProperties: false`, so the new precision keys are refused. Take the
|
|
137
|
+
> `schema.json` shipped in this package alongside the data. From 0.4.1 the `regulation`
|
|
138
|
+
> object is open, so later additive keys will not do this again.
|
|
139
|
+
|
|
131
140
|
**`regulationRef`** is the reason this data is worth having. Every field says which
|
|
132
141
|
article and annex mandates it, so a compliance report can cite its source rather than
|
|
133
142
|
assert it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tracepass/dpp-schemas",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Machine-readable field specifications for EU Digital Product Passports (ESPR) \u2014 12 product categories, 937 fields, each traced to the article of EU law that mandates it. Pure JSON, no dependencies.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"digital-product-passport",
|
package/schema.json
CHANGED
|
@@ -42,14 +42,14 @@
|
|
|
42
42
|
},
|
|
43
43
|
"regulation": {
|
|
44
44
|
"type": "object",
|
|
45
|
-
"description": "The EU instrument that mandates this category's passport.",
|
|
45
|
+
"description": "The EU instrument that mandates this category's passport. Deliberately open to extra properties, unlike the rest of this schema: the regulatory picture gains detail as delegated and implementing acts land, and a closed object makes every additive key a breaking change for anyone validating newer data against a pinned older copy of this file. Adding a key here is a MINOR bump; removing or retyping one is MAJOR.",
|
|
46
46
|
"required": [
|
|
47
47
|
"name",
|
|
48
48
|
"number",
|
|
49
49
|
"effectiveDate",
|
|
50
50
|
"mandatoryDate"
|
|
51
51
|
],
|
|
52
|
-
"additionalProperties":
|
|
52
|
+
"additionalProperties": true,
|
|
53
53
|
"properties": {
|
|
54
54
|
"name": {
|
|
55
55
|
"type": "string",
|