@radicaltools/mcp 0.3.0 → 0.3.2

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.
Files changed (59) hide show
  1. package/README.md +7 -5
  2. package/dist/{chunk-Z7THA3L5.js → chunk-KEIZXREX.js} +68 -35
  3. package/dist/{elkLayout-TAUBPPVN.js → elkLayout-MFJXDTJG.js} +1 -1
  4. package/dist/hub-catalogue/concern/concern-api-collections.radical +1136 -0
  5. package/dist/hub-catalogue/concern/concern-api-errors.radical +1180 -0
  6. package/dist/hub-catalogue/concern/concern-api-evolution.radical +449 -210
  7. package/dist/hub-catalogue/concern/concern-api-idempotency.radical +1218 -0
  8. package/dist/hub-catalogue/concern/concern-api-resource-design.radical +1102 -0
  9. package/dist/hub-catalogue/concern/concern-api-style-guide.radical +1210 -0
  10. package/dist/hub-catalogue/concern/concern-architecture-style.radical +287 -131
  11. package/dist/hub-catalogue/concern/concern-audit-trail.radical +1096 -0
  12. package/dist/hub-catalogue/concern/concern-authentication.radical +247 -37
  13. package/dist/hub-catalogue/concern/concern-authorization.radical +311 -89
  14. package/dist/hub-catalogue/concern/concern-availability.radical +287 -63
  15. package/dist/hub-catalogue/concern/concern-backend-stack.radical +300 -381
  16. package/dist/hub-catalogue/concern/concern-backup-recovery.radical +385 -129
  17. package/dist/hub-catalogue/concern/concern-caching.radical +1294 -0
  18. package/dist/hub-catalogue/concern/concern-capacity.radical +194 -81
  19. package/dist/hub-catalogue/concern/concern-code-documentation.radical +1397 -0
  20. package/dist/hub-catalogue/concern/concern-code-quality-gate.radical +1409 -0
  21. package/dist/hub-catalogue/concern/concern-code-review-branching.radical +1416 -0
  22. package/dist/hub-catalogue/concern/concern-code-style.radical +1058 -0
  23. package/dist/hub-catalogue/concern/concern-communication-style.radical +473 -167
  24. package/dist/hub-catalogue/concern/concern-data-classification.radical +970 -0
  25. package/dist/hub-catalogue/concern/concern-data-consistency.radical +339 -308
  26. package/dist/hub-catalogue/concern/concern-data-store.radical +480 -158
  27. package/dist/hub-catalogue/concern/concern-decomposition.radical +260 -85
  28. package/dist/hub-catalogue/concern/concern-definition-of-done.radical +1214 -0
  29. package/dist/hub-catalogue/concern/concern-delivery-metrics.radical +966 -0
  30. package/dist/hub-catalogue/concern/concern-dependency-hygiene.radical +1345 -0
  31. package/dist/hub-catalogue/concern/concern-deployment.radical +343 -92
  32. package/dist/hub-catalogue/concern/concern-encryption.radical +339 -76
  33. package/dist/hub-catalogue/concern/concern-error-handling-logging.radical +1197 -0
  34. package/dist/hub-catalogue/concern/concern-eu-dora.radical +1321 -0
  35. package/dist/hub-catalogue/concern/concern-frontend-stack.radical +467 -160
  36. package/dist/hub-catalogue/concern/concern-incident-management.radical +1204 -0
  37. package/dist/hub-catalogue/concern/concern-infrastructure.radical +1300 -268
  38. package/dist/hub-catalogue/concern/concern-integration-resilience.radical +88 -51
  39. package/dist/hub-catalogue/concern/concern-messaging.radical +173 -140
  40. package/dist/hub-catalogue/concern/concern-module-boundaries.radical +162 -159
  41. package/dist/hub-catalogue/concern/concern-observability.radical +224 -275
  42. package/dist/hub-catalogue/concern/concern-operational-readiness.radical +1249 -0
  43. package/dist/hub-catalogue/concern/concern-personal-data.radical +637 -122
  44. package/dist/hub-catalogue/concern/concern-quality-priorities.radical +1091 -0
  45. package/dist/hub-catalogue/concern/concern-rate-limiting.radical +433 -141
  46. package/dist/hub-catalogue/concern/concern-release-versioning.radical +1358 -0
  47. package/dist/hub-catalogue/concern/concern-retention.radical +1399 -0
  48. package/dist/hub-catalogue/concern/concern-secrets.radical +332 -74
  49. package/dist/hub-catalogue/concern/concern-secure-coding.radical +1379 -0
  50. package/dist/hub-catalogue/concern/concern-secure-development.radical +1245 -0
  51. package/dist/hub-catalogue/concern/concern-security-detection.radical +1153 -0
  52. package/dist/hub-catalogue/concern/concern-supply-chain.radical +257 -183
  53. package/dist/hub-catalogue/concern/concern-technical-debt.radical +1450 -0
  54. package/dist/hub-catalogue/concern/concern-technology-lifecycle.radical +1145 -0
  55. package/dist/hub-catalogue/concern/concern-tenant-isolation.radical +271 -137
  56. package/dist/hub-catalogue/concern/concern-test-strategy.radical +243 -224
  57. package/dist/hub-catalogue/concern/concern-threat-modelling.radical +1143 -0
  58. package/dist/index.js +1893 -468
  59. package/package.json +1 -1
@@ -0,0 +1,1180 @@
1
+ {
2
+ "hub": {
3
+ "id": "concern-api-errors",
4
+ "category": "concern",
5
+ "name": "Errors",
6
+ "description": "What an error looks like to a caller of an HTTP API: the body's format, stable error codes, how validation errors are reported, and where the codes are documented. What must never reach a caller is decided in Error handling and logging conventions.",
7
+ "tags": [
8
+ "api",
9
+ "errors",
10
+ "problem details",
11
+ "rfc 9457",
12
+ "error codes",
13
+ "validation"
14
+ ],
15
+ "requiredMetamodel": "c4-ddd-governance-builtin",
16
+ "concern": {
17
+ "id": "api-errors",
18
+ "trigger": "LIST RELATIONS WHERE source.type != \"person\" AND target.external != true AND (target.type = \"container\" OR target.type = \"component\")",
19
+ "applyTo": "target",
20
+ "why": "other parts of the system or other systems call these elements, so what an error looks like to a caller has to be decided once for every operation they offer.",
21
+ "group": "api"
22
+ },
23
+ "sources": [
24
+ {
25
+ "title": "RFC 9457, Problem Details for HTTP APIs",
26
+ "url": "https://www.rfc-editor.org/rfc/rfc9457"
27
+ },
28
+ {
29
+ "title": "RFC 6901, JavaScript Object Notation (JSON) Pointer",
30
+ "url": "https://www.rfc-editor.org/rfc/rfc6901"
31
+ },
32
+ {
33
+ "title": "RFC 9110, HTTP Semantics (15. Status Codes)",
34
+ "url": "https://www.rfc-editor.org/rfc/rfc9110#name-status-codes"
35
+ },
36
+ {
37
+ "title": "Microsoft Azure REST API Guidelines: Handling errors",
38
+ "url": "https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#handling-errors"
39
+ },
40
+ {
41
+ "title": "Google AIP-193, Errors",
42
+ "url": "https://google.aip.dev/193"
43
+ },
44
+ {
45
+ "title": "google/rpc/error_details.proto (ErrorInfo, BadRequest, RequestInfo, Help)",
46
+ "url": "https://github.com/googleapis/googleapis/blob/master/google/rpc/error_details.proto"
47
+ },
48
+ {
49
+ "title": "Zalando RESTful API Guidelines: MUST support problem JSON [176], MUST not expose stack traces [177]",
50
+ "url": "https://opensource.zalando.com/restful-api-guidelines/#176"
51
+ },
52
+ {
53
+ "title": "OWASP Error Handling Cheat Sheet",
54
+ "url": "https://cheatsheetseries.owasp.org/cheatsheets/Error_Handling_Cheat_Sheet.html"
55
+ },
56
+ {
57
+ "title": "Spectral: custom rulesets",
58
+ "url": "https://github.com/stoplightio/spectral/blob/develop/docs/guides/4-custom-rulesets.md"
59
+ }
60
+ ],
61
+ "templateParams": [
62
+ {
63
+ "key": "FORMAT",
64
+ "title": "Error body",
65
+ "label": "What does an error look like to a caller?",
66
+ "hint": "Every client parses this body, so it is the one shape the whole API keeps. Follow the guide chosen in the API style guide pack: Zalando's guidelines ask for problem details, Microsoft's for its error object, Google's AIPs for google.rpc.Status. How the shape changes across versions is the API evolution pack's decision.",
67
+ "defaultValue": "problem-details",
68
+ "options": [
69
+ {
70
+ "value": "problem-details",
71
+ "label": "RFC 9457 problem details",
72
+ "description": "Every error is application/problem+json with type (a URI reference naming the problem), title, status, detail and instance, plus a stable code and the correlation id as extension members. Pick it for any HTTP API with more than one client or a public one, and whenever the chosen guide is Zalando's or your own: it is the IETF standard, and Spring, ASP.NET Core and most gateways write it already."
73
+ },
74
+ {
75
+ "value": "microsoft",
76
+ "label": "Microsoft's error object",
77
+ "description": "Every error is a JSON body {\"error\": {\"code\", \"message\", \"target\", \"details\", \"innererror\"}} with the code repeated in an x-ms-error-code header, as the Microsoft Azure REST API Guidelines require. Pick it when the chosen guide is Microsoft's, or the API sits beside Azure or Microsoft Graph APIs whose clients already parse that shape."
78
+ },
79
+ {
80
+ "value": "google",
81
+ "label": "google.rpc.Status as JSON",
82
+ "description": "Every error is a JSON body {\"error\": {\"code\", \"message\", \"status\", \"details\"}} where code is the HTTP status, status the google.rpc.Code name and details holds a google.rpc.ErrorInfo with a stable reason, as Google AIP-193 requires. Pick it when the chosen guide is Google's AIPs, or the API is gRPC transcoded to HTTP/JSON, where this is the shape the gateway speaks."
83
+ },
84
+ {
85
+ "value": "minimal",
86
+ "label": "a minimal body of status, code and message",
87
+ "description": "The HTTP status plus a JSON body holding only a stable code, a message and the correlation id. Pick it for an internal API with one client owned by the same team, where a standard shape buys nothing yet; moving to problem details later is a breaking change."
88
+ }
89
+ ]
90
+ },
91
+ {
92
+ "key": "CODES",
93
+ "title": "Error codes",
94
+ "label": "How does a client tell one error from another?",
95
+ "hint": "The status says what kind of failure it was; a code says which one. A code a client keys on is part of the contract, so it must be listed and must never change meaning.",
96
+ "defaultValue": "catalogue",
97
+ "options": [
98
+ {
99
+ "value": "catalogue",
100
+ "label": "a catalogue of stable codes, listed per operation",
101
+ "description": "Every error carries a machine-readable code from one catalogue kept with the OpenAPI document (ORDER_NOT_FOUND, PAYMENT_DECLINED), each operation lists the codes it may return, and a released code is never renamed or removed. Pick it when clients act differently on errors of the same status, or the API is public or used by partners."
102
+ },
103
+ {
104
+ "value": "status-only",
105
+ "label": "the HTTP status alone",
106
+ "description": "Clients key on the HTTP status only; where the format has a code field it holds the status's reason phrase (NOT_FOUND, INTERNAL_SERVER_ERROR), and problem details use type about:blank. Pick it for an internal API whose one client treats every error of a status the same, so a catalogue would be paperwork."
107
+ }
108
+ ]
109
+ },
110
+ {
111
+ "key": "VALIDATION",
112
+ "title": "Invalid input",
113
+ "label": "How are invalid fields in a request reported?",
114
+ "hint": "A client that fills a form wants to mark every wrong field at once; one that only logs the failure needs just the first.",
115
+ "defaultValue": "all",
116
+ "options": [
117
+ {
118
+ "value": "all",
119
+ "label": "every field error in one response",
120
+ "description": "One response lists every invalid field of the request body, each with its location (a JSON Pointer, RFC 6901, or the dotted field path of google.rpc.BadRequest) and a field-level code. Pick it whenever a person fills the request in through a form, and as the default for any public API."
121
+ },
122
+ {
123
+ "value": "first",
124
+ "label": "the first field error only",
125
+ "description": "Validation stops at the first invalid field and the response names that one, with its location and code. Pick it for machine-to-machine APIs whose callers build requests in code and treat any invalid request as a bug."
126
+ }
127
+ ]
128
+ },
129
+ {
130
+ "key": "DOCS",
131
+ "title": "Code documentation",
132
+ "label": "Where does a developer read what a code means?",
133
+ "hint": "Only when codes come from a catalogue: with the HTTP status alone there is nothing beyond the status to document, and this answer decides nothing. RFC 9457 suggests type URIs that resolve to a page; Zalando deliberately keeps them as identifiers documented in the OpenAPI document.",
134
+ "defaultValue": "page",
135
+ "options": [
136
+ {
137
+ "value": "page",
138
+ "label": "a documentation page per code",
139
+ "description": "Every code has a public page under one base URL (when it happens, what the caller should do), which the problem details type URI or a google.rpc.Help link points to. Pick it for public and partner APIs, where the developer who hits an error is not the one who read the reference."
140
+ },
141
+ {
142
+ "value": "identifiers",
143
+ "label": "identifiers documented in the OpenAPI document only",
144
+ "description": "Codes and type URIs are identifiers that do not resolve (type /problems/order-not-found); each code is described in the catalogue and published with the OpenAPI document beside the operations that return it. Pick it for internal APIs, or when a separate documentation site would fall out of step with the contract, as the Zalando guidelines argue."
145
+ }
146
+ ]
147
+ },
148
+ {
149
+ "key": "CODE_PATTERN",
150
+ "label": "Regular expression every error code and field-level code matches",
151
+ "defaultValue": "^[A-Z][A-Z0-9_]*[A-Z0-9]$"
152
+ },
153
+ {
154
+ "key": "VALIDATION_STATUS",
155
+ "label": "Status of a response to a request body that fails validation (400, or 422 for content that parses but breaks a rule)",
156
+ "defaultValue": "400",
157
+ "type": "number"
158
+ },
159
+ {
160
+ "key": "GENERIC_MESSAGE",
161
+ "label": "Text every unexpected (5xx) error gives its caller",
162
+ "defaultValue": "An unexpected error occurred. Quote the trace id of this response when you contact support."
163
+ },
164
+ {
165
+ "key": "ERROR_DOCS_URL",
166
+ "label": "Base URL of the error code pages (a documentation page per code only)",
167
+ "defaultValue": "https://developer.example.com/errors/"
168
+ }
169
+ ]
170
+ },
171
+ "nodes": [
172
+ {
173
+ "id": "need",
174
+ "type": "need",
175
+ "label": "Errors a caller can act on",
176
+ "x": 0,
177
+ "y": 0,
178
+ "kind": "brief",
179
+ "source": "Hub concern pack: Errors",
180
+ "description": "Every client of this API has to handle its errors in code: tell one failure from another without parsing prose, mark every wrong field for its user, and quote one id to support. That only works if every operation answers errors in one documented shape, with codes that keep their meaning and text written for the caller rather than copied from an exception. The snippets assume one OpenAPI document per API under api/ (api/orders.yaml), the error code catalogue at api/errors/codes.yaml, the error rules in api/style/errors.yaml beside the style ruleset the API style guide pack keeps, the app exported from src/app (an Express app, with test-only routes: GET /__boom throws an unexpected error and GET /__expected an expected one, both with the text in the ERROR_MARK variable), POST /orders validating email, items[].quantity and currency, and the tests under test/ run with NODE_ENV=production."
181
+ },
182
+ {
183
+ "id": "req-problem-details",
184
+ "type": "requirement",
185
+ "label": "Errors answered as problem details",
186
+ "x": 260,
187
+ "y": 0,
188
+ "ears_type": "event-driven",
189
+ "trigger": "an operation answers with a 4xx or 5xx status",
190
+ "action": "send a body of media type application/problem+json holding type (a URI reference), title, status equal to the response's status, detail, instance, and as extension members a code matching {{CODE_PATTERN}} and the correlation id under the field set in Error handling and logging conventions; where codes are the HTTP status alone, type is about:blank and title the status's reason phrase",
191
+ "rationale": "One standard shape lets every client parse every error with one library, and the extension members carry what the five standard ones do not; clients must ignore extensions they do not know, so adding one breaks nobody (RFC 9457, sections 3.1, 3.2 and 4.2.1; Zalando guidelines, rule 176).",
192
+ "hubWhen": {
193
+ "FORMAT": [
194
+ "problem-details"
195
+ ]
196
+ }
197
+ },
198
+ {
199
+ "id": "req-microsoft-error",
200
+ "type": "requirement",
201
+ "label": "Errors answered as Microsoft's error object",
202
+ "x": 260,
203
+ "y": 130,
204
+ "ears_type": "event-driven",
205
+ "trigger": "an operation answers with a 4xx or 5xx status",
206
+ "action": "send a JSON body whose only top-level member is error, an object holding code (matching {{CODE_PATTERN}}), message, and where they apply target and details (each an object of the same shape), with the correlation id as a property of error under the field set in Error handling and logging conventions; repeat the code in an x-ms-error-code header, and send no innererror with production settings",
207
+ "rationale": "The guidelines make the top-level code and the header the contract and leave the other fields free; innererror is for debugging detail, which belongs in the log, not in the answer (Microsoft Azure REST API Guidelines, Handling errors; OWASP Error Handling Cheat Sheet).",
208
+ "hubWhen": {
209
+ "FORMAT": [
210
+ "microsoft"
211
+ ]
212
+ }
213
+ },
214
+ {
215
+ "id": "req-google-status",
216
+ "type": "requirement",
217
+ "label": "Errors answered as google.rpc.Status",
218
+ "x": 260,
219
+ "y": 260,
220
+ "ears_type": "event-driven",
221
+ "trigger": "an operation answers with a 4xx or 5xx status",
222
+ "action": "send a JSON body whose only top-level member is error, holding code (the HTTP status), status (the google.rpc.Code name, such as NOT_FOUND or INTERNAL), message, and details with exactly one google.rpc.ErrorInfo (reason matching {{CODE_PATTERN}}, domain the service's name) and one google.rpc.RequestInfo whose requestId is the correlation id, no detail type twice",
223
+ "rationale": "AIP-193 requires an ErrorInfo in every error and keeps its reason and domain stable as the machine-readable identity of the error; RequestInfo is the detail meant for the id a client quotes when it reports a problem (Google AIP-193; google/rpc/error_details.proto).",
224
+ "hubWhen": {
225
+ "FORMAT": [
226
+ "google"
227
+ ]
228
+ }
229
+ },
230
+ {
231
+ "id": "req-minimal",
232
+ "type": "requirement",
233
+ "label": "Errors answered as status, code and message",
234
+ "x": 260,
235
+ "y": 390,
236
+ "ears_type": "event-driven",
237
+ "trigger": "an operation answers with a 4xx or 5xx status",
238
+ "action": "send a JSON body holding only code (matching {{CODE_PATTERN}}), message and the correlation id under the field set in Error handling and logging conventions, plus the list of field errors when the request failed validation, and nothing else",
239
+ "rationale": "A client owned by the same team needs a code to key on and an id to quote; every further field is one more thing to keep stable and one more place for internals to slip out (OWASP Error Handling Cheat Sheet).",
240
+ "hubWhen": {
241
+ "FORMAT": [
242
+ "minimal"
243
+ ]
244
+ }
245
+ },
246
+ {
247
+ "id": "req-correlation",
248
+ "type": "requirement",
249
+ "label": "Every error carries the request's id",
250
+ "x": 260,
251
+ "y": 520,
252
+ "ears_type": "event-driven",
253
+ "trigger": "an operation answers with a 4xx or 5xx status",
254
+ "action": "carry in the error body the correlation id of the request (the trace id of an incoming traceparent header, or the id created at the edge when there is none), in the place the error format gives it and under the field set in Error handling and logging conventions",
255
+ "rationale": "The id in the answer is what a client quotes to support and what finds the one log line of that failure among millions; without it a report of an error cannot be traced (RFC 9457, section 3.2 extension members; google.rpc.RequestInfo; OWASP Error Handling Cheat Sheet)."
256
+ },
257
+ {
258
+ "id": "req-caller-text",
259
+ "type": "requirement",
260
+ "label": "Error text written for the caller",
261
+ "x": 260,
262
+ "y": 650,
263
+ "ears_type": "unwanted-behaviour",
264
+ "unwanted_condition": "an error is caused by an exception, a driver error or an upstream system's answer",
265
+ "action": "fill the human-readable text of the error body (detail, message) only with text written for callers (the code's catalogue entry, or the operation's own wording), never with the exception's or upstream's message, and give every 5xx error the fixed text \"{{GENERIC_MESSAGE}}\"",
266
+ "rationale": "An exception's message is written for the developer and describes the code, not what the caller should do; passing it through also passes on whatever it names. The leak of stack traces, class names and SQL is ruled out in Error handling and logging conventions; this rules out the text (OWASP Error Handling Cheat Sheet; RFC 9457, section 4: not a debugging tool)."
267
+ },
268
+ {
269
+ "id": "req-documented",
270
+ "type": "requirement",
271
+ "label": "Error responses documented per operation",
272
+ "x": 260,
273
+ "y": 780,
274
+ "ears_type": "ubiquitous",
275
+ "action": "document in the OpenAPI document, for every operation, at least one 4xx response and a default response, each with its content described, so that 0 operations leave a caller to guess what their errors look like",
276
+ "rationale": "Clients are generated from the document; an error response it does not describe is one the client has no type for (Zalando guidelines, rule 151, MUST specify success and error responses; Microsoft Azure REST API Guidelines, Handling errors)."
277
+ },
278
+ {
279
+ "id": "req-codes",
280
+ "type": "requirement",
281
+ "label": "Codes come from one catalogue",
282
+ "x": 260,
283
+ "y": 910,
284
+ "ears_type": "ubiquitous",
285
+ "action": "take every error code from the one catalogue api/errors/codes.yaml (each code matching {{CODE_PATTERN}}, with its status of at least 400, a title and a description), list in each operation's x-error-codes the codes it may return, and never rename or remove a released code",
286
+ "rationale": "A client keys on codes, so a code is part of the contract: renamed or removed, it breaks callers silently, and a code returned but never listed is one no client was written for (Microsoft Azure REST API Guidelines: error codes are part of the API contract; Google AIP-193: the same reason and domain for the same error, consistent over time).",
287
+ "hubWhen": {
288
+ "CODES": [
289
+ "catalogue"
290
+ ]
291
+ }
292
+ },
293
+ {
294
+ "id": "req-status-only",
295
+ "type": "requirement",
296
+ "label": "Errors keyed on the status alone",
297
+ "x": 260,
298
+ "y": 1040,
299
+ "ears_type": "ubiquitous",
300
+ "action": "give every error the code of its HTTP status where the format has a code field (the status's reason phrase in upper snake case: NOT_FOUND, UNPROCESSABLE_CONTENT, INTERNAL_SERVER_ERROR), and in problem details the type about:blank, so that no code carries more than the status does",
301
+ "rationale": "With one client that treats every error of a status alike, a code that only repeats the status is honest about what the client may rely on; about:blank is the type RFC 9457 defines for exactly that (RFC 9457, section 4.2.1; RFC 9110, section 15).",
302
+ "hubWhen": {
303
+ "CODES": [
304
+ "status-only"
305
+ ]
306
+ }
307
+ },
308
+ {
309
+ "id": "req-validation-all",
310
+ "type": "requirement",
311
+ "label": "Every invalid field reported at once",
312
+ "x": 260,
313
+ "y": 1170,
314
+ "ears_type": "event-driven",
315
+ "trigger": "a request body fails validation",
316
+ "action": "answer {{VALIDATION_STATUS}} listing every invalid field in one response, each with its location (a JSON Pointer per RFC 6901 into the body; the dotted field path of google.rpc.BadRequest in that format) and a field-level code matching {{CODE_PATTERN}}",
317
+ "rationale": "A user who submits a form with three mistakes should learn of all three at once, and a client can only mark the fields if it can locate them; RFC 9457 shows exactly this list of detail and pointer (RFC 9457, section 3; RFC 6901; google.rpc.BadRequest field violations).",
318
+ "hubWhen": {
319
+ "VALIDATION": [
320
+ "all"
321
+ ]
322
+ }
323
+ },
324
+ {
325
+ "id": "req-validation-first",
326
+ "type": "requirement",
327
+ "label": "First invalid field reported",
328
+ "x": 260,
329
+ "y": 1300,
330
+ "ears_type": "event-driven",
331
+ "trigger": "a request body fails validation",
332
+ "action": "answer {{VALIDATION_STATUS}} naming only the first invalid field found, with its location (a JSON Pointer per RFC 6901 into the body; the dotted field path of google.rpc.BadRequest in that format) and a field-level code matching {{CODE_PATTERN}}, in the place the format keeps field errors",
333
+ "rationale": "A caller that builds requests in code fixes a bug, not a form; one located error is enough to find it, and stopping early keeps validation simple (RFC 6901; RFC 9110, section 15.5.1).",
334
+ "hubWhen": {
335
+ "VALIDATION": [
336
+ "first"
337
+ ]
338
+ }
339
+ },
340
+ {
341
+ "id": "req-docs-page",
342
+ "type": "requirement",
343
+ "label": "A page for every code",
344
+ "x": 260,
345
+ "y": 1430,
346
+ "ears_type": "ubiquitous",
347
+ "action": "publish for every code of the catalogue a page at {{ERROR_DOCS_URL}} followed by the code in lower case with dashes (ORDER_NOT_FOUND at order-not-found), reachable without signing in and answering 200 with HTML that names the code",
348
+ "rationale": "The developer who meets an error is often not the one who read the reference; a type URI that resolves to human-readable documentation is what RFC 9457 recommends, and AIP-193 requires the links of a publicly documented service to be reachable without authentication (RFC 9457, sections 3.1.1 and 4; Google AIP-193, Help).",
349
+ "hubWhen": {
350
+ "CODES": [
351
+ "catalogue"
352
+ ],
353
+ "DOCS": [
354
+ "page"
355
+ ]
356
+ }
357
+ },
358
+ {
359
+ "id": "req-docs-identifiers",
360
+ "type": "requirement",
361
+ "label": "Codes documented in the contract",
362
+ "x": 260,
363
+ "y": 1560,
364
+ "ears_type": "ubiquitous",
365
+ "action": "document every code in its catalogue entry with a description of when it happens and what the caller should do, published with the OpenAPI document beside the operations whose x-error-codes list it",
366
+ "rationale": "An identifier that does not resolve is fine when the contract itself explains it; the Zalando guidelines keep type URIs as identifiers precisely so that the documentation lives in the OpenAPI document and cannot drift from it (Zalando guidelines, rule 176; RFC 9457, section 3.1.1: the type URI may be non-resolvable).",
367
+ "hubWhen": {
368
+ "CODES": [
369
+ "catalogue"
370
+ ],
371
+ "DOCS": [
372
+ "identifiers"
373
+ ]
374
+ }
375
+ },
376
+ {
377
+ "id": "sc-problem-details",
378
+ "type": "scenario",
379
+ "label": "Not found and crash answered as problems",
380
+ "x": 520,
381
+ "y": 0,
382
+ "given": "the element running with production settings",
383
+ "when": "an order that does not exist is requested and a route that throws an unexpected error is called, both with a traceparent header",
384
+ "then": "both answers are application/problem+json with type, title, status equal to the response's, detail, instance, a code matching {{CODE_PATTERN}} and the trace id of the traceparent",
385
+ "hubWhen": {
386
+ "FORMAT": [
387
+ "problem-details"
388
+ ]
389
+ }
390
+ },
391
+ {
392
+ "id": "sc-microsoft-error",
393
+ "type": "scenario",
394
+ "label": "Not found and crash answered as error objects",
395
+ "x": 520,
396
+ "y": 130,
397
+ "given": "the element running with production settings",
398
+ "when": "an order that does not exist is requested and a route that throws an unexpected error is called, both with a traceparent header",
399
+ "then": "both answers are JSON with only the member error, whose code matches {{CODE_PATTERN}} and equals the x-ms-error-code header, which has a message and the trace id of the traceparent, and no innererror",
400
+ "hubWhen": {
401
+ "FORMAT": [
402
+ "microsoft"
403
+ ]
404
+ }
405
+ },
406
+ {
407
+ "id": "sc-google-status",
408
+ "type": "scenario",
409
+ "label": "Not found and crash answered as statuses",
410
+ "x": 520,
411
+ "y": 260,
412
+ "given": "the element running with production settings",
413
+ "when": "an order that does not exist is requested and a route that throws an unexpected error is called, both with a traceparent header",
414
+ "then": "both answers are JSON with only the member error, whose code equals the response's status, whose status is a google.rpc.Code name, and whose details hold one ErrorInfo with a reason matching {{CODE_PATTERN}} and one RequestInfo with the trace id of the traceparent",
415
+ "hubWhen": {
416
+ "FORMAT": [
417
+ "google"
418
+ ]
419
+ }
420
+ },
421
+ {
422
+ "id": "sc-minimal",
423
+ "type": "scenario",
424
+ "label": "Not found and crash answered minimally",
425
+ "x": 520,
426
+ "y": 390,
427
+ "given": "the element running with production settings",
428
+ "when": "an order that does not exist is requested and a route that throws an unexpected error is called, both with a traceparent header",
429
+ "then": "both answers are JSON with exactly the fields code, message and the correlation field, the code matching {{CODE_PATTERN}} and the id the trace id of the traceparent",
430
+ "hubWhen": {
431
+ "FORMAT": [
432
+ "minimal"
433
+ ]
434
+ }
435
+ },
436
+ {
437
+ "id": "sc-correlation",
438
+ "type": "scenario",
439
+ "label": "Trace id handed back",
440
+ "x": 520,
441
+ "y": 520,
442
+ "given": "a request with the traceparent 00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01",
443
+ "when": "it fails with a 404 and another fails with a 500",
444
+ "then": "both error bodies carry 4bf92f3577b34da6a3ce929d0e0e4736 as the correlation id"
445
+ },
446
+ {
447
+ "id": "sc-caller-text",
448
+ "type": "scenario",
449
+ "label": "Exception text stays inside",
450
+ "x": 520,
451
+ "y": 650,
452
+ "given": "a route that throws an unexpected error and one that throws an expected error, both with a random marker in their message",
453
+ "when": "each is called with production settings",
454
+ "then": "neither answer holds the marker, and the 500 answer holds \"{{GENERIC_MESSAGE}}\""
455
+ },
456
+ {
457
+ "id": "sc-documented",
458
+ "type": "scenario",
459
+ "label": "Undocumented errors refused",
460
+ "x": 520,
461
+ "y": 780,
462
+ "given": "a pull request adding an operation with only a 200 response, and one whose 404 response has no content",
463
+ "when": "the Spectral rules run on the OpenAPI documents",
464
+ "then": "both fail, naming the operation and the missing response or content"
465
+ },
466
+ {
467
+ "id": "sc-codes",
468
+ "type": "scenario",
469
+ "label": "Unknown and renamed codes refused",
470
+ "x": 520,
471
+ "y": 910,
472
+ "given": "a pull request that lists a code on an operation that the catalogue lacks, and another that renames a code in the catalogue",
473
+ "when": "the catalogue test runs",
474
+ "then": "the first fails naming the operation and the code, the second fails the snapshot of the codes",
475
+ "hubWhen": {
476
+ "CODES": [
477
+ "catalogue"
478
+ ]
479
+ }
480
+ },
481
+ {
482
+ "id": "sc-status-only",
483
+ "type": "scenario",
484
+ "label": "Status names the error",
485
+ "x": 520,
486
+ "y": 1040,
487
+ "given": "the element running with production settings",
488
+ "when": "an order that does not exist is requested and a route that throws an unexpected error is called",
489
+ "then": "the first answer is 404 with the code NOT_FOUND and the second 500 with INTERNAL_SERVER_ERROR, and a problem details type is about:blank",
490
+ "hubWhen": {
491
+ "CODES": [
492
+ "status-only"
493
+ ]
494
+ }
495
+ },
496
+ {
497
+ "id": "sc-validation-all",
498
+ "type": "scenario",
499
+ "label": "Three mistakes, one answer",
500
+ "x": 520,
501
+ "y": 1170,
502
+ "given": "a new order with an invalid e-mail address, a quantity of 0 in its first item and an unknown currency",
503
+ "when": "it is posted",
504
+ "then": "the answer is {{VALIDATION_STATUS}} and lists exactly three field errors, located at the e-mail address, the first item's quantity and the currency, each with a code matching {{CODE_PATTERN}}",
505
+ "hubWhen": {
506
+ "VALIDATION": [
507
+ "all"
508
+ ]
509
+ }
510
+ },
511
+ {
512
+ "id": "sc-validation-first",
513
+ "type": "scenario",
514
+ "label": "Three mistakes, the first reported",
515
+ "x": 520,
516
+ "y": 1300,
517
+ "given": "a new order with an invalid e-mail address, a quantity of 0 in its first item and an unknown currency",
518
+ "when": "it is posted",
519
+ "then": "the answer is {{VALIDATION_STATUS}} and lists exactly one field error, with a location and a code matching {{CODE_PATTERN}}",
520
+ "hubWhen": {
521
+ "VALIDATION": [
522
+ "first"
523
+ ]
524
+ }
525
+ },
526
+ {
527
+ "id": "sc-docs-page",
528
+ "type": "scenario",
529
+ "label": "Every code has its page",
530
+ "x": 520,
531
+ "y": 1430,
532
+ "given": "the catalogue and the published documentation site",
533
+ "when": "the page of each code is fetched",
534
+ "then": "every page answers 200 with HTML that names its code; a code added without a page fails the check",
535
+ "hubWhen": {
536
+ "CODES": [
537
+ "catalogue"
538
+ ],
539
+ "DOCS": [
540
+ "page"
541
+ ]
542
+ }
543
+ },
544
+ {
545
+ "id": "sc-docs-identifiers",
546
+ "type": "scenario",
547
+ "label": "Undescribed code refused",
548
+ "x": 520,
549
+ "y": 1560,
550
+ "given": "a pull request adding a code to the catalogue without a description",
551
+ "when": "the catalogue test runs",
552
+ "then": "it fails naming the code",
553
+ "hubWhen": {
554
+ "CODES": [
555
+ "catalogue"
556
+ ],
557
+ "DOCS": [
558
+ "identifiers"
559
+ ]
560
+ }
561
+ },
562
+ {
563
+ "id": "adr-problem-details",
564
+ "type": "adr",
565
+ "label": "Errors are RFC 9457 problem details",
566
+ "x": 780,
567
+ "y": 0,
568
+ "concern": "api-errors",
569
+ "status": "accepted",
570
+ "date": "",
571
+ "context": "Other parts of the system or other systems call this element's HTTP API, and every one of them has to handle its errors in code. The forces: a client can only act on what it can parse, so an error body that changes shape from one operation to the next is handled by string matching or not at all; the HTTP status alone does not tell \"order not found\" from \"customer not found\", so clients that need to tell them apart need a code that never changes meaning; a form that shows one invalid field per round trip costs the user a submit per mistake; a message copied from an exception tells the caller about the code, not about what to do; a code nobody documented is a support ticket; and a published guide (Zalando, Microsoft, Google) already fixes a shape, which costs nothing to follow and a lot to argue with. What never reaches a caller (stack traces, class names, SQL, paths, hosts) and the correlation field are decided in Error handling and logging conventions, which this pack takes as given; conflicts and failed preconditions (409, 412) in Idempotency and concurrency, 429 in Rate limiting, and how the error shape changes across versions in API evolution.",
572
+ "decision": "Every error response is application/problem+json (RFC 9457): type (a URI reference naming the problem), title, status (equal to the response's), detail (text written for the caller, \"{{GENERIC_MESSAGE}}\" for every 5xx), instance (the request path), plus two extension members: code, matching {{CODE_PATTERN}}, and the correlation id under the field set in Error handling and logging conventions. Field errors go in an errors extension member, an array of { pointer, code, detail } with pointer a JSON Pointer (RFC 6901) into the body, as RFC 9457 section 3 shows. Codes: {{CODES}}. Invalid input: {{VALIDATION}}, answered {{VALIDATION_STATUS}}. Where codes come from a catalogue, what a code means is read in {{DOCS}}: with a page per code the type is that page's URL under {{ERROR_DOCS_URL}}; with identifiers it is the relative reference /problems/<code in lower case with dashes>, never resolved, as the Zalando guidelines do. The one error handler of Error handling and logging conventions writes the body: Spring Framework 6 ProblemDetail with a @ControllerAdvice extending ResponseEntityExceptionHandler, ASP.NET Core AddProblemDetails() with a custom InvalidModelStateResponseFactory for the errors array, a FastAPI exception handler, or a small mapper in src/http/problem.ts for Express. Every operation documents a default response with the Problem schema in the OpenAPI document. Statuses follow RFC 9110; conflicts and failed preconditions (409, 412) are decided in Idempotency and concurrency, 429 in Rate limiting, and how this shape evolves across versions in API evolution.",
573
+ "consequences": "• One shape for every error, a standard with libraries on every major stack, and a type field clients can switch on.\n• Clients that send Accept: application/json only may get problem+json anyway; some HTTP clients do not parse +json as JSON, which the Zalando guidelines warn about.\n• ASP.NET Core's ValidationProblemDetails writes errors as a map of field names to messages, not the pointer array; it has to be replaced, and so does any framework default that differs.\n• The code and the correlation id are extension members: standard parsers keep them, but a client must know their names.",
574
+ "alternatives": "1. Microsoft's error object: equally complete, but a shape of one vendor's guide, and no type URI to document.\n2. google.rpc.Status as JSON: natural behind a gRPC gateway, verbose over plain HTTP.\n3. A minimal body: less to build now, and a breaking change the day a second client needs more.",
575
+ "hubWhen": {
576
+ "FORMAT": [
577
+ "problem-details"
578
+ ]
579
+ }
580
+ },
581
+ {
582
+ "id": "adr-microsoft-error",
583
+ "type": "adr",
584
+ "label": "Errors are Microsoft's error object",
585
+ "x": 780,
586
+ "y": 130,
587
+ "concern": "api-errors",
588
+ "status": "accepted",
589
+ "date": "",
590
+ "context": "Other parts of the system or other systems call this element's HTTP API, and every one of them has to handle its errors in code. The forces: a client can only act on what it can parse, so an error body that changes shape from one operation to the next is handled by string matching or not at all; the HTTP status alone does not tell \"order not found\" from \"customer not found\", so clients that need to tell them apart need a code that never changes meaning; a form that shows one invalid field per round trip costs the user a submit per mistake; a message copied from an exception tells the caller about the code, not about what to do; a code nobody documented is a support ticket; and a published guide (Zalando, Microsoft, Google) already fixes a shape, which costs nothing to follow and a lot to argue with. What never reaches a caller (stack traces, class names, SQL, paths, hosts) and the correlation field are decided in Error handling and logging conventions, which this pack takes as given; conflicts and failed preconditions (409, 412) in Idempotency and concurrency, 429 in Rate limiting, and how the error shape changes across versions in API evolution.",
591
+ "decision": "Every error response is application/json {\"error\": {\"code\", \"message\", \"target\", \"details\", \"innererror\"}} as the Microsoft Azure REST API Guidelines define it: code matching {{CODE_PATTERN}} and repeated in the x-ms-error-code header, message written for the caller (\"{{GENERIC_MESSAGE}}\" for every 5xx), target naming what failed, details an array of error objects of the same shape, and the correlation id as a property of error under the field set in Error handling and logging conventions. innererror is never sent with production settings: what it would hold goes to the log. Field errors are entries of details with code, message and target, the target a JSON Pointer (RFC 6901) into the body. Codes: {{CODES}}. Invalid input: {{VALIDATION}}, answered {{VALIDATION_STATUS}}. Where codes come from a catalogue, what a code means is read in {{DOCS}} (with a page per code, at {{ERROR_DOCS_URL}}<code in lower case with dashes>, linked from the code's description in the OpenAPI document). The one error handler of Error handling and logging conventions writes the body: an ASP.NET Core exception handler and InvalidModelStateResponseFactory, a Spring @ControllerAdvice, or an Express error handler in src/http. Every operation documents a default response with the error schema in the OpenAPI document. Statuses follow RFC 9110; conflicts and failed preconditions (409, 412) are decided in Idempotency and concurrency, 429 in Rate limiting, and how this shape evolves across versions in API evolution.",
592
+ "consequences": "• Clients of Azure and Microsoft Graph APIs parse it already, and the header lets a gateway or log read the code without the body.\n• No framework writes it by default; the handler and the validation response are ours to build and keep.\n• The guidelines treat only the top-level code as contract; target and details may change, so clients must not key on them.\n• Adding a top-level code is, in the guidelines' words, a change that needs a new service version, which the API evolution pack decides.",
593
+ "alternatives": "1. RFC 9457 problem details: the standard with framework support everywhere.\n2. google.rpc.Status as JSON: the other big vendor's shape, natural behind gRPC.\n3. A minimal body: simpler, but no place for field errors beyond a list of our own.",
594
+ "hubWhen": {
595
+ "FORMAT": [
596
+ "microsoft"
597
+ ]
598
+ }
599
+ },
600
+ {
601
+ "id": "adr-google-status",
602
+ "type": "adr",
603
+ "label": "Errors are google.rpc.Status as JSON",
604
+ "x": 780,
605
+ "y": 260,
606
+ "concern": "api-errors",
607
+ "status": "accepted",
608
+ "date": "",
609
+ "context": "Other parts of the system or other systems call this element's HTTP API, and every one of them has to handle its errors in code. The forces: a client can only act on what it can parse, so an error body that changes shape from one operation to the next is handled by string matching or not at all; the HTTP status alone does not tell \"order not found\" from \"customer not found\", so clients that need to tell them apart need a code that never changes meaning; a form that shows one invalid field per round trip costs the user a submit per mistake; a message copied from an exception tells the caller about the code, not about what to do; a code nobody documented is a support ticket; and a published guide (Zalando, Microsoft, Google) already fixes a shape, which costs nothing to follow and a lot to argue with. What never reaches a caller (stack traces, class names, SQL, paths, hosts) and the correlation field are decided in Error handling and logging conventions, which this pack takes as given; conflicts and failed preconditions (409, 412) in Idempotency and concurrency, 429 in Rate limiting, and how the error shape changes across versions in API evolution.",
610
+ "decision": "Every error response is application/json {\"error\": {\"code\", \"message\", \"status\", \"details\"}}, the HTTP/JSON form of google.rpc.Status that Google AIP-193 defines: code is the HTTP status, status the google.rpc.Code name (NOT_FOUND, INVALID_ARGUMENT, INTERNAL), message written for the developer (\"{{GENERIC_MESSAGE}}\" for every 5xx), and details a list of typed messages, each type at most once: one google.rpc.ErrorInfo always (reason matching {{CODE_PATTERN}}, domain the service's name, metadata for the values the message names), one google.rpc.RequestInfo whose requestId is the correlation id, a google.rpc.BadRequest whose fieldViolations hold the field errors (field the dotted path, reason the field-level code), and, with a page per code, a google.rpc.Help link to it. Codes: {{CODES}}. Invalid input: {{VALIDATION}}, answered {{VALIDATION_STATUS}}. Where codes come from a catalogue, what a code means is read in {{DOCS}} (with a page per code, at {{ERROR_DOCS_URL}}<code in lower case with dashes>). The details are built from the google.rpc types (api-common-protos; com.google.rpc in proto-google-common-protos for Java); behind grpc-gateway the default error handler writes the bare Status with the gRPC code, so runtime.WithErrorHandler is set to write this form. Every operation documents a default response with the Status schema in the OpenAPI document. Statuses follow RFC 9110; conflicts and failed preconditions (409, 412) are decided in Idempotency and concurrency, 429 in Rate limiting, and how this shape evolves across versions in API evolution.",
611
+ "consequences": "• Identical errors over gRPC and HTTP, and clients of Google APIs parse it already.\n• Verbose: three typed details in every error, each with an @type URL.\n• Field paths are dotted protobuf paths (items[0].quantity), not JSON Pointers; a client that expects pointers needs a converter.\n• AIP-193 makes reason, domain and the metadata keys permanent once sent: a key may get an empty value, never disappear.",
612
+ "alternatives": "1. RFC 9457 problem details: lighter over plain HTTP, but a second shape beside gRPC's own.\n2. Microsoft's error object: no typed details, a vendor shape all the same.\n3. The bare Status grpc-gateway writes by default: the gRPC code where clients expect the HTTP status.",
613
+ "hubWhen": {
614
+ "FORMAT": [
615
+ "google"
616
+ ]
617
+ }
618
+ },
619
+ {
620
+ "id": "adr-minimal-body",
621
+ "type": "adr",
622
+ "label": "Errors are status, code and message",
623
+ "x": 780,
624
+ "y": 390,
625
+ "concern": "api-errors",
626
+ "status": "accepted",
627
+ "date": "",
628
+ "context": "Other parts of the system or other systems call this element's HTTP API, and every one of them has to handle its errors in code. The forces: a client can only act on what it can parse, so an error body that changes shape from one operation to the next is handled by string matching or not at all; the HTTP status alone does not tell \"order not found\" from \"customer not found\", so clients that need to tell them apart need a code that never changes meaning; a form that shows one invalid field per round trip costs the user a submit per mistake; a message copied from an exception tells the caller about the code, not about what to do; a code nobody documented is a support ticket; and a published guide (Zalando, Microsoft, Google) already fixes a shape, which costs nothing to follow and a lot to argue with. What never reaches a caller (stack traces, class names, SQL, paths, hosts) and the correlation field are decided in Error handling and logging conventions, which this pack takes as given; conflicts and failed preconditions (409, 412) in Idempotency and concurrency, 429 in Rate limiting, and how the error shape changes across versions in API evolution.",
629
+ "decision": "Every error response is application/json {\"code\", \"message\", and the correlation id under the field set in Error handling and logging conventions}, with the HTTP status carrying the kind of failure: code matching {{CODE_PATTERN}}, message written for the caller (\"{{GENERIC_MESSAGE}}\" for every 5xx), and nothing else, except an errors array of { pointer, code, message } for field errors, with pointer a JSON Pointer (RFC 6901) into the body. Codes: {{CODES}}. Invalid input: {{VALIDATION}}, answered {{VALIDATION_STATUS}}. Where codes come from a catalogue, what a code means is read in {{DOCS}} (with a page per code, at {{ERROR_DOCS_URL}}<code in lower case with dashes>). The one error handler of Error handling and logging conventions writes the body (an Express error handler in src/http, a Spring @ControllerAdvice, an ASP.NET Core exception handler). Every operation documents a default response with the error schema in the OpenAPI document. This decision holds while the API has one client owned by the same team; a second client, or a client outside the team, supersedes it with problem details. Statuses follow RFC 9110; conflicts and failed preconditions (409, 412) are decided in Idempotency and concurrency, 429 in Rate limiting, and how this shape evolves across versions in API evolution.",
630
+ "consequences": "• The least to build and the least to keep stable.\n• No standard parser knows the shape; every client writes its own, which is cheap with one client and costly with five.\n• Moving to problem details later changes every error response: a breaking change that needs a new version under API evolution.",
631
+ "alternatives": "1. RFC 9457 problem details: a few more fields, and a standard any later client knows.\n2. The HTTP status alone with an empty body: nothing to quote to support, and no field errors.",
632
+ "hubWhen": {
633
+ "FORMAT": [
634
+ "minimal"
635
+ ]
636
+ }
637
+ },
638
+ {
639
+ "id": "ff-problem-shape",
640
+ "type": "fitness-fn",
641
+ "label": "Errors are problem details",
642
+ "x": 1040,
643
+ "y": 0,
644
+ "characteristic": "compatibility",
645
+ "scope": "atomic",
646
+ "cadence": "triggered",
647
+ "trigger": "pull-request",
648
+ "invocation": "automated",
649
+ "description": "An integration test calls an unknown order and the test-only route that throws, both with a traceparent header, and checks the media type, the five members, the code and the correlation id in each answer. The correlation field's name is the one set in Error handling and logging conventions. For Java the same test is MockMvc or RestAssured; for .NET, WebApplicationFactory with xUnit.\n\nThreshold: A 404 and a 500 answered with production settings are application/problem+json with type, title, status equal to the response's, detail, instance, a code matching {{CODE_PATTERN}} and the trace id of the request's traceparent\n\nTool: Vitest with supertest\n\n```ts\n// test/http/problem-details.test.ts (NODE_ENV=production in this file's setup)\nimport request from 'supertest'\nimport { expect, it } from 'vitest'\nimport { app } from '../../src/app' // GET /__boom throws an unexpected error, in tests only\n\nconst TRACE = 'traceId' // the correlation field set in Error handling and logging conventions\nconst TRACEPARENT = '00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01'\n\nit.each(['/orders/does-not-exist', '/__boom'])('GET %s answers problem details', async (path) => {\n const res = await request(app).get(path).set('traceparent', TRACEPARENT)\n expect(res.status).toBeGreaterThanOrEqual(400)\n expect(res.headers['content-type']).toMatch(/^application\\/problem\\+json/)\n expect(res.body).toMatchObject({ type: expect.any(String), title: expect.any(String), status: res.status, detail: expect.any(String), instance: expect.any(String) })\n expect(res.body.code).toMatch(new RegExp('{{CODE_PATTERN}}'))\n expect(res.body[TRACE]).toBe('4bf92f3577b34da6a3ce929d0e0e4736')\n})\n```",
650
+ "hubWhen": {
651
+ "FORMAT": [
652
+ "problem-details"
653
+ ]
654
+ }
655
+ },
656
+ {
657
+ "id": "ff-microsoft-shape",
658
+ "type": "fitness-fn",
659
+ "label": "Errors are Microsoft's error object",
660
+ "x": 1040,
661
+ "y": 130,
662
+ "characteristic": "compatibility",
663
+ "scope": "atomic",
664
+ "cadence": "triggered",
665
+ "trigger": "pull-request",
666
+ "invocation": "automated",
667
+ "description": "An integration test calls an unknown order and the test-only route that throws, both with a traceparent header, and checks the envelope, the code against the header, the message, the correlation id and the absence of innererror. The correlation field's name is the one set in Error handling and logging conventions.\n\nThreshold: A 404 and a 500 answered with production settings are JSON with only the member error, whose code matches {{CODE_PATTERN}} and equals the x-ms-error-code header, with a message, the trace id of the request's traceparent and no innererror\n\nTool: Vitest with supertest\n\n```ts\n// test/http/error-object.test.ts (NODE_ENV=production in this file's setup)\nimport request from 'supertest'\nimport { expect, it } from 'vitest'\nimport { app } from '../../src/app' // GET /__boom throws an unexpected error, in tests only\n\nconst TRACE = 'traceId' // the correlation field set in Error handling and logging conventions\nconst TRACEPARENT = '00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01'\n\nit.each(['/orders/does-not-exist', '/__boom'])('GET %s answers the error object', async (path) => {\n const res = await request(app).get(path).set('traceparent', TRACEPARENT)\n expect(res.status).toBeGreaterThanOrEqual(400)\n expect(res.headers['content-type']).toMatch(/^application\\/json/)\n expect(Object.keys(res.body)).toEqual(['error'])\n const { error } = res.body\n expect(error.code).toMatch(new RegExp('{{CODE_PATTERN}}'))\n expect(res.headers['x-ms-error-code']).toBe(error.code)\n expect(error.message).toEqual(expect.any(String))\n expect(error[TRACE]).toBe('4bf92f3577b34da6a3ce929d0e0e4736')\n expect(error).not.toHaveProperty('innererror')\n})\n```",
668
+ "hubWhen": {
669
+ "FORMAT": [
670
+ "microsoft"
671
+ ]
672
+ }
673
+ },
674
+ {
675
+ "id": "ff-google-shape",
676
+ "type": "fitness-fn",
677
+ "label": "Errors are google.rpc.Status",
678
+ "x": 1040,
679
+ "y": 260,
680
+ "characteristic": "compatibility",
681
+ "scope": "atomic",
682
+ "cadence": "triggered",
683
+ "trigger": "pull-request",
684
+ "invocation": "automated",
685
+ "description": "An integration test calls an unknown order and the test-only route that throws, both with a traceparent header, and checks the envelope, the HTTP status in code, the google.rpc.Code name, the ErrorInfo and the RequestInfo by their @type, and that no detail type appears twice.\n\nThreshold: A 404 and a 500 answered with production settings are JSON with only the member error, whose code equals the response's status, whose status is an upper-case google.rpc.Code name, and whose details hold exactly one ErrorInfo with a reason matching {{CODE_PATTERN}} and a domain, and one RequestInfo with the trace id of the request's traceparent\n\nTool: Vitest with supertest\n\n```ts\n// test/http/rpc-status.test.ts (NODE_ENV=production in this file's setup)\nimport request from 'supertest'\nimport { expect, it } from 'vitest'\nimport { app } from '../../src/app' // GET /__boom throws an unexpected error, in tests only\n\nconst TRACEPARENT = '00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01'\nconst T = 'type.googleapis.com/google.rpc.'\n\nit.each(['/orders/does-not-exist', '/__boom'])('GET %s answers google.rpc.Status', async (path) => {\n const res = await request(app).get(path).set('traceparent', TRACEPARENT)\n expect(Object.keys(res.body)).toEqual(['error'])\n const { error } = res.body\n expect(error).toMatchObject({ code: res.status, status: expect.stringMatching(/^[A-Z_]+$/), message: expect.any(String) })\n const types = error.details.map((d: { '@type': string }) => d['@type'])\n expect(new Set(types).size).toBe(types.length)\n const info = error.details.find((d: { '@type': string }) => d['@type'] === T + 'ErrorInfo')\n expect(info.reason).toMatch(new RegExp('{{CODE_PATTERN}}'))\n expect(info.domain).toEqual(expect.any(String))\n expect(error.details.find((d: { '@type': string }) => d['@type'] === T + 'RequestInfo').requestId).toBe('4bf92f3577b34da6a3ce929d0e0e4736')\n})\n```",
686
+ "hubWhen": {
687
+ "FORMAT": [
688
+ "google"
689
+ ]
690
+ }
691
+ },
692
+ {
693
+ "id": "ff-minimal-shape",
694
+ "type": "fitness-fn",
695
+ "label": "Errors are status, code and message",
696
+ "x": 1040,
697
+ "y": 390,
698
+ "characteristic": "compatibility",
699
+ "scope": "atomic",
700
+ "cadence": "triggered",
701
+ "trigger": "pull-request",
702
+ "invocation": "automated",
703
+ "description": "An integration test calls an unknown order and the test-only route that throws, both with a traceparent header, and checks that the body holds exactly the three fields, nothing more. The correlation field's name is the one set in Error handling and logging conventions.\n\nThreshold: A 404 and a 500 answered with production settings are JSON with exactly the fields code, message and the correlation field, the code matching {{CODE_PATTERN}} and the id the trace id of the request's traceparent\n\nTool: Vitest with supertest\n\n```ts\n// test/http/error-body.test.ts (NODE_ENV=production in this file's setup)\nimport request from 'supertest'\nimport { expect, it } from 'vitest'\nimport { app } from '../../src/app' // GET /__boom throws an unexpected error, in tests only\n\nconst TRACE = 'traceId' // the correlation field set in Error handling and logging conventions\nconst TRACEPARENT = '00-4bf92f3577b34da6a3ce929d0e0e4736-00f067aa0ba902b7-01'\n\nit.each(['/orders/does-not-exist', '/__boom'])('GET %s answers code, message and id only', async (path) => {\n const res = await request(app).get(path).set('traceparent', TRACEPARENT)\n expect(res.status).toBeGreaterThanOrEqual(400)\n expect(res.headers['content-type']).toMatch(/^application\\/json/)\n expect(Object.keys(res.body).sort()).toEqual(['code', 'message', TRACE].sort())\n expect(res.body.code).toMatch(new RegExp('{{CODE_PATTERN}}'))\n expect(res.body[TRACE]).toBe('4bf92f3577b34da6a3ce929d0e0e4736')\n})\n```",
704
+ "hubWhen": {
705
+ "FORMAT": [
706
+ "minimal"
707
+ ]
708
+ }
709
+ },
710
+ {
711
+ "id": "ff-caller-text",
712
+ "type": "fitness-fn",
713
+ "label": "No exception text reaches the caller",
714
+ "x": 1040,
715
+ "y": 520,
716
+ "characteristic": "security",
717
+ "scope": "atomic",
718
+ "cadence": "triggered",
719
+ "trigger": "pull-request",
720
+ "invocation": "automated",
721
+ "description": "An integration test puts a random marker in the messages of the errors two test-only routes throw (an unexpected TypeError and an expected not-found error), calls both, and checks that the marker appears in neither answer and that the 500 answer holds the fixed text. The leak of stack traces, class names and SQL is checked in Error handling and logging conventions; this checks the text.\n\nThreshold: 0 occurrences of an exception's message in the answers to an unexpected and an expected error with production settings; the 500 answer holds \"{{GENERIC_MESSAGE}}\"\n\nTool: Vitest with supertest\n\n```ts\n// test/http/caller-text.test.ts (NODE_ENV=production in this file's setup)\nimport { randomUUID } from 'node:crypto'\nimport request from 'supertest'\nimport { expect, it } from 'vitest'\n\nprocess.env.ERROR_MARK = `mark-${randomUUID()}`\nconst { app } = await import('../../src/app') // GET /__boom and GET /__expected throw errors whose message is ERROR_MARK\n\nit('passes no exception message to the caller', async () => {\n for (const path of ['/__boom', '/__expected']) {\n const res = await request(app).get(path)\n expect(res.status, path).toBeGreaterThanOrEqual(400)\n expect(res.text, path).not.toContain(process.env.ERROR_MARK)\n }\n})\nit('answers every unexpected error with the fixed text', async () => {\n const res = await request(app).get('/__boom')\n expect(res.status).toBe(500)\n expect(res.text).toContain('{{GENERIC_MESSAGE}}')\n})\n```"
722
+ },
723
+ {
724
+ "id": "ff-openapi-errors",
725
+ "type": "fitness-fn",
726
+ "label": "Every operation documents its errors",
727
+ "x": 1040,
728
+ "y": 650,
729
+ "characteristic": "compatibility",
730
+ "scope": "atomic",
731
+ "cadence": "triggered",
732
+ "trigger": "pull-request",
733
+ "invocation": "automated",
734
+ "description": "Spectral lints the OpenAPI documents with these rules on every pull request, failing at severity error: where the API style guide pack lints with Spectral, api/style/ruleset.yaml lists this file in its extends and its job runs them; otherwise a job of their own runs spectral lint \"api/*.yaml\" --ruleset api/style/errors.yaml --fail-severity=error. The first rule demands a default response and a 4xx response on every operation; the second demands content on every error response. The schema each response points to is the one the decision names.\n\nThreshold: 0 Spectral errors from the two error rules on the OpenAPI documents under api/ on every pull request: every operation has a default response and at least one 4xx response, and every 4xx, 5xx and default response describes its content\n\nTool: Spectral (@stoplight/spectral-cli 6)\n\n```yaml\n# api/style/errors.yaml\nformats: [oas3]\nrules:\n error-responses-documented:\n description: Every operation documents a default response and at least one 4xx response\n severity: error\n given: $.paths[*][get,put,post,patch,delete].responses\n then:\n - field: default\n function: truthy\n - function: schema\n functionOptions:\n schema:\n not: { propertyNames: { not: { pattern: '^4' } } }\n error-responses-have-content:\n description: Every error response describes its body\n severity: error\n given: $.paths[*][get,put,post,patch,delete].responses[?(@property.match(/^(4|5|default)/))]\n then:\n field: content\n function: truthy\n```"
735
+ },
736
+ {
737
+ "id": "ff-error-codes",
738
+ "type": "fitness-fn",
739
+ "label": "Codes listed, catalogued, described and kept",
740
+ "x": 1040,
741
+ "y": 780,
742
+ "characteristic": "compatibility",
743
+ "scope": "atomic",
744
+ "cadence": "triggered",
745
+ "trigger": "pull-request",
746
+ "invocation": "automated",
747
+ "description": "A test reads every OpenAPI document under api/ and the catalogue, checks every operation's x-error-codes against the catalogue, checks each entry, and snapshots the sorted codes, so that a renamed or removed code fails until the snapshot is updated in a reviewed change (which API evolution then judges). Where Error handling and logging conventions keeps an error catalogue in the code, api/errors/codes.yaml is generated from it, so there is one list.\n\nThreshold: Every operation in the OpenAPI documents under api/ lists at least one code in x-error-codes and every listed code is in api/errors/codes.yaml; every catalogue code matches {{CODE_PATTERN}} and has a status of at least 400 and a non-empty description; the sorted list of codes matches its snapshot\n\nTool: Vitest with the yaml package\n\n```ts\n// test/api/error-codes.test.ts\nimport { readdirSync, readFileSync } from 'node:fs'\nimport { expect, it } from 'vitest'\nimport { parse } from 'yaml'\n\ntype Entry = { status: number; title: string; description: string }\ntype Paths = Record<string, Record<string, { 'x-error-codes'?: string[] }>>\nconst catalogue: Record<string, Entry> = parse(readFileSync('api/errors/codes.yaml', 'utf8'))\nconst docs = readdirSync('api').filter((f) => f.endsWith('.yaml')).map((f) => ({ f, doc: parse(readFileSync(`api/${f}`, 'utf8')) }))\nconst operations = docs.filter(({ doc }) => doc?.openapi).flatMap(({ f, doc }) => Object.entries(doc.paths as Paths).flatMap(([path, item]) =>\n ['get', 'put', 'post', 'patch', 'delete'].filter((m) => item[m]).map((m) => ({ name: `${f} ${m.toUpperCase()} ${path}`, codes: item[m]['x-error-codes'] ?? [] }))))\n\nit.each(operations)('$name lists its codes, all in the catalogue', ({ codes }) => {\n expect(codes.length).toBeGreaterThan(0)\n for (const code of codes) expect(Object.keys(catalogue)).toContain(code)\n})\nit('every code is well-formed, described and keeps its name', () => {\n for (const [code, e] of Object.entries(catalogue)) {\n expect(code).toMatch(new RegExp('{{CODE_PATTERN}}'))\n expect(e.status, code).toBeGreaterThanOrEqual(400)\n expect(e.description?.trim(), code).toBeTruthy()\n }\n expect(Object.keys(catalogue).sort()).toMatchSnapshot()\n})\n```",
748
+ "hubWhen": {
749
+ "CODES": [
750
+ "catalogue"
751
+ ]
752
+ }
753
+ },
754
+ {
755
+ "id": "ff-status-codes",
756
+ "type": "fitness-fn",
757
+ "label": "Codes repeat the status",
758
+ "x": 1040,
759
+ "y": 910,
760
+ "characteristic": "compatibility",
761
+ "scope": "atomic",
762
+ "cadence": "triggered",
763
+ "trigger": "pull-request",
764
+ "invocation": "automated",
765
+ "description": "An integration test calls an unknown order and the test-only route that throws and looks for the status's reason phrase as the code anywhere in the body (the code member, error.code, or ErrorInfo.reason, by format).\n\nThreshold: An unknown order answers 404 with the code NOT_FOUND and the test-only crash 500 with INTERNAL_SERVER_ERROR; a problem details type, where present, is about:blank\n\nTool: Vitest with supertest\n\n```ts\n// test/http/status-codes.test.ts (NODE_ENV=production in this file's setup)\nimport request from 'supertest'\nimport { expect, it } from 'vitest'\nimport { app } from '../../src/app' // GET /__boom throws an unexpected error, in tests only\n\nit.each([\n { path: '/orders/does-not-exist', status: 404, code: 'NOT_FOUND' },\n { path: '/__boom', status: 500, code: 'INTERNAL_SERVER_ERROR' },\n])('GET $path answers $status with the code $code', async ({ path, status, code }) => {\n const res = await request(app).get(path)\n expect(res.status).toBe(status)\n expect(res.text).toContain(`\"${code}\"`)\n if (res.body.type !== undefined) expect(res.body.type).toBe('about:blank')\n})\n```",
766
+ "hubWhen": {
767
+ "CODES": [
768
+ "status-only"
769
+ ]
770
+ }
771
+ },
772
+ {
773
+ "id": "ff-validation-all",
774
+ "type": "fitness-fn",
775
+ "label": "Every invalid field reported",
776
+ "x": 1040,
777
+ "y": 1040,
778
+ "characteristic": "compatibility",
779
+ "scope": "atomic",
780
+ "cadence": "triggered",
781
+ "trigger": "pull-request",
782
+ "invocation": "automated",
783
+ "description": "An integration test posts an order with three mistakes and reads the field errors wherever the format keeps them: errors in problem details and the minimal body, error.details in Microsoft's object, the fieldViolations of a google.rpc.BadRequest. Locations are JSON Pointers, or dotted paths in Google's format.\n\nThreshold: An order posted with three invalid fields is answered {{VALIDATION_STATUS}} with exactly three field errors, located at the e-mail address, the first item's quantity and the currency, each with a code matching {{CODE_PATTERN}}\n\nTool: Vitest with supertest\n\n```ts\n// test/http/validation.test.ts (NODE_ENV=production in this file's setup)\nimport request from 'supertest'\nimport { expect, it } from 'vitest'\nimport { app } from '../../src/app'\n\ntype Field = { field?: string; code?: string }\nconst fieldErrors = (b: any): Field[] =>\n b.errors?.map((e: any) => ({ field: e.pointer, code: e.code }))\n ?? b.error?.details?.flatMap((d: any) => d.fieldViolations?.map((v: any) => ({ field: v.field, code: v.reason }))\n ?? (d['@type'] ? [] : [{ field: d.target, code: d.code }])) ?? []\n\nit('reports every invalid field in one answer', async () => {\n const res = await request(app).post('/orders').send({ email: 'not-an-email', items: [{ sku: 'A-1', quantity: 0 }], currency: 'XYZ' })\n expect(res.status).toBe({{VALIDATION_STATUS}})\n const errors = fieldErrors(res.body)\n expect([['/currency', '/email', '/items/0/quantity'], ['currency', 'email', 'items[0].quantity']]).toContainEqual(errors.map((e) => e.field).sort())\n for (const e of errors) expect(e.code).toMatch(new RegExp('{{CODE_PATTERN}}'))\n})\n```",
784
+ "hubWhen": {
785
+ "VALIDATION": [
786
+ "all"
787
+ ]
788
+ }
789
+ },
790
+ {
791
+ "id": "ff-validation-first",
792
+ "type": "fitness-fn",
793
+ "label": "The first invalid field reported",
794
+ "x": 1040,
795
+ "y": 1170,
796
+ "characteristic": "compatibility",
797
+ "scope": "atomic",
798
+ "cadence": "triggered",
799
+ "trigger": "pull-request",
800
+ "invocation": "automated",
801
+ "description": "An integration test posts an order with three mistakes and reads the field errors wherever the format keeps them: errors in problem details and the minimal body, error.details in Microsoft's object, the fieldViolations of a google.rpc.BadRequest.\n\nThreshold: An order posted with three invalid fields is answered {{VALIDATION_STATUS}} with exactly one field error, with a location and a code matching {{CODE_PATTERN}}\n\nTool: Vitest with supertest\n\n```ts\n// test/http/validation.test.ts (NODE_ENV=production in this file's setup)\nimport request from 'supertest'\nimport { expect, it } from 'vitest'\nimport { app } from '../../src/app'\n\ntype Field = { field?: string; code?: string }\nconst fieldErrors = (b: any): Field[] =>\n b.errors?.map((e: any) => ({ field: e.pointer, code: e.code }))\n ?? b.error?.details?.flatMap((d: any) => d.fieldViolations?.map((v: any) => ({ field: v.field, code: v.reason }))\n ?? (d['@type'] ? [] : [{ field: d.target, code: d.code }])) ?? []\n\nit('reports the first invalid field only', async () => {\n const res = await request(app).post('/orders').send({ email: 'not-an-email', items: [{ sku: 'A-1', quantity: 0 }], currency: 'XYZ' })\n expect(res.status).toBe({{VALIDATION_STATUS}})\n const errors = fieldErrors(res.body)\n expect(errors).toHaveLength(1)\n expect(errors[0].field).toEqual(expect.any(String))\n expect(errors[0].code).toMatch(new RegExp('{{CODE_PATTERN}}'))\n})\n```",
802
+ "hubWhen": {
803
+ "VALIDATION": [
804
+ "first"
805
+ ]
806
+ }
807
+ },
808
+ {
809
+ "id": "ff-docs-pages",
810
+ "type": "fitness-fn",
811
+ "label": "Every code has a page",
812
+ "x": 1040,
813
+ "y": 1300,
814
+ "characteristic": "interaction-capability",
815
+ "scope": "atomic",
816
+ "cadence": "triggered",
817
+ "trigger": "deploy",
818
+ "invocation": "automated",
819
+ "description": "A script fetches the page of every code in the catalogue, without credentials, and fails naming each code whose page is missing, not HTML or does not name the code. It runs in the documentation site's deploy job and on a nightly schedule.\n\nThreshold: Every code in api/errors/codes.yaml has a page at {{ERROR_DOCS_URL}}<code in lower case with dashes> that answers 200 without credentials, with an HTML content type and the code in its text; checked after every documentation deploy and nightly\n\nTool: Node.js 20 (a script with fetch and the yaml package)\n\n```js\n// scripts/check-error-pages.mjs (node scripts/check-error-pages.mjs)\nimport { readFileSync } from 'node:fs'\nimport { parse } from 'yaml'\n\nconst BASE = '{{ERROR_DOCS_URL}}'\nconst codes = Object.keys(parse(readFileSync('api/errors/codes.yaml', 'utf8')))\nconst missing = []\nfor (const code of codes) {\n const url = BASE + code.toLowerCase().replaceAll('_', '-')\n const res = await fetch(url, { redirect: 'follow' }).catch((e) => ({ ok: false, status: e.message }))\n const html = res.ok && (res.headers.get('content-type') ?? '').startsWith('text/html') ? await res.text() : ''\n if (!html.includes(code)) missing.push(`${code}: no HTML page naming it at ${url} (${res.status})`)\n}\nif (missing.length) {\n console.error(missing.join('\\n'))\n process.exit(1)\n}\nconsole.log(`${codes.length} error pages found`)\n```",
820
+ "hubWhen": {
821
+ "CODES": [
822
+ "catalogue"
823
+ ],
824
+ "DOCS": [
825
+ "page"
826
+ ]
827
+ }
828
+ }
829
+ ],
830
+ "relations": [
831
+ {
832
+ "id": "req-problem-details--derives--need",
833
+ "sourceId": "req-problem-details",
834
+ "targetId": "need",
835
+ "relationType": "derives"
836
+ },
837
+ {
838
+ "id": "req-microsoft-error--derives--need",
839
+ "sourceId": "req-microsoft-error",
840
+ "targetId": "need",
841
+ "relationType": "derives"
842
+ },
843
+ {
844
+ "id": "req-google-status--derives--need",
845
+ "sourceId": "req-google-status",
846
+ "targetId": "need",
847
+ "relationType": "derives"
848
+ },
849
+ {
850
+ "id": "req-minimal--derives--need",
851
+ "sourceId": "req-minimal",
852
+ "targetId": "need",
853
+ "relationType": "derives"
854
+ },
855
+ {
856
+ "id": "req-correlation--derives--need",
857
+ "sourceId": "req-correlation",
858
+ "targetId": "need",
859
+ "relationType": "derives"
860
+ },
861
+ {
862
+ "id": "req-caller-text--derives--need",
863
+ "sourceId": "req-caller-text",
864
+ "targetId": "need",
865
+ "relationType": "derives"
866
+ },
867
+ {
868
+ "id": "req-documented--derives--need",
869
+ "sourceId": "req-documented",
870
+ "targetId": "need",
871
+ "relationType": "derives"
872
+ },
873
+ {
874
+ "id": "req-codes--derives--need",
875
+ "sourceId": "req-codes",
876
+ "targetId": "need",
877
+ "relationType": "derives"
878
+ },
879
+ {
880
+ "id": "req-status-only--derives--need",
881
+ "sourceId": "req-status-only",
882
+ "targetId": "need",
883
+ "relationType": "derives"
884
+ },
885
+ {
886
+ "id": "req-validation-all--derives--need",
887
+ "sourceId": "req-validation-all",
888
+ "targetId": "need",
889
+ "relationType": "derives"
890
+ },
891
+ {
892
+ "id": "req-validation-first--derives--need",
893
+ "sourceId": "req-validation-first",
894
+ "targetId": "need",
895
+ "relationType": "derives"
896
+ },
897
+ {
898
+ "id": "req-docs-page--derives--need",
899
+ "sourceId": "req-docs-page",
900
+ "targetId": "need",
901
+ "relationType": "derives"
902
+ },
903
+ {
904
+ "id": "req-docs-identifiers--derives--need",
905
+ "sourceId": "req-docs-identifiers",
906
+ "targetId": "need",
907
+ "relationType": "derives"
908
+ },
909
+ {
910
+ "id": "sc-problem-details--verifies--req-problem-details",
911
+ "sourceId": "sc-problem-details",
912
+ "targetId": "req-problem-details",
913
+ "relationType": "verifies"
914
+ },
915
+ {
916
+ "id": "sc-microsoft-error--verifies--req-microsoft-error",
917
+ "sourceId": "sc-microsoft-error",
918
+ "targetId": "req-microsoft-error",
919
+ "relationType": "verifies"
920
+ },
921
+ {
922
+ "id": "sc-google-status--verifies--req-google-status",
923
+ "sourceId": "sc-google-status",
924
+ "targetId": "req-google-status",
925
+ "relationType": "verifies"
926
+ },
927
+ {
928
+ "id": "sc-minimal--verifies--req-minimal",
929
+ "sourceId": "sc-minimal",
930
+ "targetId": "req-minimal",
931
+ "relationType": "verifies"
932
+ },
933
+ {
934
+ "id": "sc-correlation--verifies--req-correlation",
935
+ "sourceId": "sc-correlation",
936
+ "targetId": "req-correlation",
937
+ "relationType": "verifies"
938
+ },
939
+ {
940
+ "id": "sc-caller-text--verifies--req-caller-text",
941
+ "sourceId": "sc-caller-text",
942
+ "targetId": "req-caller-text",
943
+ "relationType": "verifies"
944
+ },
945
+ {
946
+ "id": "sc-documented--verifies--req-documented",
947
+ "sourceId": "sc-documented",
948
+ "targetId": "req-documented",
949
+ "relationType": "verifies"
950
+ },
951
+ {
952
+ "id": "sc-codes--verifies--req-codes",
953
+ "sourceId": "sc-codes",
954
+ "targetId": "req-codes",
955
+ "relationType": "verifies"
956
+ },
957
+ {
958
+ "id": "sc-status-only--verifies--req-status-only",
959
+ "sourceId": "sc-status-only",
960
+ "targetId": "req-status-only",
961
+ "relationType": "verifies"
962
+ },
963
+ {
964
+ "id": "sc-validation-all--verifies--req-validation-all",
965
+ "sourceId": "sc-validation-all",
966
+ "targetId": "req-validation-all",
967
+ "relationType": "verifies"
968
+ },
969
+ {
970
+ "id": "sc-validation-first--verifies--req-validation-first",
971
+ "sourceId": "sc-validation-first",
972
+ "targetId": "req-validation-first",
973
+ "relationType": "verifies"
974
+ },
975
+ {
976
+ "id": "sc-docs-page--verifies--req-docs-page",
977
+ "sourceId": "sc-docs-page",
978
+ "targetId": "req-docs-page",
979
+ "relationType": "verifies"
980
+ },
981
+ {
982
+ "id": "sc-docs-identifiers--verifies--req-docs-identifiers",
983
+ "sourceId": "sc-docs-identifiers",
984
+ "targetId": "req-docs-identifiers",
985
+ "relationType": "verifies"
986
+ },
987
+ {
988
+ "id": "ff-problem-shape--implements--adr-problem-details",
989
+ "sourceId": "ff-problem-shape",
990
+ "targetId": "adr-problem-details",
991
+ "relationType": "implements"
992
+ },
993
+ {
994
+ "id": "ff-microsoft-shape--implements--adr-microsoft-error",
995
+ "sourceId": "ff-microsoft-shape",
996
+ "targetId": "adr-microsoft-error",
997
+ "relationType": "implements"
998
+ },
999
+ {
1000
+ "id": "ff-google-shape--implements--adr-google-status",
1001
+ "sourceId": "ff-google-shape",
1002
+ "targetId": "adr-google-status",
1003
+ "relationType": "implements"
1004
+ },
1005
+ {
1006
+ "id": "ff-minimal-shape--implements--adr-minimal-body",
1007
+ "sourceId": "ff-minimal-shape",
1008
+ "targetId": "adr-minimal-body",
1009
+ "relationType": "implements"
1010
+ },
1011
+ {
1012
+ "id": "ff-caller-text--implements--adr-problem-details",
1013
+ "sourceId": "ff-caller-text",
1014
+ "targetId": "adr-problem-details",
1015
+ "relationType": "implements"
1016
+ },
1017
+ {
1018
+ "id": "ff-caller-text--implements--adr-microsoft-error",
1019
+ "sourceId": "ff-caller-text",
1020
+ "targetId": "adr-microsoft-error",
1021
+ "relationType": "implements"
1022
+ },
1023
+ {
1024
+ "id": "ff-caller-text--implements--adr-google-status",
1025
+ "sourceId": "ff-caller-text",
1026
+ "targetId": "adr-google-status",
1027
+ "relationType": "implements"
1028
+ },
1029
+ {
1030
+ "id": "ff-caller-text--implements--adr-minimal-body",
1031
+ "sourceId": "ff-caller-text",
1032
+ "targetId": "adr-minimal-body",
1033
+ "relationType": "implements"
1034
+ },
1035
+ {
1036
+ "id": "ff-openapi-errors--implements--adr-problem-details",
1037
+ "sourceId": "ff-openapi-errors",
1038
+ "targetId": "adr-problem-details",
1039
+ "relationType": "implements"
1040
+ },
1041
+ {
1042
+ "id": "ff-openapi-errors--implements--adr-microsoft-error",
1043
+ "sourceId": "ff-openapi-errors",
1044
+ "targetId": "adr-microsoft-error",
1045
+ "relationType": "implements"
1046
+ },
1047
+ {
1048
+ "id": "ff-openapi-errors--implements--adr-google-status",
1049
+ "sourceId": "ff-openapi-errors",
1050
+ "targetId": "adr-google-status",
1051
+ "relationType": "implements"
1052
+ },
1053
+ {
1054
+ "id": "ff-openapi-errors--implements--adr-minimal-body",
1055
+ "sourceId": "ff-openapi-errors",
1056
+ "targetId": "adr-minimal-body",
1057
+ "relationType": "implements"
1058
+ },
1059
+ {
1060
+ "id": "ff-error-codes--implements--adr-problem-details",
1061
+ "sourceId": "ff-error-codes",
1062
+ "targetId": "adr-problem-details",
1063
+ "relationType": "implements"
1064
+ },
1065
+ {
1066
+ "id": "ff-error-codes--implements--adr-microsoft-error",
1067
+ "sourceId": "ff-error-codes",
1068
+ "targetId": "adr-microsoft-error",
1069
+ "relationType": "implements"
1070
+ },
1071
+ {
1072
+ "id": "ff-error-codes--implements--adr-google-status",
1073
+ "sourceId": "ff-error-codes",
1074
+ "targetId": "adr-google-status",
1075
+ "relationType": "implements"
1076
+ },
1077
+ {
1078
+ "id": "ff-error-codes--implements--adr-minimal-body",
1079
+ "sourceId": "ff-error-codes",
1080
+ "targetId": "adr-minimal-body",
1081
+ "relationType": "implements"
1082
+ },
1083
+ {
1084
+ "id": "ff-status-codes--implements--adr-problem-details",
1085
+ "sourceId": "ff-status-codes",
1086
+ "targetId": "adr-problem-details",
1087
+ "relationType": "implements"
1088
+ },
1089
+ {
1090
+ "id": "ff-status-codes--implements--adr-microsoft-error",
1091
+ "sourceId": "ff-status-codes",
1092
+ "targetId": "adr-microsoft-error",
1093
+ "relationType": "implements"
1094
+ },
1095
+ {
1096
+ "id": "ff-status-codes--implements--adr-google-status",
1097
+ "sourceId": "ff-status-codes",
1098
+ "targetId": "adr-google-status",
1099
+ "relationType": "implements"
1100
+ },
1101
+ {
1102
+ "id": "ff-status-codes--implements--adr-minimal-body",
1103
+ "sourceId": "ff-status-codes",
1104
+ "targetId": "adr-minimal-body",
1105
+ "relationType": "implements"
1106
+ },
1107
+ {
1108
+ "id": "ff-validation-all--implements--adr-problem-details",
1109
+ "sourceId": "ff-validation-all",
1110
+ "targetId": "adr-problem-details",
1111
+ "relationType": "implements"
1112
+ },
1113
+ {
1114
+ "id": "ff-validation-all--implements--adr-microsoft-error",
1115
+ "sourceId": "ff-validation-all",
1116
+ "targetId": "adr-microsoft-error",
1117
+ "relationType": "implements"
1118
+ },
1119
+ {
1120
+ "id": "ff-validation-all--implements--adr-google-status",
1121
+ "sourceId": "ff-validation-all",
1122
+ "targetId": "adr-google-status",
1123
+ "relationType": "implements"
1124
+ },
1125
+ {
1126
+ "id": "ff-validation-all--implements--adr-minimal-body",
1127
+ "sourceId": "ff-validation-all",
1128
+ "targetId": "adr-minimal-body",
1129
+ "relationType": "implements"
1130
+ },
1131
+ {
1132
+ "id": "ff-validation-first--implements--adr-problem-details",
1133
+ "sourceId": "ff-validation-first",
1134
+ "targetId": "adr-problem-details",
1135
+ "relationType": "implements"
1136
+ },
1137
+ {
1138
+ "id": "ff-validation-first--implements--adr-microsoft-error",
1139
+ "sourceId": "ff-validation-first",
1140
+ "targetId": "adr-microsoft-error",
1141
+ "relationType": "implements"
1142
+ },
1143
+ {
1144
+ "id": "ff-validation-first--implements--adr-google-status",
1145
+ "sourceId": "ff-validation-first",
1146
+ "targetId": "adr-google-status",
1147
+ "relationType": "implements"
1148
+ },
1149
+ {
1150
+ "id": "ff-validation-first--implements--adr-minimal-body",
1151
+ "sourceId": "ff-validation-first",
1152
+ "targetId": "adr-minimal-body",
1153
+ "relationType": "implements"
1154
+ },
1155
+ {
1156
+ "id": "ff-docs-pages--implements--adr-problem-details",
1157
+ "sourceId": "ff-docs-pages",
1158
+ "targetId": "adr-problem-details",
1159
+ "relationType": "implements"
1160
+ },
1161
+ {
1162
+ "id": "ff-docs-pages--implements--adr-microsoft-error",
1163
+ "sourceId": "ff-docs-pages",
1164
+ "targetId": "adr-microsoft-error",
1165
+ "relationType": "implements"
1166
+ },
1167
+ {
1168
+ "id": "ff-docs-pages--implements--adr-google-status",
1169
+ "sourceId": "ff-docs-pages",
1170
+ "targetId": "adr-google-status",
1171
+ "relationType": "implements"
1172
+ },
1173
+ {
1174
+ "id": "ff-docs-pages--implements--adr-minimal-body",
1175
+ "sourceId": "ff-docs-pages",
1176
+ "targetId": "adr-minimal-body",
1177
+ "relationType": "implements"
1178
+ }
1179
+ ]
1180
+ }