@aventara/testing 0.1.0-pilot.4 → 1.0.0-rc.0
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/CHANGELOG.md +159 -0
- package/README.md +51 -0
- package/dist/adapters/fake-adapter.d.ts +2 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/protocol/corpus-contract.fixture.d.ts +1 -0
- package/dist/protocol/corpus-contract.fixture.js +8 -1
- package/dist/protocol/protocol-corpus.d.ts +30 -0
- package/dist/protocol/protocol-corpus.js +6 -0
- package/dist/protocol/protocol-fixtures.js +39 -9
- package/dist/protocol/protocol-fixtures.json-codec.d.ts +43 -0
- package/dist/protocol/protocol-fixtures.json-codec.js +89 -0
- package/fixtures/protocol-v1.json +136 -0
- package/package.json +11 -7
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
# @aventara/testing
|
|
2
|
+
|
|
3
|
+
## 1.0.0-rc.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- First release candidate of Aventara 1.0. The public API is now considered stable; changes before 1.0.0 are possible
|
|
8
|
+
based on feedback.
|
|
9
|
+
|
|
10
|
+
### Minor Changes
|
|
11
|
+
|
|
12
|
+
- 24ffbab: The protocol fixtures gain two transaction rows: a committed plan whose unique `where` and filter reference an earlier
|
|
13
|
+
step's result (`200 A1009`), and a reference in a `where` to a step that does not exist (`422 A2007` / `V1016`).
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- 24ffbab: `@aventara/testing` loads from CommonJS: `require("@aventara/testing")` returns the same module `import` does (its
|
|
18
|
+
export gains a `default` condition, as core's and nest's have). The package stays ESM; Node's `require()` of an ES
|
|
19
|
+
module needs Node 22.18 or later, which the package already requires.
|
|
20
|
+
- 24ffbab: Each package ships its `CHANGELOG.md`, so the release notes are in the installed package beside the README.
|
|
21
|
+
- 24ffbab: New export `AvProtocolCorpus`: the protocol corpus's server side, for serving it through a client or host you are
|
|
22
|
+
writing. `await AvProtocolCorpus.framework()` gives a fresh corpus `Framework` (pass a row's `Aventara-Contract-Hash`
|
|
23
|
+
to get the contract that row targets), `AvProtocolCorpus.entrypoint` is where to mount it (`"/api"`, every row's path is
|
|
24
|
+
relative to it), and `AvProtocolCorpus.clientContractHash` is the hash a client generated against it sends. The README
|
|
25
|
+
has a section on serving the corpus through your own stack.
|
|
26
|
+
- 24ffbab: The protocol corpus now ships as plain JSON at `@aventara/testing/fixtures/protocol-v1.json`, for clients and hosts
|
|
27
|
+
written in any language: the protocol version, the entrypoint, each ClientContract the rows target (its hash and exact
|
|
28
|
+
`GET /_contract` bytes) and every row of `AvProtocolFixtures`. It is generated from the TypeScript corpus when the
|
|
29
|
+
package is built. The one body too large to write out (1 MiB + 1 byte) is a recipe: `prefix` + `repeat` × `times` +
|
|
30
|
+
`suffix`. The README describes the format.
|
|
31
|
+
- 384a50c: **Behaviour changes, transactions:** every issue about a transaction step's arguments now names where it is
|
|
32
|
+
in the plan, `["operations", i, "args", …]`, beside `cause.operation: i`. Before, the framework's own checks — a wrong
|
|
33
|
+
type, an unknown field or operator, a structural limit, a Json value out of its `AvZ` shape, a value that is not valid
|
|
34
|
+
JSON — answered `["arguments", …]` inside a plan while a bad `$ref`, a refused value and a step that depends on a
|
|
35
|
+
cascaded delete already answered `["operations", i, "args", …]`; now one plan uses one spelling, through
|
|
36
|
+
`framework.transaction`, `framework.executeTransaction` and `POST /_transactions` alike. A single call is unchanged
|
|
37
|
+
(`["arguments", …]`). If your code reads `issue.path` from a transaction's answer, drop the `"operations", i, "args"`
|
|
38
|
+
prefix to get the path inside that step's arguments. `@aventara/testing`'s protocol corpus row "a client-hidden
|
|
39
|
+
field — /_transactions" and `fixtures/protocol-v1.json` carry the new path.
|
|
40
|
+
- 032f792: **Behaviour changes, transactions:** an error about a transaction step itself — rather than its arguments — now
|
|
41
|
+
names the step too, so every path in a transaction's answer is a path through the request you sent: an unknown or
|
|
42
|
+
hidden Resource is at `["operations", i, "resource"]`, a fingerprint that does not match at
|
|
43
|
+
`["operations", i, "fingerprint"]`, a missing or unknown key on the step at `["operations", i, "<key>"]`, and a step
|
|
44
|
+
that is not an object at `["operations", i]`. An operation the step cannot run points at the key that is wrong:
|
|
45
|
+
`["operations", i, "family"]` when the family is not a string, not a standard family, or one the Resource offers no
|
|
46
|
+
variant of; `["operations", i, "variant"]` when the family is right and the variant is not (unknown, not offered or
|
|
47
|
+
restricted for it). Before, these answered `["resource"]`, `["operation"]`, `["fingerprint"]` and `["<key>"]`.
|
|
48
|
+
`cause.operation` and the outcome code are unchanged: an unknown Resource is still `A2001`, an unavailable operation
|
|
49
|
+
`A2002`. `framework.transaction([...])` refuses an entry that is not a handle, or one handle placed twice, at
|
|
50
|
+
`["operations", i]`. A single call is unchanged. `@aventara/testing`'s protocol corpus and `fixtures/protocol-v1.json`
|
|
51
|
+
carry the new paths.
|
|
52
|
+
- dbe6961: **Behaviour changes:** a single call to an operation a Resource does not offer now names the key of the
|
|
53
|
+
request that is wrong instead of `["operation"]`, which no request has: `["family"]` when the family is not a standard
|
|
54
|
+
one or the Resource offers none of its operations, `["variant"]` when the family is right and the variant is not. This
|
|
55
|
+
holds for `framework.execute` and for an HTTP route, whose `/_resources/:resource/:family/:variant` segments are named
|
|
56
|
+
by those same keys. The code is unchanged (`A2002` / `V1006`), and so is `["resource"]` for an unknown Resource.
|
|
57
|
+
`@aventara/testing`'s protocol corpus and `fixtures/protocol-v1.json` carry the new paths.
|
|
58
|
+
- Updated dependencies [24ffbab]
|
|
59
|
+
- Updated dependencies [24ffbab]
|
|
60
|
+
- Updated dependencies [24ffbab]
|
|
61
|
+
- Updated dependencies [24ffbab]
|
|
62
|
+
- Updated dependencies [24ffbab]
|
|
63
|
+
- Updated dependencies [24ffbab]
|
|
64
|
+
- Updated dependencies [24ffbab]
|
|
65
|
+
- Updated dependencies [24ffbab]
|
|
66
|
+
- Updated dependencies [24ffbab]
|
|
67
|
+
- Updated dependencies [24ffbab]
|
|
68
|
+
- Updated dependencies [24ffbab]
|
|
69
|
+
- Updated dependencies [24ffbab]
|
|
70
|
+
- Updated dependencies [a973e89]
|
|
71
|
+
- Updated dependencies [1e65e9a]
|
|
72
|
+
- Updated dependencies
|
|
73
|
+
- Updated dependencies [a973e89]
|
|
74
|
+
- Updated dependencies [a973e89]
|
|
75
|
+
- Updated dependencies [1e65e9a]
|
|
76
|
+
- Updated dependencies [1e65e9a]
|
|
77
|
+
- Updated dependencies [24ffbab]
|
|
78
|
+
- Updated dependencies [2d00ad7]
|
|
79
|
+
- Updated dependencies [384a50c]
|
|
80
|
+
- Updated dependencies [d43d1cc]
|
|
81
|
+
- Updated dependencies [3f98749]
|
|
82
|
+
- Updated dependencies [032f792]
|
|
83
|
+
- Updated dependencies [dbe6961]
|
|
84
|
+
- @aventara/core@1.0.0-rc.0
|
|
85
|
+
|
|
86
|
+
## 0.1.0-pilot.4
|
|
87
|
+
|
|
88
|
+
### Patch Changes
|
|
89
|
+
|
|
90
|
+
- f37dcd6: The documentation shipped with the package — the comments an editor shows on hover, and the README — now describes
|
|
91
|
+
what each export does, how to use it, what it returns and what it throws. Notes about how the package was built and
|
|
92
|
+
why are no longer part of what is published.
|
|
93
|
+
- Updated dependencies [f37dcd6]
|
|
94
|
+
- @aventara/core@0.1.0-pilot.4
|
|
95
|
+
|
|
96
|
+
## 0.1.0-pilot.3
|
|
97
|
+
|
|
98
|
+
### Patch Changes
|
|
99
|
+
|
|
100
|
+
- @aventara/core@0.1.0-pilot.3
|
|
101
|
+
|
|
102
|
+
## 0.1.0-pilot.2
|
|
103
|
+
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- e69e88d: The published packages are written for the people who use them. The JavaScript ships without comments; the type
|
|
107
|
+
declarations keep their documentation, and it, the error messages, the protocol fixtures' labels and the comments in a
|
|
108
|
+
generated client no longer carry the project's internal development notes.
|
|
109
|
+
- ab58424: A pipe's output is checked against the server's own rules before it reaches the adapter. The request is validated
|
|
110
|
+
against the caller's Contract; after each pipe, the arguments are validated against the Core Contract (plus fields the
|
|
111
|
+
caller's scope adds), so a pipe may still write what the caller cannot — a field the client Contract hides, such as a
|
|
112
|
+
password hash — but not what the server cannot store. A refusal is the new internal code `A3004 PIPE_OUTPUT_INVALID` (HTTP
|
|
113
|
+
500). The caller receives only the generic `A server pipeline produced invalid arguments.`, like every internal
|
|
114
|
+
failure; the pipe (`pipes[i]` and its function name), the operation, the offending field and its V-code go to the
|
|
115
|
+
diagnostics sink as a `PipeOutputError`, and `@aventara/nest` writes them into its error log line. Nothing reaches the
|
|
116
|
+
adapter. This holds for operations and transaction steps alike (a plan answers with `cause.operation`). Generated
|
|
117
|
+
clients map `A3004` to `InternalError`; the protocol fixtures in `@aventara/testing` include an `A3004` row.
|
|
118
|
+
- Updated dependencies [c2a3b7c]
|
|
119
|
+
- Updated dependencies [e69e88d]
|
|
120
|
+
- Updated dependencies [ab58424]
|
|
121
|
+
- Updated dependencies [23937f8]
|
|
122
|
+
- @aventara/core@0.1.0-pilot.2
|
|
123
|
+
|
|
124
|
+
## 0.1.0-pilot.1
|
|
125
|
+
|
|
126
|
+
### Patch Changes
|
|
127
|
+
|
|
128
|
+
- a45f8a8: The `400 A2000` for a request without its identity headers now says which one: `cause.message` is "The
|
|
129
|
+
Aventara-Contract-Hash header is missing." (or "The Aventara-Protocol-Version header is missing.", or both, naming both),
|
|
130
|
+
instead of the generic "The request is malformed and cannot be interpreted." It names headers only and echoes no value.
|
|
131
|
+
The code, status and every other `A2000` are unchanged. The protocol fixtures in `@aventara/testing` check the new messages, with a row
|
|
132
|
+
for a request with neither header.
|
|
133
|
+
- 799346e: The package READMEs (each package's npm page) are rewritten for the people who use the packages. The Prisma 7
|
|
134
|
+
adapter's README now states the actual behaviour of a to-many relation or `$count` projected on
|
|
135
|
+
`update.many`/`create.many`: a validation refusal, `A2004` with `V1008`, before any statement runs (it said `A3001`).
|
|
136
|
+
Every install or run command names the `@pilot` dist-tag.
|
|
137
|
+
- Updated dependencies [a45f8a8]
|
|
138
|
+
- Updated dependencies [799346e]
|
|
139
|
+
- @aventara/core@0.1.0-pilot.1
|
|
140
|
+
|
|
141
|
+
## 0.1.0-pilot.0
|
|
142
|
+
|
|
143
|
+
### Minor Changes
|
|
144
|
+
|
|
145
|
+
- First pilot release of `@aventara/testing`: tools for testing an Aventara application, an adapter or a host.
|
|
146
|
+
|
|
147
|
+
- `createFakeAdapter` — an in-memory adapter, so a Framework can be built and exercised without a database. Its
|
|
148
|
+
discovered model is `FakeAdapter.model`.
|
|
149
|
+
- `AvProtocolFixtures` (each one an `AvProtocolFixture`) — the HTTP protocol's conformance fixtures: every outcome
|
|
150
|
+
code and success status, contract discovery (`GET /_contract`), missing routes and a stale client, argument
|
|
151
|
+
validation, body, media-type and method refusals, transactions (including client-scope rules on `/_transactions`),
|
|
152
|
+
wire scalars and request ids.
|
|
153
|
+
- `AvProtocolDriver` and `runAvProtocolConformance(driver)` — run the fixtures against your own host: the driver
|
|
154
|
+
mounts the protocol for a Framework and answers requests, and each fixture's mismatches are reported.
|
|
155
|
+
|
|
156
|
+
### Patch Changes
|
|
157
|
+
|
|
158
|
+
- Updated dependencies
|
|
159
|
+
- @aventara/core@0.1.0-pilot.0
|
package/README.md
CHANGED
|
@@ -8,6 +8,9 @@ from outside.
|
|
|
8
8
|
- `runAvProtocolConformance(driver)` — drives the protocol corpus (`AvProtocolFixtures`) through one host and reports,
|
|
9
9
|
per row, every mismatch with the expected status, code, cause, headers and body. A host supplies an
|
|
10
10
|
`AvProtocolDriver`: given a `Framework`, a session that sends one protocol request and returns the answer, and closes.
|
|
11
|
+
- `AvProtocolCorpus` — the corpus's server side, for serving it through your own client or host (below).
|
|
12
|
+
- `@aventara/testing/fixtures/protocol-v1.json` — the same corpus as plain JSON, for a client or host written in any
|
|
13
|
+
language (below).
|
|
11
14
|
|
|
12
15
|
It depends on `@aventara/core` only.
|
|
13
16
|
|
|
@@ -19,6 +22,54 @@ npm install --save-dev @aventara/testing
|
|
|
19
22
|
|
|
20
23
|
Node `^22.18.0 || >=24.2.0`. ES modules.
|
|
21
24
|
|
|
25
|
+
## Serving the corpus through your own stack
|
|
26
|
+
|
|
27
|
+
`runAvProtocolConformance` builds the corpus `Framework` itself. To serve it from a host or test bench of your own — to
|
|
28
|
+
point a client you are writing at it, say — take it from `AvProtocolCorpus`:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { AvProtocolCorpus, AvProtocolFixtures } from "@aventara/testing";
|
|
32
|
+
|
|
33
|
+
const framework = await AvProtocolCorpus.framework();
|
|
34
|
+
// Mount `framework` under AvProtocolCorpus.entrypoint ("/api") with your host,
|
|
35
|
+
// then send each row's `request` and compare the answer with the row's `server`.
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- `framework(contractHash?)` — a fresh corpus `Framework`, backed by an in-memory adapter whose answers every row
|
|
39
|
+
states. Pass a row's `Aventara-Contract-Hash` to get the contract that row targets: a few rows target a second
|
|
40
|
+
contract without transactions, and every other hash (a stale one included) gets the main contract.
|
|
41
|
+
- `entrypoint` — where the corpus is mounted; every row's `path` is relative to it.
|
|
42
|
+
- `clientContractHash` — the main ClientContract's hash: what a client generated against it sends, and what
|
|
43
|
+
`GET /_contract` names.
|
|
44
|
+
|
|
45
|
+
A row whose `client.outcome` is `"transport-error"` describes an answer no host produces (a proxy's HTML page, a
|
|
46
|
+
dropped connection); skip it when serving, as the conformance run does. A row's `adapterCalls` counts the operations
|
|
47
|
+
the corpus adapter was handed, which only the conformance run can observe.
|
|
48
|
+
|
|
49
|
+
## The corpus as JSON
|
|
50
|
+
|
|
51
|
+
`@aventara/testing/fixtures/protocol-v1.json` holds the whole corpus for protocol version 1, generated from
|
|
52
|
+
`AvProtocolFixtures` when the package is built — every row, in the same order and with the same fields — so a client or
|
|
53
|
+
host written in another language can be held to the same answers:
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"protocolVersion": 1,
|
|
58
|
+
"entrypoint": "/api",
|
|
59
|
+
"clientContractHash": "sha256:…",
|
|
60
|
+
"contracts": [{ "hash": "sha256:…", "document": "{\"enums\":{},…}" }, …],
|
|
61
|
+
"rows": [{ "label": "…", "request": { … }, "server": { … }, "client": { … } }, …]
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
- `contracts` — each ClientContract a row targets: its hash and its exact `GET /_contract` bytes (`document`, a
|
|
66
|
+
string). The first is the main contract, `clientContractHash`; a row targets the other by sending its hash.
|
|
67
|
+
- `rows` — as `AvProtocolFixture` describes them. One body is too large to write out (one byte over the 1 MiB request
|
|
68
|
+
limit): its `request.body.content` is a recipe, `{ "prefix": "…", "repeat": "x", "times": 1048567, "suffix": "…" }`,
|
|
69
|
+
standing for `prefix` + `repeat` repeated `times` times + `suffix`. Every other `content` is the body's text.
|
|
70
|
+
|
|
71
|
+
From JavaScript: `require("@aventara/testing/fixtures/protocol-v1.json")`, or `import` it `with { type: "json" }`.
|
|
72
|
+
|
|
22
73
|
## Documentation
|
|
23
74
|
|
|
24
75
|
`@aventara/core`'s README is where to start (the framework, its adapters and hosts). `@aventara/nest` is held to this
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { Adapter, AdapterModel
|
|
1
|
+
import type { Adapter, AdapterModel } from "@aventara/core";
|
|
2
|
+
import type { AdapterOperation } from "@aventara/core/internal";
|
|
2
3
|
/** Answers one operation the fake Adapter is handed. */
|
|
3
4
|
export type FakeAdapterExecute<M extends AdapterModel> = (operation: AdapterOperation<M>) => unknown | Promise<unknown>;
|
|
4
5
|
/** How a transaction ended: `"committed"` or `"rolled-back"`. */
|
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export type { AdapterFactory } from "./adapters/adapter-factory.js";
|
|
|
2
2
|
export type { FakeAdapter, FakeAdapterExecute, FakeAdapterOptions, FakeAdapterRollback, FakeTransactionOutcome, FakeTransactionTrace, } from "./adapters/fake-adapter.js";
|
|
3
3
|
export { createFakeAdapter } from "./adapters/fake-adapter.js";
|
|
4
4
|
export { runAvProtocolConformance } from "./protocol/protocol-conformance.js";
|
|
5
|
+
export { AvProtocolCorpus } from "./protocol/protocol-corpus.js";
|
|
5
6
|
export type { AvProtocolDriver } from "./protocol/protocol-driver.js";
|
|
6
7
|
export type { AvProtocolFixture } from "./protocol/protocol-fixture.js";
|
|
7
8
|
export { AvProtocolFixtures } from "./protocol/protocol-fixtures.js";
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { createFakeAdapter } from "./adapters/fake-adapter.js";
|
|
2
2
|
export { runAvProtocolConformance } from "./protocol/protocol-conformance.js";
|
|
3
|
+
export { AvProtocolCorpus } from "./protocol/protocol-corpus.js";
|
|
3
4
|
export { AvProtocolFixtures } from "./protocol/protocol-fixtures.js";
|
|
@@ -81,7 +81,14 @@ export const CORPUS_MODEL = {
|
|
|
81
81
|
},
|
|
82
82
|
};
|
|
83
83
|
export const CORPUS_REFERENTIAL_ACTIONS = {
|
|
84
|
-
books: [
|
|
84
|
+
books: [
|
|
85
|
+
{
|
|
86
|
+
field: "author",
|
|
87
|
+
target: "authors",
|
|
88
|
+
references: ["authorId"],
|
|
89
|
+
onDelete: "cascade",
|
|
90
|
+
},
|
|
91
|
+
],
|
|
85
92
|
};
|
|
86
93
|
export const CORPUS_TRIGGER = {
|
|
87
94
|
unauthenticated: "A4000",
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { Framework } from "@aventara/core";
|
|
2
|
+
/**
|
|
3
|
+
* The server side of the protocol fixture corpus (`AvProtocolFixtures`), for
|
|
4
|
+
* a client or host author who serves it through their own stack: a Framework
|
|
5
|
+
* whose answers every corpus row states, the entrypoint its rows' paths are
|
|
6
|
+
* relative to, and the hash of the ClientContract it serves.
|
|
7
|
+
*
|
|
8
|
+
* ```ts
|
|
9
|
+
* const framework = await AvProtocolCorpus.framework();
|
|
10
|
+
* // mount it under AvProtocolCorpus.entrypoint with your host, then send the
|
|
11
|
+
* // rows of AvProtocolFixtures and compare each answer with the row's `server`
|
|
12
|
+
* ```
|
|
13
|
+
*/
|
|
14
|
+
export declare const AvProtocolCorpus: {
|
|
15
|
+
/**
|
|
16
|
+
* A fresh corpus Framework, backed by an in-memory Adapter whose answer is a
|
|
17
|
+
* pure function of the operation it is handed. `contractHash` picks which
|
|
18
|
+
* corpus ClientContract it serves, as a row's `Aventara-Contract-Hash` does:
|
|
19
|
+
* the corpus's `transactions: "none"` contract for that contract's hash (the
|
|
20
|
+
* `/_transactions` absence rows send it), the main one for anything else.
|
|
21
|
+
*/
|
|
22
|
+
readonly framework: (contractHash?: string) => Promise<Framework>;
|
|
23
|
+
/** Where the corpus Framework is mounted; every row's `path` is relative to it. */
|
|
24
|
+
readonly entrypoint: string;
|
|
25
|
+
/**
|
|
26
|
+
* The hash of the main corpus ClientContract — what a client generated against
|
|
27
|
+
* it sends as `Aventara-Contract-Hash`, and what `GET /_contract` names.
|
|
28
|
+
*/
|
|
29
|
+
readonly clientContractHash: string;
|
|
30
|
+
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { CORPUS_CLIENT_CONTRACT_HASH, CORPUS_ENTRYPOINT, createCorpusFramework, } from "./corpus-contract.fixture.js";
|
|
2
|
+
export const AvProtocolCorpus = Object.freeze({
|
|
3
|
+
framework: async (contractHash) => (await createCorpusFramework(contractHash)).framework,
|
|
4
|
+
entrypoint: CORPUS_ENTRYPOINT,
|
|
5
|
+
clientContractHash: CORPUS_CLIENT_CONTRACT_HASH,
|
|
6
|
+
});
|
|
@@ -322,20 +322,20 @@ const TRANSACTIONS = [
|
|
|
322
322
|
]), 422, "A2004", [{ code: "V1019", path: ["operations", 1, "resource"] }], 1),
|
|
323
323
|
...["scope", "origin"].map((key) => invalid(`transaction — a plan node carrying "${key}" cannot smuggle an origin → 422 A2004 / V1001`, planRequest(`corpus-tx-smuggle-${key}`, [
|
|
324
324
|
{ ...AUTHORS_FIND_MANY, [key]: "application" },
|
|
325
|
-
]), 422, "A2004", [{ code: "V1001", path: [key] }], 0)),
|
|
325
|
+
]), 422, "A2004", [{ code: "V1001", path: ["operations", 0, key] }], 0)),
|
|
326
326
|
invalid("a client-hidden field — single route", corpusRequest("find/many", { select: ["id", "secret"] }, "corpus-r1-field"), 422, "A2004", [{ code: "V1005", path: ["arguments", "select", 1] }]),
|
|
327
327
|
invalid("a client-hidden field — /_transactions", planRequest("corpus-r1-field-tx", [
|
|
328
328
|
AUTHORS_FIND_MANY,
|
|
329
329
|
planNode("authors", "find.many", { select: ["id", "secret"] }, "fp1:1t8vSfPuohv1N5MIX8ccNw"),
|
|
330
|
-
]), 422, "A2004", [{ code: "V1005", path: ["
|
|
330
|
+
]), 422, "A2004", [{ code: "V1005", path: ["operations", 1, "args", "select", 1] }], 1),
|
|
331
331
|
invalid("a client-restricted variant — single route", {
|
|
332
332
|
...corpusRequest("", {}, "corpus-r1-variant"),
|
|
333
333
|
path: "/_resources/secrets/find/many",
|
|
334
|
-
}, 404, "A2002", [{ code: "V1006", path: ["
|
|
334
|
+
}, 404, "A2002", [{ code: "V1006", path: ["family"] }]),
|
|
335
335
|
invalid("a client-restricted variant — /_transactions", planRequest("corpus-r1-variant-tx", [
|
|
336
336
|
AUTHORS_FIND_MANY,
|
|
337
337
|
planNode("secrets", "find.many", {}, "fp1:KegI5OcquDHi8z39VH11EQ"),
|
|
338
|
-
]), 404, "A2002", [{ code: "V1006", path: ["
|
|
338
|
+
]), 404, "A2002", [{ code: "V1006", path: ["operations", 1, "family"] }], 1),
|
|
339
339
|
invalid("a client-hidden Resource — single route", {
|
|
340
340
|
...corpusRequest("", {}, "corpus-r1-resource"),
|
|
341
341
|
path: "/_resources/hiddenRes/find/many",
|
|
@@ -343,7 +343,7 @@ const TRANSACTIONS = [
|
|
|
343
343
|
invalid("a client-hidden Resource — /_transactions", planRequest("corpus-r1-resource-tx", [
|
|
344
344
|
AUTHORS_FIND_MANY,
|
|
345
345
|
planNode("hiddenRes", "find.many", {}, "fp1:UY6pLVLKM2LaIMnfQa0zGw"),
|
|
346
|
-
]), 404, "A2001", [{ code: "V1005", path: ["resource"] }], 1),
|
|
346
|
+
]), 404, "A2001", [{ code: "V1005", path: ["operations", 1, "resource"] }], 1),
|
|
347
347
|
refused("method: GET on /_transactions → 405 A2012 with Allow: POST", planRequest("corpus-tx-get", [AUTHORS_FIND_MANY], { method: "GET" }), 405, "A2012", "The HTTP method is not allowed on this framework route.", { Allow: "POST" }),
|
|
348
348
|
];
|
|
349
349
|
const STALE_HASH = `sha256:${"0".repeat(64)}`;
|
|
@@ -370,11 +370,11 @@ const absentRequest = (path, requestId, headers = {}, method = "POST") => {
|
|
|
370
370
|
const base = corpusRequest("", {}, requestId);
|
|
371
371
|
return { ...base, method, path, headers: { ...base.headers, ...headers } };
|
|
372
372
|
};
|
|
373
|
-
const unavailableOperation = (resource, operation) => ({
|
|
373
|
+
const unavailableOperation = (resource, operation, key) => ({
|
|
374
374
|
message: VALIDATION_FAILED,
|
|
375
375
|
issues: [
|
|
376
376
|
{
|
|
377
|
-
path: [
|
|
377
|
+
path: [key],
|
|
378
378
|
code: "V1006",
|
|
379
379
|
message: `Operation "${operation}" is not available on Resource "${resource}".`,
|
|
380
380
|
},
|
|
@@ -391,7 +391,7 @@ const unavailableResource = (resource) => ({
|
|
|
391
391
|
],
|
|
392
392
|
});
|
|
393
393
|
const ABSENCE = [
|
|
394
|
-
absent("an unadvertised operation, current hash → 404 A2002", absentRequest("/_resources/books/delete/many", "corpus-absent-op"), 404, "A2002", unavailableOperation("books", "delete.many")),
|
|
394
|
+
absent("an unadvertised operation, current hash → 404 A2002", absentRequest("/_resources/books/delete/many", "corpus-absent-op"), 404, "A2002", unavailableOperation("books", "delete.many", "family")),
|
|
395
395
|
absent("an unadvertised operation, stale hash → 409 A2005 (regenerate)", absentRequest("/_resources/books/delete/many", "corpus-absent-stale", {
|
|
396
396
|
"Aventara-Contract-Hash": STALE_HASH,
|
|
397
397
|
}), 409, "A2005", {
|
|
@@ -404,7 +404,7 @@ const ABSENCE = [
|
|
|
404
404
|
"Aventara-Protocol-Version": "2",
|
|
405
405
|
}), 400, "A2006", { message: "Aventara protocol version does not match the server." }),
|
|
406
406
|
absent("an unknown Resource → 404 A2001", absentRequest("/_resources/nope/find/many", "corpus-absent-resource"), 404, "A2001", unavailableResource("nope")),
|
|
407
|
-
absent("a Resource with operations: {} → 404 A2002", absentRequest("/_resources/secrets/find/many", "corpus-absent-empty"), 404, "A2002", unavailableOperation("secrets", "find.many")),
|
|
407
|
+
absent("a Resource with operations: {} → 404 A2002", absentRequest("/_resources/secrets/find/many", "corpus-absent-empty"), 404, "A2002", unavailableOperation("secrets", "find.many", "family")),
|
|
408
408
|
absent("a client-hidden Resource → 404 A2001", absentRequest("/_resources/hiddenRes/find/many", "corpus-absent-hidden"), 404, "A2001", unavailableResource("hiddenRes")),
|
|
409
409
|
absent('/_transactions under transactions "none" → 404 A2002 at ["operations"]', {
|
|
410
410
|
...planRequest("corpus-absent-tx-none", [AUTHORS_FIND_MANY]),
|
|
@@ -476,6 +476,35 @@ const CREATE_ID = planNode("authors", "create.one", { data: { name: CORPUS_AUTHO
|
|
|
476
476
|
const CREATE_ID_PRINT = CREATE_ID.fingerprint;
|
|
477
477
|
const FIRST_NOBODY = planNode("authors", "find.first", { where: { id: CORPUS_NOBODY } }, "fp1:qNR9mD7_iVygNtmuuXjymw");
|
|
478
478
|
const ARGUMENTS_FAILED = "Operation arguments failed framework validation.";
|
|
479
|
+
const TRANSACTION_REFERENCES = [
|
|
480
|
+
answered("transaction — a unique where and a filter reference an earlier step's result → 200 A1009", planRequest("corpus-tx-ref-where", [
|
|
481
|
+
CREATE_ID,
|
|
482
|
+
planNode("authors", "find.unique", { where: { id: ref(0, CREATE_ID_PRINT, "id") } }, "fp1:hKbxzChGakplMZvnpEa1_w"),
|
|
483
|
+
planNode("authors", "find.many", { where: { OR: [{ id: { equals: ref(0, CREATE_ID_PRINT, "id") } }] } }, "fp1:4LK9l_j8Skjk4iU_wSoRzQ"),
|
|
484
|
+
]), 200, 3, {
|
|
485
|
+
data: [{ id: CORPUS_AUTHOR.id }, CORPUS_AUTHOR, [CORPUS_AUTHOR]],
|
|
486
|
+
code: "A1009",
|
|
487
|
+
cause: null,
|
|
488
|
+
}),
|
|
489
|
+
answered("argument: a plan reference in a where to an operation index no earlier step has → 422 A2007 / V1016", planRequest("corpus-arg-ref-where-index", [
|
|
490
|
+
CREATE_ID,
|
|
491
|
+
planNode("authors", "find.unique", { where: { id: ref(5, CREATE_ID_PRINT, "id") } }, "fp1:VS6Zk71avpYzuC90z8qzrQ"),
|
|
492
|
+
]), 422, 0, {
|
|
493
|
+
data: null,
|
|
494
|
+
code: "A2007",
|
|
495
|
+
cause: {
|
|
496
|
+
message: ARGUMENTS_FAILED,
|
|
497
|
+
issues: [
|
|
498
|
+
{
|
|
499
|
+
code: "V1016",
|
|
500
|
+
path: ["operations", 1, "args", "where", "id", "$ref", "operation"],
|
|
501
|
+
message: "Transaction reference operation index is invalid.",
|
|
502
|
+
},
|
|
503
|
+
],
|
|
504
|
+
operation: 1,
|
|
505
|
+
},
|
|
506
|
+
}),
|
|
507
|
+
];
|
|
479
508
|
const ARGUMENT_VALIDATION = [
|
|
480
509
|
answered("argument: an unknown field in where → 422 A2004 / V1005", corpusRequest("find/many", { where: { nope: { equals: "x" } } }, "corpus-arg-field"), 422, 0, {
|
|
481
510
|
data: null,
|
|
@@ -818,6 +847,7 @@ export const AvProtocolFixtures = [
|
|
|
818
847
|
...METHOD,
|
|
819
848
|
...ABSENCE,
|
|
820
849
|
...TRANSACTIONS,
|
|
850
|
+
...TRANSACTION_REFERENCES,
|
|
821
851
|
...INTERNAL,
|
|
822
852
|
...CONFLICT,
|
|
823
853
|
...WIRE_SCALARS,
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { AvProtocolFixture } from "./protocol-fixture.js";
|
|
2
|
+
/**
|
|
3
|
+
* A long run of one character in a request body, spelled as a recipe instead of
|
|
4
|
+
* its bytes: `prefix + repeat × times + suffix`. The one oversized-body row
|
|
5
|
+
* would otherwise be a megabyte of `x`.
|
|
6
|
+
*/
|
|
7
|
+
export type ProtocolFixtureContentRecipe = {
|
|
8
|
+
readonly prefix?: string;
|
|
9
|
+
readonly repeat: string;
|
|
10
|
+
readonly times: number;
|
|
11
|
+
readonly suffix?: string;
|
|
12
|
+
};
|
|
13
|
+
/** A row as the JSON file holds it: a raw body's content may be a recipe. */
|
|
14
|
+
export type ProtocolFixtureJsonRow = Omit<AvProtocolFixture, "request"> & {
|
|
15
|
+
readonly request: Omit<AvProtocolFixture["request"], "body"> & {
|
|
16
|
+
readonly body: {
|
|
17
|
+
readonly kind: "raw";
|
|
18
|
+
readonly content: string | ProtocolFixtureContentRecipe;
|
|
19
|
+
} | {
|
|
20
|
+
readonly kind: "parsed";
|
|
21
|
+
readonly value: unknown;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
/** The file: the protocol version, the corpus's mount point, its ClientContracts, every row. */
|
|
26
|
+
export type ProtocolFixturesJson = {
|
|
27
|
+
readonly protocolVersion: number;
|
|
28
|
+
readonly entrypoint: string;
|
|
29
|
+
readonly clientContractHash: string;
|
|
30
|
+
/** Each ClientContract a row targets: its hash and its exact `GET /_contract` bytes. */
|
|
31
|
+
readonly contracts: readonly {
|
|
32
|
+
readonly hash: string;
|
|
33
|
+
readonly document: string;
|
|
34
|
+
}[];
|
|
35
|
+
readonly rows: readonly ProtocolFixtureJsonRow[];
|
|
36
|
+
};
|
|
37
|
+
/** A row of the file, expanded back to the TS row it was written from. */
|
|
38
|
+
export declare function expandProtocolFixtureRow(row: ProtocolFixtureJsonRow): AvProtocolFixture;
|
|
39
|
+
/**
|
|
40
|
+
* `fixtures/protocol-v1.json`, as text: one line per ClientContract and per row,
|
|
41
|
+
* in corpus order, so a change to the corpus is a change to its own lines.
|
|
42
|
+
*/
|
|
43
|
+
export declare function protocolFixturesJson(): Promise<string>;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { AVENTARA_PROTOCOL_VERSION } from "@aventara/core/internal";
|
|
2
|
+
import { AvProtocol } from "@aventara/core/protocol";
|
|
3
|
+
import { CORPUS_CLIENT_CONTRACT_HASH, CORPUS_ENTRYPOINT, CORPUS_NONE_CLIENT_CONTRACT_HASH, createCorpusFramework, } from "./corpus-contract.fixture.js";
|
|
4
|
+
import { AvProtocolFixtures } from "./protocol-fixtures.js";
|
|
5
|
+
const RECIPE_MINIMUM = 1024;
|
|
6
|
+
function recipeOf(text) {
|
|
7
|
+
let best = { start: 0, length: 0 };
|
|
8
|
+
let start = 0;
|
|
9
|
+
for (let index = 1; index <= text.length; index += 1) {
|
|
10
|
+
if (index === text.length || text[index] !== text[start]) {
|
|
11
|
+
if (index - start > best.length) {
|
|
12
|
+
best = { start, length: index - start };
|
|
13
|
+
}
|
|
14
|
+
start = index;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
if (best.length < RECIPE_MINIMUM) {
|
|
18
|
+
return undefined;
|
|
19
|
+
}
|
|
20
|
+
const prefix = text.slice(0, best.start);
|
|
21
|
+
const suffix = text.slice(best.start + best.length);
|
|
22
|
+
return {
|
|
23
|
+
...(prefix === "" ? {} : { prefix }),
|
|
24
|
+
repeat: text[best.start],
|
|
25
|
+
times: best.length,
|
|
26
|
+
...(suffix === "" ? {} : { suffix }),
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
function encodeRow(row) {
|
|
30
|
+
const { body } = row.request;
|
|
31
|
+
if (body.kind === "parsed") {
|
|
32
|
+
return { ...row, request: { ...row.request, body } };
|
|
33
|
+
}
|
|
34
|
+
if (typeof body.content !== "string") {
|
|
35
|
+
throw new Error(`protocol fixture "${row.label}": a body of bytes has no JSON spelling`);
|
|
36
|
+
}
|
|
37
|
+
return {
|
|
38
|
+
...row,
|
|
39
|
+
request: {
|
|
40
|
+
...row.request,
|
|
41
|
+
body: { kind: "raw", content: recipeOf(body.content) ?? body.content },
|
|
42
|
+
},
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
export function expandProtocolFixtureRow(row) {
|
|
46
|
+
const { body } = row.request;
|
|
47
|
+
if (body.kind === "parsed" || typeof body.content === "string") {
|
|
48
|
+
return row;
|
|
49
|
+
}
|
|
50
|
+
const { prefix = "", repeat, times, suffix = "" } = body.content;
|
|
51
|
+
return {
|
|
52
|
+
...row,
|
|
53
|
+
request: {
|
|
54
|
+
...row.request,
|
|
55
|
+
body: { kind: "raw", content: prefix + repeat.repeat(times) + suffix },
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
async function contractDocument(contractHash) {
|
|
60
|
+
const { framework } = await createCorpusFramework(contractHash);
|
|
61
|
+
return AvProtocol.bind(framework).encodeContract({
|
|
62
|
+
method: "GET",
|
|
63
|
+
path: "/_contract",
|
|
64
|
+
headers: {},
|
|
65
|
+
body: { kind: "raw", content: "" },
|
|
66
|
+
}).body;
|
|
67
|
+
}
|
|
68
|
+
export async function protocolFixturesJson() {
|
|
69
|
+
if (AVENTARA_PROTOCOL_VERSION !== 1) {
|
|
70
|
+
throw new Error(`protocol-v1.json describes protocol version 1, not ${AVENTARA_PROTOCOL_VERSION}`);
|
|
71
|
+
}
|
|
72
|
+
const contracts = [
|
|
73
|
+
{
|
|
74
|
+
hash: CORPUS_CLIENT_CONTRACT_HASH,
|
|
75
|
+
document: await contractDocument(CORPUS_CLIENT_CONTRACT_HASH),
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
hash: CORPUS_NONE_CLIENT_CONTRACT_HASH,
|
|
79
|
+
document: await contractDocument(CORPUS_NONE_CLIENT_CONTRACT_HASH),
|
|
80
|
+
},
|
|
81
|
+
];
|
|
82
|
+
const head = JSON.stringify({
|
|
83
|
+
protocolVersion: AVENTARA_PROTOCOL_VERSION,
|
|
84
|
+
entrypoint: CORPUS_ENTRYPOINT,
|
|
85
|
+
clientContractHash: CORPUS_CLIENT_CONTRACT_HASH,
|
|
86
|
+
}).slice(0, -1);
|
|
87
|
+
const lines = (items) => items.map((item) => JSON.stringify(item)).join(",\n");
|
|
88
|
+
return `${head},"contracts":[\n${lines(contracts)}\n],"rows":[\n${lines(AvProtocolFixtures.map(encodeRow))}\n]}\n`;
|
|
89
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{"protocolVersion":1,"entrypoint":"/api","clientContractHash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","contracts":[
|
|
2
|
+
{"hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","document":"{\"enums\":{},\"limits\":{\"maxBooleanNodes\":50,\"maxListLimit\":250,\"maxNestingDepth\":12,\"maxRequestBytes\":1048576,\"maxTransactionOperations\":20},\"protocol\":{\"hash\":\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\",\"version\":1},\"resources\":{\"authors\":{\"fields\":{\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"name\":{\"capabilities\":{\"create\":[],\"filter\":[\"equals\"],\"select\":true,\"update\":[]},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"create\":{\"count\":true,\"many\":true,\"one\":true},\"delete\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"find\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"update\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"upsert\":{\"unique\":true}}},\"books\":{\"fields\":{\"authorId\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"label\":{\"capabilities\":{\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[\"COMPUTED_ON_READ\",\"VIRTUAL\"],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"find\":{\"many\":true}}},\"samples\":{\"fields\":{\"amount\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"decimal\"}},\"at\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"datetime\"}},\"blob\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"bytes\"}},\"count\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"bigint\"}},\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"create\":{\"one\":true},\"find\":{\"unique\":true}}},\"secrets\":{\"fields\":{\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{}}},\"scalars\":{\"bigint\":{\"builtin\":true},\"bytes\":{\"builtin\":true},\"datetime\":{\"builtin\":true},\"decimal\":{\"builtin\":true},\"string\":{\"builtin\":true}},\"transactions\":\"interactive\"}"},
|
|
3
|
+
{"hash":"sha256:d333e8396b9bf9127e0859ed69b9874f230058a597e2129e6b9e9b380daef618","document":"{\"enums\":{},\"limits\":{\"maxBooleanNodes\":50,\"maxListLimit\":250,\"maxNestingDepth\":12,\"maxRequestBytes\":1048576,\"maxTransactionOperations\":20},\"protocol\":{\"hash\":\"sha256:d333e8396b9bf9127e0859ed69b9874f230058a597e2129e6b9e9b380daef618\",\"version\":1},\"resources\":{\"authors\":{\"fields\":{\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"name\":{\"capabilities\":{\"create\":[],\"filter\":[\"equals\"],\"select\":true,\"update\":[]},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"create\":{\"count\":true,\"many\":true,\"one\":true},\"delete\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"find\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"update\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"upsert\":{\"unique\":true}}},\"books\":{\"fields\":{\"authorId\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"label\":{\"capabilities\":{\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[\"COMPUTED_ON_READ\",\"VIRTUAL\"],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"find\":{\"many\":true}}},\"samples\":{\"fields\":{\"amount\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"decimal\"}},\"at\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"datetime\"}},\"blob\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"bytes\"}},\"count\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"bigint\"}},\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"create\":{\"one\":true},\"find\":{\"unique\":true}}},\"secrets\":{\"fields\":{\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{}}},\"scalars\":{\"bigint\":{\"builtin\":true},\"bytes\":{\"builtin\":true},\"datetime\":{\"builtin\":true},\"decimal\":{\"builtin\":true},\"string\":{\"builtin\":true}},\"transactions\":\"none\"}"}
|
|
4
|
+
],"rows":[
|
|
5
|
+
{"label":"contract: GET → 200 with the JCS bytes, ETag and no-cache","request":{"method":"GET","path":"/_contract","headers":{"Aventara-Request-Id":"corpus-contract"},"body":{"kind":"raw","content":""}},"server":{"status":200,"code":null,"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-contract","ETag":"\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\"","Cache-Control":"no-cache"},"bodyBytes":"{\"enums\":{},\"limits\":{\"maxBooleanNodes\":50,\"maxListLimit\":250,\"maxNestingDepth\":12,\"maxRequestBytes\":1048576,\"maxTransactionOperations\":20},\"protocol\":{\"hash\":\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\",\"version\":1},\"resources\":{\"authors\":{\"fields\":{\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"name\":{\"capabilities\":{\"create\":[],\"filter\":[\"equals\"],\"select\":true,\"update\":[]},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"create\":{\"count\":true,\"many\":true,\"one\":true},\"delete\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"find\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"update\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"upsert\":{\"unique\":true}}},\"books\":{\"fields\":{\"authorId\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"label\":{\"capabilities\":{\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[\"COMPUTED_ON_READ\",\"VIRTUAL\"],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"find\":{\"many\":true}}},\"samples\":{\"fields\":{\"amount\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"decimal\"}},\"at\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"datetime\"}},\"blob\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"bytes\"}},\"count\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"bigint\"}},\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"create\":{\"one\":true},\"find\":{\"unique\":true}}},\"secrets\":{\"fields\":{\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{}}},\"scalars\":{\"bigint\":{\"builtin\":true},\"bytes\":{\"builtin\":true},\"datetime\":{\"builtin\":true},\"decimal\":{\"builtin\":true},\"string\":{\"builtin\":true}},\"transactions\":\"interactive\"}"},"client":{"outcome":"resolve"}},
|
|
6
|
+
{"label":"contract: no identity header is required, nor judged when sent","request":{"method":"GET","path":"/_contract","headers":{"Aventara-Request-Id":"corpus-contract-identity","Aventara-Protocol-Version":"2","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":""}},"server":{"status":200,"code":null,"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-contract-identity","ETag":"\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\"","Cache-Control":"no-cache"},"bodyBytes":"{\"enums\":{},\"limits\":{\"maxBooleanNodes\":50,\"maxListLimit\":250,\"maxNestingDepth\":12,\"maxRequestBytes\":1048576,\"maxTransactionOperations\":20},\"protocol\":{\"hash\":\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\",\"version\":1},\"resources\":{\"authors\":{\"fields\":{\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"name\":{\"capabilities\":{\"create\":[],\"filter\":[\"equals\"],\"select\":true,\"update\":[]},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"create\":{\"count\":true,\"many\":true,\"one\":true},\"delete\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"find\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"update\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"upsert\":{\"unique\":true}}},\"books\":{\"fields\":{\"authorId\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"label\":{\"capabilities\":{\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[\"COMPUTED_ON_READ\",\"VIRTUAL\"],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"find\":{\"many\":true}}},\"samples\":{\"fields\":{\"amount\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"decimal\"}},\"at\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"datetime\"}},\"blob\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"bytes\"}},\"count\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"bigint\"}},\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"create\":{\"one\":true},\"find\":{\"unique\":true}}},\"secrets\":{\"fields\":{\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{}}},\"scalars\":{\"bigint\":{\"builtin\":true},\"bytes\":{\"builtin\":true},\"datetime\":{\"builtin\":true},\"decimal\":{\"builtin\":true},\"string\":{\"builtin\":true}},\"transactions\":\"interactive\"}"},"client":{"outcome":"resolve"}},
|
|
7
|
+
{"label":"contract: If-None-Match the quoted hash → 304","request":{"method":"GET","path":"/_contract","headers":{"Aventara-Request-Id":"corpus-contract-304","If-None-Match":"\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\""},"body":{"kind":"raw","content":""}},"server":{"status":304,"code":null,"adapterCalls":0,"responseHeaders":{"Aventara-Request-Id":"corpus-contract-304","ETag":"\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\"","Cache-Control":"no-cache"},"bodyBytes":""},"client":{"outcome":"resolve"}},
|
|
8
|
+
{"label":"contract: If-None-Match weak W/ → 304","request":{"method":"GET","path":"/_contract","headers":{"Aventara-Request-Id":"corpus-contract-304-weak","If-None-Match":"W/\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\""},"body":{"kind":"raw","content":""}},"server":{"status":304,"code":null,"adapterCalls":0,"responseHeaders":{"Aventara-Request-Id":"corpus-contract-304-weak","ETag":"\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\"","Cache-Control":"no-cache"},"bodyBytes":""},"client":{"outcome":"resolve"}},
|
|
9
|
+
{"label":"contract: If-None-Match a list holding it → 304","request":{"method":"GET","path":"/_contract","headers":{"Aventara-Request-Id":"corpus-contract-304-list","If-None-Match":"\"sha256:old\", \"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\""},"body":{"kind":"raw","content":""}},"server":{"status":304,"code":null,"adapterCalls":0,"responseHeaders":{"Aventara-Request-Id":"corpus-contract-304-list","ETag":"\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\"","Cache-Control":"no-cache"},"bodyBytes":""},"client":{"outcome":"resolve"}},
|
|
10
|
+
{"label":"contract: If-None-Match * → 304","request":{"method":"GET","path":"/_contract","headers":{"Aventara-Request-Id":"corpus-contract-304-star","If-None-Match":"*"},"body":{"kind":"raw","content":""}},"server":{"status":304,"code":null,"adapterCalls":0,"responseHeaders":{"Aventara-Request-Id":"corpus-contract-304-star","ETag":"\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\"","Cache-Control":"no-cache"},"bodyBytes":""},"client":{"outcome":"resolve"}},
|
|
11
|
+
{"label":"contract: If-None-Match another hash → 200","request":{"method":"GET","path":"/_contract","headers":{"Aventara-Request-Id":"corpus-contract-stale","If-None-Match":"\"sha256:old\""},"body":{"kind":"raw","content":""}},"server":{"status":200,"code":null,"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-contract-stale","ETag":"\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\"","Cache-Control":"no-cache"},"bodyBytes":"{\"enums\":{},\"limits\":{\"maxBooleanNodes\":50,\"maxListLimit\":250,\"maxNestingDepth\":12,\"maxRequestBytes\":1048576,\"maxTransactionOperations\":20},\"protocol\":{\"hash\":\"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0\",\"version\":1},\"resources\":{\"authors\":{\"fields\":{\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"name\":{\"capabilities\":{\"create\":[],\"filter\":[\"equals\"],\"select\":true,\"update\":[]},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"create\":{\"count\":true,\"many\":true,\"one\":true},\"delete\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"find\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"update\":{\"count\":true,\"first\":true,\"many\":true,\"unique\":true},\"upsert\":{\"unique\":true}}},\"books\":{\"fields\":{\"authorId\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}},\"label\":{\"capabilities\":{\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[\"COMPUTED_ON_READ\",\"VIRTUAL\"],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"find\":{\"many\":true}}},\"samples\":{\"fields\":{\"amount\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"decimal\"}},\"at\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"datetime\"}},\"blob\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"bytes\"}},\"count\":{\"capabilities\":{\"create\":[],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"bigint\"}},\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{\"create\":{\"one\":true},\"find\":{\"unique\":true}}},\"secrets\":{\"fields\":{\"id\":{\"capabilities\":{\"filter\":[\"equals\"],\"select\":true},\"kind\":\"scalar\",\"lifecycle\":[],\"list\":false,\"nullable\":false,\"type\":{\"scalar\":\"string\"}}},\"identifiers\":[[\"id\"]],\"operations\":{}}},\"scalars\":{\"bigint\":{\"builtin\":true},\"bytes\":{\"builtin\":true},\"datetime\":{\"builtin\":true},\"decimal\":{\"builtin\":true},\"string\":{\"builtin\":true}},\"transactions\":\"interactive\"}"},"client":{"outcome":"resolve"}},
|
|
12
|
+
{"label":"method: POST on /_contract → 405 A2012 with Allow: GET","request":{"method":"POST","path":"/_contract","headers":{"Aventara-Request-Id":"corpus-contract-post"},"body":{"kind":"raw","content":""}},"server":{"status":405,"code":"A2012","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-contract-post","Allow":"GET"},"bodyBytes":"{\"data\":null,\"code\":\"A2012\",\"cause\":{\"message\":\"The HTTP method is not allowed on this framework route.\"}}"},"client":{"outcome":"framework-error","code":"A2012"}},
|
|
13
|
+
{"label":"find.first","request":{"method":"POST","path":"/_resources/authors/find/first","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-find-first"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"}}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-find-first"},"bodyBytes":"{\"data\":{\"id\":\"a1\",\"name\":\"Ada\"},\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
14
|
+
{"label":"find.first matching nothing → 200 A1001 with null data","request":{"method":"POST","path":"/_resources/authors/find/first","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-find-first-miss"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"nobody\"}}"}},"server":{"status":200,"code":"A1001","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-find-first-miss"},"bodyBytes":"{\"data\":null,\"code\":\"A1001\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
15
|
+
{"label":"find.unique","request":{"method":"POST","path":"/_resources/authors/find/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-find-unique"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"}}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-find-unique"},"bodyBytes":"{\"data\":{\"id\":\"a1\",\"name\":\"Ada\"},\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
16
|
+
{"label":"find.many","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-find-many"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-find-many"},"bodyBytes":"{\"data\":[{\"id\":\"a1\",\"name\":\"Ada\"}],\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
17
|
+
{"label":"find.count","request":{"method":"POST","path":"/_resources/authors/find/count","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-find-count"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-find-count"},"bodyBytes":"{\"data\":2,\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
18
|
+
{"label":"create.one","request":{"method":"POST","path":"/_resources/authors/create/one","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-create-one"},"body":{"kind":"raw","content":"{\"data\":{\"name\":\"Ada\"}}"}},"server":{"status":201,"code":"A1002","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-create-one"},"bodyBytes":"{\"data\":{\"id\":\"a1\",\"name\":\"Ada\"},\"code\":\"A1002\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
19
|
+
{"label":"create.many","request":{"method":"POST","path":"/_resources/authors/create/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-create-many"},"body":{"kind":"raw","content":"{\"data\":[{\"name\":\"Ada\"}]}"}},"server":{"status":201,"code":"A1003","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-create-many"},"bodyBytes":"{\"data\":[{\"id\":\"a1\",\"name\":\"Ada\"}],\"code\":\"A1003\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
20
|
+
{"label":"create.count","request":{"method":"POST","path":"/_resources/authors/create/count","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-create-count"},"body":{"kind":"raw","content":"{\"data\":[{\"name\":\"Ada\"},{\"name\":\"Ada\"}]}"}},"server":{"status":201,"code":"A1003","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-create-count"},"bodyBytes":"{\"data\":2,\"code\":\"A1003\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
21
|
+
{"label":"update.first","request":{"method":"POST","path":"/_resources/authors/update/first","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-update-first"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"},\"data\":{\"name\":\"Ada\"}}"}},"server":{"status":200,"code":"A1004","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-update-first"},"bodyBytes":"{\"data\":{\"id\":\"a1\",\"name\":\"Ada\"},\"code\":\"A1004\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
22
|
+
{"label":"update.unique","request":{"method":"POST","path":"/_resources/authors/update/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-update-unique"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"},\"data\":{\"name\":\"Ada\"}}"}},"server":{"status":200,"code":"A1004","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-update-unique"},"bodyBytes":"{\"data\":{\"id\":\"a1\",\"name\":\"Ada\"},\"code\":\"A1004\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
23
|
+
{"label":"update.many","request":{"method":"POST","path":"/_resources/authors/update/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-update-many"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"},\"data\":{\"name\":\"Ada\"}}"}},"server":{"status":200,"code":"A1005","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-update-many"},"bodyBytes":"{\"data\":[{\"id\":\"a1\",\"name\":\"Ada\"}],\"code\":\"A1005\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
24
|
+
{"label":"update.count","request":{"method":"POST","path":"/_resources/authors/update/count","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-update-count"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"},\"data\":{\"name\":\"Ada\"}}"}},"server":{"status":200,"code":"A1005","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-update-count"},"bodyBytes":"{\"data\":2,\"code\":\"A1005\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
25
|
+
{"label":"delete.first","request":{"method":"POST","path":"/_resources/authors/delete/first","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-delete-first"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"}}"}},"server":{"status":200,"code":"A1006","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-delete-first"},"bodyBytes":"{\"data\":{\"id\":\"a1\",\"name\":\"Ada\"},\"code\":\"A1006\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
26
|
+
{"label":"delete.unique","request":{"method":"POST","path":"/_resources/authors/delete/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-delete-unique"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"}}"}},"server":{"status":200,"code":"A1006","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-delete-unique"},"bodyBytes":"{\"data\":{\"id\":\"a1\",\"name\":\"Ada\"},\"code\":\"A1006\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
27
|
+
{"label":"delete.many","request":{"method":"POST","path":"/_resources/authors/delete/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-delete-many"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"}}"}},"server":{"status":200,"code":"A1007","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-delete-many"},"bodyBytes":"{\"data\":[{\"id\":\"a1\",\"name\":\"Ada\"}],\"code\":\"A1007\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
28
|
+
{"label":"delete.count","request":{"method":"POST","path":"/_resources/authors/delete/count","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-delete-count"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"}}"}},"server":{"status":200,"code":"A1007","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-delete-count"},"bodyBytes":"{\"data\":2,\"code\":\"A1007\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
29
|
+
{"label":"upsert.unique","request":{"method":"POST","path":"/_resources/authors/upsert/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-upsert-unique"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"a1\"},\"create\":{\"name\":\"Ada\"},\"update\":{\"name\":\"Ada\"}}"}},"server":{"status":200,"code":"A1008","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-upsert-unique"},"bodyBytes":"{\"data\":{\"id\":\"a1\",\"name\":\"Ada\"},\"code\":\"A1008\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
30
|
+
{"label":"absence: find.unique matching nothing → 404 A2003","request":{"method":"POST","path":"/_resources/authors/find/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-none-find-unique"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"nobody\"}}"}},"server":{"status":404,"code":"A2003","causeKeys":["message"],"adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-none-find-unique"},"bodyBytes":"{\"data\":null,\"code\":\"A2003\",\"cause\":{\"message\":\"No record matched the unique selector.\"}}"},"client":{"outcome":"framework-error","code":"A2003"}},
|
|
31
|
+
{"label":"absence: find.many matching nothing → 200 A1000 with []","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-none-find-many"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"nobody\"}}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-none-find-many"},"bodyBytes":"{\"data\":[],\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
32
|
+
{"label":"absence: find.count matching nothing → 200 A1000 with 0","request":{"method":"POST","path":"/_resources/authors/find/count","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-none-find-count"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"nobody\"}}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-none-find-count"},"bodyBytes":"{\"data\":0,\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
33
|
+
{"label":"absence: update.first matching nothing → 200 A1001 with null","request":{"method":"POST","path":"/_resources/authors/update/first","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-none-update-first"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"nobody\"},\"data\":{\"name\":\"Ada\"}}"}},"server":{"status":200,"code":"A1001","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-none-update-first"},"bodyBytes":"{\"data\":null,\"code\":\"A1001\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
34
|
+
{"label":"absence: delete.first matching nothing → 200 A1001 with null","request":{"method":"POST","path":"/_resources/authors/delete/first","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-none-delete-first"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"nobody\"}}"}},"server":{"status":200,"code":"A1001","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-none-delete-first"},"bodyBytes":"{\"data\":null,\"code\":\"A1001\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
35
|
+
{"label":"absence: update.unique with no target → 404 A2003","request":{"method":"POST","path":"/_resources/authors/update/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-none-update-unique"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"nobody\"},\"data\":{\"name\":\"Ada\"}}"}},"server":{"status":404,"code":"A2003","causeKeys":["message"],"adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-none-update-unique"},"bodyBytes":"{\"data\":null,\"code\":\"A2003\",\"cause\":{\"message\":\"No record matched the unique selector.\"}}"},"client":{"outcome":"framework-error","code":"A2003"}},
|
|
36
|
+
{"label":"absence: delete.unique with no target → 404 A2003","request":{"method":"POST","path":"/_resources/authors/delete/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-none-delete-unique"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"nobody\"}}"}},"server":{"status":404,"code":"A2003","causeKeys":["message"],"adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-none-delete-unique"},"bodyBytes":"{\"data\":null,\"code\":\"A2003\",\"cause\":{\"message\":\"No record matched the unique selector.\"}}"},"client":{"outcome":"framework-error","code":"A2003"}},
|
|
37
|
+
{"label":"scope-added: a computed field added under client.fields is in the default read","request":{"method":"POST","path":"/_resources/books/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-scope-added-default"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-scope-added-default"},"bodyBytes":"{\"data\":[{\"authorId\":\"a1\",\"id\":\"b1\",\"label\":\"book:b1\"}],\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
38
|
+
{"label":"scope-added: an explicit select of it answers it alone","request":{"method":"POST","path":"/_resources/books/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-scope-added-select"},"body":{"kind":"raw","content":"{\"select\":[\"label\"]}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-scope-added-select"},"bodyBytes":"{\"data\":[{\"label\":\"book:b1\"}],\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
39
|
+
{"label":"argument: an unknown field in where → 422 A2004 / V1005","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-field"},"body":{"kind":"raw","content":"{\"where\":{\"nope\":{\"equals\":\"x\"}}}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message"],"issues":[{"code":"V1005","path":["arguments","where","nope"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-field"},"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1005\",\"path\":[\"arguments\",\"where\",\"nope\"],\"message\":\"Field \\\"nope\\\" is not available on Resource \\\"authors\\\".\"}]}}"},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
40
|
+
{"label":"argument: a filter operator the field does not advertise → 422 A2004 / V1006","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-operator"},"body":{"kind":"raw","content":"{\"where\":{\"name\":{\"contains\":\"A\"}}}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message"],"issues":[{"code":"V1006","path":["arguments","where","name","contains"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-operator"},"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1006\",\"path\":[\"arguments\",\"where\",\"name\",\"contains\"],\"message\":\"Filter operator \\\"contains\\\" is not available on field \\\"name\\\".\"}]}}"},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
41
|
+
{"label":"argument: select and include together → 422 A2004 / V1008","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-projection"},"body":{"kind":"raw","content":"{\"select\":[\"id\"],\"include\":[]}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message"],"issues":[{"code":"V1008","path":["arguments"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-projection"},"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1008\",\"path\":[\"arguments\"],\"message\":\"select and include are mutually exclusive.\"}]}}"},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
42
|
+
{"label":"argument: two defects of one family roll up together → 422 A2004 / V1001 + V1005","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-rollup"},"body":{"kind":"raw","content":"{\"take\":251,\"where\":{\"nope\":{\"equals\":1}}}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message"],"issues":[{"code":"V1001","path":["arguments","take"]},{"code":"V1005","path":["arguments","where","nope"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-rollup"},"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1001\",\"path\":[\"arguments\",\"take\"],\"message\":\"Argument \\\"take\\\" is not valid for find.many.\"},{\"code\":\"V1005\",\"path\":[\"arguments\",\"where\",\"nope\"],\"message\":\"Field \\\"nope\\\" is not available on Resource \\\"authors\\\".\"}]}}"},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
43
|
+
{"label":"argument: nesting over maxNestingDepth → 422 A2009 / V1013","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-nesting"},"body":{"kind":"raw","content":"{\"where\":{\"AND\":[{\"AND\":[{\"AND\":[{\"AND\":[{\"AND\":[{\"AND\":[{\"AND\":[{\"AND\":[{\"AND\":[{\"AND\":[{\"AND\":[{\"AND\":[{\"AND\":[{\"id\":{\"equals\":\"a1\"}}]}]}]}]}]}]}]}]}]}]}]}]}]}}"}},"server":{"status":422,"code":"A2009","causeKeys":["issues","message"],"issues":[{"code":"V1013","path":["arguments","where"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-nesting"},"bodyBytes":"{\"data\":null,\"code\":\"A2009\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"path\":[\"arguments\",\"where\"],\"code\":\"V1013\",\"message\":\"Request nesting exceeds maxNestingDepth (12).\"}]}}"},"client":{"outcome":"framework-error","code":"A2009"}},
|
|
44
|
+
{"label":"argument: filter nodes over maxBooleanNodes → 422 A2009 / V1015","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-nodes"},"body":{"kind":"raw","content":"{\"where\":{\"OR\":[{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}}]}}"}},"server":{"status":422,"code":"A2009","causeKeys":["issues","message"],"issues":[{"code":"V1015","path":["arguments","where"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-nodes"},"bodyBytes":"{\"data\":null,\"code\":\"A2009\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"path\":[\"arguments\",\"where\"],\"code\":\"V1015\",\"message\":\"Boolean/filter node count exceeds maxBooleanNodes (50).\"}]}}"},"client":{"outcome":"framework-error","code":"A2009"}},
|
|
45
|
+
{"label":"argument: a limit refuses alone, before a field defect is read → 422 A2009 / V1015","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-precedence"},"body":{"kind":"raw","content":"{\"where\":{\"OR\":[{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}},{\"id\":{\"equals\":\"a1\"}}]},\"select\":[\"nope\"]}"}},"server":{"status":422,"code":"A2009","causeKeys":["issues","message"],"issues":[{"code":"V1015","path":["arguments","where"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-precedence"},"bodyBytes":"{\"data\":null,\"code\":\"A2009\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"path\":[\"arguments\",\"where\"],\"code\":\"V1015\",\"message\":\"Boolean/filter node count exceeds maxBooleanNodes (50).\"}]}}"},"client":{"outcome":"framework-error","code":"A2009"}},
|
|
46
|
+
{"label":"argument: a plan over maxTransactionOperations → 422 A2009 / V1014","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-plan-size"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"}]}"}},"server":{"status":422,"code":"A2009","causeKeys":["issues","message"],"issues":[{"code":"V1014","path":["operations"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-plan-size"},"bodyBytes":"{\"data\":null,\"code\":\"A2009\",\"cause\":{\"message\":\"Transaction operation count exceeds the active Contract limit.\",\"issues\":[{\"code\":\"V1014\",\"path\":[\"operations\"],\"message\":\"Transaction operation count exceeds maxTransactionOperations (20).\"}]}}"},"client":{"outcome":"framework-error","code":"A2009"}},
|
|
47
|
+
{"label":"argument: a plan reference to an operation index no earlier step has → 422 A2007 / V1016","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-ref-index"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":\"Ada\"},\"select\":[\"id\"]},\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\"},{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":{\"$ref\":{\"operation\":5,\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\",\"path\":[\"id\"]}}}},\"fingerprint\":\"fp1:NOPvPjrK18ki-rp5JekbCg\"}]}"}},"server":{"status":422,"code":"A2007","causeKeys":["issues","message","operation"],"issues":[{"code":"V1016","path":["operations",1,"args","data","name","$ref","operation"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-ref-index"},"bodyBytes":"{\"data\":null,\"code\":\"A2007\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1016\",\"path\":[\"operations\",1,\"args\",\"data\",\"name\",\"$ref\",\"operation\"],\"message\":\"Transaction reference operation index is invalid.\"}],\"operation\":1}}"},"client":{"outcome":"framework-error","code":"A2007"}},
|
|
48
|
+
{"label":"argument: a plan reference to a fingerprint that is not its source's → 422 A2007 / V1017","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-ref-fingerprint"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":\"Ada\"},\"select\":[\"id\"]},\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\"},{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":{\"$ref\":{\"operation\":0,\"fingerprint\":\"fp1:AAAAAAAAAAAAAAAAAAAAAA\",\"path\":[\"id\"]}}}},\"fingerprint\":\"fp1:LMKG9r39fh8Q4FsS2EbmSQ\"}]}"}},"server":{"status":422,"code":"A2007","causeKeys":["issues","message","operation"],"issues":[{"code":"V1017","path":["operations",1,"args","data","name","$ref","fingerprint"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-ref-fingerprint"},"bodyBytes":"{\"data\":null,\"code\":\"A2007\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1017\",\"path\":[\"operations\",1,\"args\",\"data\",\"name\",\"$ref\",\"fingerprint\"],\"message\":\"Transaction reference fingerprint does not match its source operation.\"}],\"operation\":1}}"},"client":{"outcome":"framework-error","code":"A2007"}},
|
|
49
|
+
{"label":"argument: a plan reference to a path its source does not select → 422 A2007 / V1010","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-ref-path"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":\"Ada\"},\"select\":[\"id\"]},\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\"},{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":{\"$ref\":{\"operation\":0,\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\",\"path\":[\"name\"]}}}},\"fingerprint\":\"fp1:z-msTPG2tGrnDfhbp7OMNw\"}]}"}},"server":{"status":422,"code":"A2007","causeKeys":["issues","message","operation"],"issues":[{"code":"V1010","path":["operations",1,"args","data","name","$ref","path"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-ref-path"},"bodyBytes":"{\"data\":null,\"code\":\"A2007\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1010\",\"path\":[\"operations\",1,\"args\",\"data\",\"name\",\"$ref\",\"path\"],\"message\":\"Transaction reference path is not present in the source projection.\"}],\"operation\":1}}"},"client":{"outcome":"framework-error","code":"A2007"}},
|
|
50
|
+
{"label":"argument: a plan reference to a source type its destination cannot take → 422 A2007 / V1011","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-ref-type"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":\"Ada\"},\"select\":[\"id\"]},\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\"},{\"resource\":\"samples\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"count\":\"1\",\"at\":\"2026-10-05T00:00:00.000Z\",\"amount\":\"1\",\"blob\":{\"$ref\":{\"operation\":0,\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\",\"path\":[\"id\"]}}}},\"fingerprint\":\"fp1:kFeNIIPUkzjgT905qlgNUg\"}]}"}},"server":{"status":422,"code":"A2007","causeKeys":["issues","message","operation"],"issues":[{"code":"V1011","path":["operations",1,"args","data","blob","$ref","path"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-ref-type"},"bodyBytes":"{\"data\":null,\"code\":\"A2007\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1011\",\"path\":[\"operations\",1,\"args\",\"data\",\"blob\",\"$ref\",\"path\"],\"message\":\"Transaction reference source type is not assignable to its destination.\"}],\"operation\":1}}"},"client":{"outcome":"framework-error","code":"A2007"}},
|
|
51
|
+
{"label":"argument: a plan reference that resolves to no value → 422 A2007 / V1018, after its source ran","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-ref-value"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"first\",\"args\":{\"where\":{\"id\":\"nobody\"}},\"fingerprint\":\"fp1:qNR9mD7_iVygNtmuuXjymw\"},{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":{\"$ref\":{\"operation\":0,\"fingerprint\":\"fp1:qNR9mD7_iVygNtmuuXjymw\",\"path\":[\"id\"]}}}},\"fingerprint\":\"fp1:4EFGvMTB6fmhpeV65U9J9Q\"}]}"}},"server":{"status":422,"code":"A2007","causeKeys":["issues","message","operation"],"issues":[{"code":"V1018","path":["operations",1,"args","data","name","$ref","path"]}],"adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-ref-value"},"bodyBytes":"{\"data\":null,\"code\":\"A2007\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1018\",\"path\":[\"operations\",1,\"args\",\"data\",\"name\",\"$ref\",\"path\"],\"message\":\"Transaction reference resolved to no value.\"}],\"operation\":1}}"},"client":{"outcome":"framework-error","code":"A2007"}},
|
|
52
|
+
{"label":"identity: no Aventara-Protocol-Version → 400 A2000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-id-no-version"},"body":{"kind":"raw","content":"{}"}},"server":{"status":400,"code":"A2000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-id-no-version"},"bodyBytes":"{\"data\":null,\"code\":\"A2000\",\"cause\":{\"message\":\"The Aventara-Protocol-Version header is missing.\"}}"},"client":{"outcome":"framework-error","code":"A2000"}},
|
|
53
|
+
{"label":"identity: no Aventara-Contract-Hash → 400 A2000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Request-Id":"corpus-id-no-hash"},"body":{"kind":"raw","content":"{}"}},"server":{"status":400,"code":"A2000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-id-no-hash"},"bodyBytes":"{\"data\":null,\"code\":\"A2000\",\"cause\":{\"message\":\"The Aventara-Contract-Hash header is missing.\"}}"},"client":{"outcome":"framework-error","code":"A2000"}},
|
|
54
|
+
{"label":"identity: neither identity header → 400 A2000 naming both","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-id-none"},"body":{"kind":"raw","content":"{}"}},"server":{"status":400,"code":"A2000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-id-none"},"bodyBytes":"{\"data\":null,\"code\":\"A2000\",\"cause\":{\"message\":\"The Aventara-Protocol-Version and Aventara-Contract-Hash headers are missing.\"}}"},"client":{"outcome":"framework-error","code":"A2000"}},
|
|
55
|
+
{"label":"identity: another protocol version → 400 A2006","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"2","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-id-version"},"body":{"kind":"raw","content":"{}"}},"server":{"status":400,"code":"A2006","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-id-version"},"bodyBytes":"{\"data\":null,\"code\":\"A2006\",\"cause\":{\"message\":\"Aventara protocol version does not match the server.\"}}"},"client":{"outcome":"framework-error","code":"A2006"}},
|
|
56
|
+
{"label":"identity: a stale contract hash on a route that exists → 409 A2005","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000","Aventara-Request-Id":"corpus-id-stale"},"body":{"kind":"raw","content":"{}"}},"server":{"status":409,"code":"A2005","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-id-stale"},"bodyBytes":"{\"data\":null,\"code\":\"A2005\",\"cause\":{\"message\":\"Generated client contract does not match the server. Regenerate the client.\"}}"},"client":{"outcome":"framework-error","code":"A2005"}},
|
|
57
|
+
{"label":"identity: a malformed contract hash → 409 A2005","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:xyz","Aventara-Request-Id":"corpus-id-malformed"},"body":{"kind":"raw","content":"{}"}},"server":{"status":409,"code":"A2005","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-id-malformed"},"bodyBytes":"{\"data\":null,\"code\":\"A2005\",\"cause\":{\"message\":\"Generated client contract does not match the server. Regenerate the client.\"}}"},"client":{"outcome":"framework-error","code":"A2005"}},
|
|
58
|
+
{"label":"identity: header names in lower case → 200 A1000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"content-type":"application/json","aventara-protocol-version":"1","aventara-contract-hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","aventara-request-id":"corpus-id-case"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-id-case"},"bodyBytes":"{\"data\":[{\"id\":\"a1\",\"name\":\"Ada\"}],\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
59
|
+
{"label":"body: a JSON list → 400 A2000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-body-list"},"body":{"kind":"raw","content":"[]"}},"server":{"status":400,"code":"A2000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-body-list"},"bodyBytes":"{\"data\":null,\"code\":\"A2000\",\"cause\":{\"message\":\"The request is malformed and cannot be interpreted.\"}}"},"client":{"outcome":"framework-error","code":"A2000"}},
|
|
60
|
+
{"label":"body: a JSON number → 400 A2000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-body-number"},"body":{"kind":"raw","content":"3"}},"server":{"status":400,"code":"A2000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-body-number"},"bodyBytes":"{\"data\":null,\"code\":\"A2000\",\"cause\":{\"message\":\"The request is malformed and cannot be interpreted.\"}}"},"client":{"outcome":"framework-error","code":"A2000"}},
|
|
61
|
+
{"label":"body: JSON null → 400 A2000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-body-null"},"body":{"kind":"raw","content":"null"}},"server":{"status":400,"code":"A2000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-body-null"},"bodyBytes":"{\"data\":null,\"code\":\"A2000\",\"cause\":{\"message\":\"The request is malformed and cannot be interpreted.\"}}"},"client":{"outcome":"framework-error","code":"A2000"}},
|
|
62
|
+
{"label":"body: none (zero bytes) → 400 A2000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-body-none"},"body":{"kind":"raw","content":""}},"server":{"status":400,"code":"A2000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-body-none"},"bodyBytes":"{\"data\":null,\"code\":\"A2000\",\"cause\":{\"message\":\"The request is malformed and cannot be interpreted.\"}}"},"client":{"outcome":"framework-error","code":"A2000"}},
|
|
63
|
+
{"label":"body: text that is not JSON → 400 A2000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-body-text"},"body":{"kind":"raw","content":"{"}},"server":{"status":400,"code":"A2000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-body-text"},"bodyBytes":"{\"data\":null,\"code\":\"A2000\",\"cause\":{\"message\":\"The request is malformed and cannot be interpreted.\"}}"},"client":{"outcome":"framework-error","code":"A2000"}},
|
|
64
|
+
{"label":"body: parsed by the host, null → 400 A2000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-body-parsed-null"},"body":{"kind":"parsed","value":null}},"server":{"status":400,"code":"A2000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-body-parsed-null"},"bodyBytes":"{\"data\":null,\"code\":\"A2000\",\"cause\":{\"message\":\"The request is malformed and cannot be interpreted.\"}}"},"client":{"outcome":"framework-error","code":"A2000"}},
|
|
65
|
+
{"label":"media: text/plain → 415 A2011","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"text/plain","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-media-text"},"body":{"kind":"raw","content":"{}"}},"server":{"status":415,"code":"A2011","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-media-text"},"bodyBytes":"{\"data\":null,\"code\":\"A2011\",\"cause\":{\"message\":\"The request content type is not supported; send application/json.\"}}"},"client":{"outcome":"framework-error","code":"A2011"}},
|
|
66
|
+
{"label":"body: one byte over maxRequestBytes → 413 A2010","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-body-oversized"},"body":{"kind":"raw","content":{"prefix":"{\"pad\":\"","repeat":"x","times":1048567,"suffix":"\"}"}}},"server":{"status":413,"code":"A2010","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-body-oversized"},"bodyBytes":"{\"data\":null,\"code\":\"A2010\",\"cause\":{\"message\":\"The request body exceeds the maximum request size.\"}}"},"client":{"outcome":"framework-error","code":"A2010"}},
|
|
67
|
+
{"label":"body: routing metadata is an argument, refused by core → 422 A2004","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-body-routing"},"body":{"kind":"raw","content":"{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\"}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message"],"issues":[{"code":"V1001","path":["arguments","resource"]},{"code":"V1001","path":["arguments","family"]},{"code":"V1001","path":["arguments","variant"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-body-routing"}},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
68
|
+
{"label":"method: GET on a resource route → 405 A2012 with Allow: POST","request":{"method":"GET","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-method-get"},"body":{"kind":"raw","content":"{}"}},"server":{"status":405,"code":"A2012","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-method-get","Allow":"POST"},"bodyBytes":"{\"data\":null,\"code\":\"A2012\",\"cause\":{\"message\":\"The HTTP method is not allowed on this framework route.\"}}"},"client":{"outcome":"framework-error","code":"A2012"}},
|
|
69
|
+
{"label":"absent: an unadvertised operation, current hash → 404 A2002","request":{"method":"POST","path":"/_resources/books/delete/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-absent-op"},"body":{"kind":"raw","content":"{}"}},"server":{"status":404,"code":"A2002","causeKeys":["issues","message"],"issues":[{"code":"V1006","path":["family"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-absent-op"},"bodyBytes":"{\"data\":null,\"code\":\"A2002\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"path\":[\"family\"],\"code\":\"V1006\",\"message\":\"Operation \\\"delete.many\\\" is not available on Resource \\\"books\\\".\"}]}}"},"client":{"outcome":"framework-error","code":"A2002"}},
|
|
70
|
+
{"label":"absent: an unadvertised operation, stale hash → 409 A2005 (regenerate)","request":{"method":"POST","path":"/_resources/books/delete/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000","Aventara-Request-Id":"corpus-absent-stale"},"body":{"kind":"raw","content":"{}"}},"server":{"status":409,"code":"A2005","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-absent-stale"},"bodyBytes":"{\"data\":null,\"code\":\"A2005\",\"cause\":{\"message\":\"Generated client contract does not match the server. Regenerate the client.\"}}"},"client":{"outcome":"framework-error","code":"A2005"}},
|
|
71
|
+
{"label":"absent: a stale hash before the method → 409 A2005","request":{"method":"GET","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000","Aventara-Request-Id":"corpus-absent-stale-get"},"body":{"kind":"raw","content":"{}"}},"server":{"status":409,"code":"A2005","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-absent-stale-get"},"bodyBytes":"{\"data\":null,\"code\":\"A2005\",\"cause\":{\"message\":\"Generated client contract does not match the server. Regenerate the client.\"}}"},"client":{"outcome":"framework-error","code":"A2005"}},
|
|
72
|
+
{"label":"absent: another protocol version → 400 A2006","request":{"method":"POST","path":"/_resources/books/delete/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"2","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-absent-version"},"body":{"kind":"raw","content":"{}"}},"server":{"status":400,"code":"A2006","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-absent-version"},"bodyBytes":"{\"data\":null,\"code\":\"A2006\",\"cause\":{\"message\":\"Aventara protocol version does not match the server.\"}}"},"client":{"outcome":"framework-error","code":"A2006"}},
|
|
73
|
+
{"label":"absent: an unknown Resource → 404 A2001","request":{"method":"POST","path":"/_resources/nope/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-absent-resource"},"body":{"kind":"raw","content":"{}"}},"server":{"status":404,"code":"A2001","causeKeys":["issues","message"],"issues":[{"code":"V1005","path":["resource"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-absent-resource"},"bodyBytes":"{\"data\":null,\"code\":\"A2001\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1005\",\"path\":[\"resource\"],\"message\":\"Resource \\\"nope\\\" is not available in the active Contract.\"}]}}"},"client":{"outcome":"framework-error","code":"A2001"}},
|
|
74
|
+
{"label":"absent: a Resource with operations: {} → 404 A2002","request":{"method":"POST","path":"/_resources/secrets/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-absent-empty"},"body":{"kind":"raw","content":"{}"}},"server":{"status":404,"code":"A2002","causeKeys":["issues","message"],"issues":[{"code":"V1006","path":["family"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-absent-empty"},"bodyBytes":"{\"data\":null,\"code\":\"A2002\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"path\":[\"family\"],\"code\":\"V1006\",\"message\":\"Operation \\\"find.many\\\" is not available on Resource \\\"secrets\\\".\"}]}}"},"client":{"outcome":"framework-error","code":"A2002"}},
|
|
75
|
+
{"label":"absent: a client-hidden Resource → 404 A2001","request":{"method":"POST","path":"/_resources/hiddenRes/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-absent-hidden"},"body":{"kind":"raw","content":"{}"}},"server":{"status":404,"code":"A2001","causeKeys":["issues","message"],"issues":[{"code":"V1005","path":["resource"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-absent-hidden"},"bodyBytes":"{\"data\":null,\"code\":\"A2001\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1005\",\"path\":[\"resource\"],\"message\":\"Resource \\\"hiddenRes\\\" is not available in the active Contract.\"}]}}"},"client":{"outcome":"framework-error","code":"A2001"}},
|
|
76
|
+
{"label":"absent: /_transactions under transactions \"none\" → 404 A2002 at [\"operations\"]","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:d333e8396b9bf9127e0859ed69b9874f230058a597e2129e6b9e9b380daef618","Aventara-Request-Id":"corpus-absent-tx-none"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"}]}"}},"server":{"status":404,"code":"A2002","causeKeys":["issues","message"],"issues":[{"code":"V1006","path":["operations"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-absent-tx-none"},"bodyBytes":"{\"data\":null,\"code\":\"A2002\",\"cause\":{\"message\":\"Transaction plans are not available on the active Contract.\",\"issues\":[{\"code\":\"V1006\",\"path\":[\"operations\"],\"message\":\"Transaction plans are not available on the active Contract.\"}]}}"},"client":{"outcome":"framework-error","code":"A2002"}},
|
|
77
|
+
{"label":"transaction — committed, a create included → 200 A1009 in plan order","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-tx-committed"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":\"Ada\"}},\"fingerprint\":\"fp1:ivp4epVXIrdpENiusGWg3w\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"}]}"}},"server":{"status":200,"code":"A1009","adapterCalls":2,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-tx-committed"},"bodyBytes":"{\"data\":[{\"id\":\"a1\",\"name\":\"Ada\"},[{\"id\":\"a1\",\"name\":\"Ada\"}]],\"code\":\"A1009\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
78
|
+
{"label":"transaction — rolled back at step 1, a find.unique miss → 404 A2003 (its own status)","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-tx-rolled-back"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"unique\",\"args\":{\"where\":{\"id\":\"nobody\"}},\"fingerprint\":\"fp1:WY0DNK9cOeveQr7rjKOdzA\"}]}"}},"server":{"status":404,"code":"A2003","causeKeys":["message","operation"],"adapterCalls":2,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-tx-rolled-back"},"bodyBytes":"{\"data\":null,\"code\":\"A2003\",\"cause\":{\"message\":\"No record matched the unique selector.\",\"operation\":1}}"},"client":{"outcome":"framework-error","code":"A2003"}},
|
|
79
|
+
{"label":"transaction — a step that reads what an earlier delete cascaded into → 422 A2004 / V1019","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-tx-cascade"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"delete\",\"variant\":\"unique\",\"args\":{\"where\":{\"id\":\"a1\"}},\"fingerprint\":\"fp1:ImWDaYNUDpIsjiuBSGBesg\"},{\"resource\":\"books\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:0vpQhJUZvleqWv_xMBvQug\"}]}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message","operation"],"issues":[{"code":"V1019","path":["operations",1,"resource"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-tx-cascade"}},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
80
|
+
{"label":"transaction — a plan node carrying \"scope\" cannot smuggle an origin → 422 A2004 / V1001","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-tx-smuggle-scope"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\",\"scope\":\"application\"}]}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message","operation"],"issues":[{"code":"V1001","path":["operations",0,"scope"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-tx-smuggle-scope"}},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
81
|
+
{"label":"transaction — a plan node carrying \"origin\" cannot smuggle an origin → 422 A2004 / V1001","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-tx-smuggle-origin"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\",\"origin\":\"application\"}]}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message","operation"],"issues":[{"code":"V1001","path":["operations",0,"origin"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-tx-smuggle-origin"}},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
82
|
+
{"label":"a client-hidden field — single route","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-r1-field"},"body":{"kind":"raw","content":"{\"select\":[\"id\",\"secret\"]}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message"],"issues":[{"code":"V1005","path":["arguments","select",1]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-r1-field"}},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
83
|
+
{"label":"a client-hidden field — /_transactions","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-r1-field-tx"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{\"select\":[\"id\",\"secret\"]},\"fingerprint\":\"fp1:1t8vSfPuohv1N5MIX8ccNw\"}]}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message","operation"],"issues":[{"code":"V1005","path":["operations",1,"args","select",1]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-r1-field-tx"}},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
84
|
+
{"label":"a client-restricted variant — single route","request":{"method":"POST","path":"/_resources/secrets/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-r1-variant"},"body":{"kind":"raw","content":"{}"}},"server":{"status":404,"code":"A2002","causeKeys":["issues","message"],"issues":[{"code":"V1006","path":["family"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-r1-variant"}},"client":{"outcome":"framework-error","code":"A2002"}},
|
|
85
|
+
{"label":"a client-restricted variant — /_transactions","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-r1-variant-tx"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"secrets\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:KegI5OcquDHi8z39VH11EQ\"}]}"}},"server":{"status":404,"code":"A2002","causeKeys":["issues","message","operation"],"issues":[{"code":"V1006","path":["operations",1,"family"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-r1-variant-tx"}},"client":{"outcome":"framework-error","code":"A2002"}},
|
|
86
|
+
{"label":"a client-hidden Resource — single route","request":{"method":"POST","path":"/_resources/hiddenRes/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-r1-resource"},"body":{"kind":"raw","content":"{}"}},"server":{"status":404,"code":"A2001","causeKeys":["issues","message"],"issues":[{"code":"V1005","path":["resource"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-r1-resource"}},"client":{"outcome":"framework-error","code":"A2001"}},
|
|
87
|
+
{"label":"a client-hidden Resource — /_transactions","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-r1-resource-tx"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"},{\"resource\":\"hiddenRes\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:UY6pLVLKM2LaIMnfQa0zGw\"}]}"}},"server":{"status":404,"code":"A2001","causeKeys":["issues","message","operation"],"issues":[{"code":"V1005","path":["operations",1,"resource"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-r1-resource-tx"}},"client":{"outcome":"framework-error","code":"A2001"}},
|
|
88
|
+
{"label":"method: GET on /_transactions → 405 A2012 with Allow: POST","request":{"method":"GET","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-tx-get"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{},\"fingerprint\":\"fp1:1aLMnUbKspahv3fbsV7pKg\"}]}"}},"server":{"status":405,"code":"A2012","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-tx-get","Allow":"POST"},"bodyBytes":"{\"data\":null,\"code\":\"A2012\",\"cause\":{\"message\":\"The HTTP method is not allowed on this framework route.\"}}"},"client":{"outcome":"framework-error","code":"A2012"}},
|
|
89
|
+
{"label":"transaction — a unique where and a filter reference an earlier step's result → 200 A1009","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-tx-ref-where"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":\"Ada\"},\"select\":[\"id\"]},\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"unique\",\"args\":{\"where\":{\"id\":{\"$ref\":{\"operation\":0,\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\",\"path\":[\"id\"]}}}},\"fingerprint\":\"fp1:hKbxzChGakplMZvnpEa1_w\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"many\",\"args\":{\"where\":{\"OR\":[{\"id\":{\"equals\":{\"$ref\":{\"operation\":0,\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\",\"path\":[\"id\"]}}}}]}},\"fingerprint\":\"fp1:4LK9l_j8Skjk4iU_wSoRzQ\"}]}"}},"server":{"status":200,"code":"A1009","adapterCalls":3,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-tx-ref-where"},"bodyBytes":"{\"data\":[{\"id\":\"a1\"},{\"id\":\"a1\",\"name\":\"Ada\"},[{\"id\":\"a1\",\"name\":\"Ada\"}]],\"code\":\"A1009\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
90
|
+
{"label":"argument: a plan reference in a where to an operation index no earlier step has → 422 A2007 / V1016","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-arg-ref-where-index"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"create\",\"variant\":\"one\",\"args\":{\"data\":{\"name\":\"Ada\"},\"select\":[\"id\"]},\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\"},{\"resource\":\"authors\",\"family\":\"find\",\"variant\":\"unique\",\"args\":{\"where\":{\"id\":{\"$ref\":{\"operation\":5,\"fingerprint\":\"fp1:aMKNYrUwcifOeY8ZYk4pow\",\"path\":[\"id\"]}}}},\"fingerprint\":\"fp1:VS6Zk71avpYzuC90z8qzrQ\"}]}"}},"server":{"status":422,"code":"A2007","causeKeys":["issues","message","operation"],"issues":[{"code":"V1016","path":["operations",1,"args","where","id","$ref","operation"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-arg-ref-where-index"},"bodyBytes":"{\"data\":null,\"code\":\"A2007\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1016\",\"path\":[\"operations\",1,\"args\",\"where\",\"id\",\"$ref\",\"operation\"],\"message\":\"Transaction reference operation index is invalid.\"}],\"operation\":1}}"},"client":{"outcome":"framework-error","code":"A2007"}},
|
|
91
|
+
{"label":"internal: a guard that throws → 500 A3000","request":{"method":"POST","path":"/_resources/authors/find/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-internal-a3000"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"A3000\"}}"}},"server":{"status":500,"code":"A3000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-internal-a3000"},"bodyBytes":"{\"data\":null,\"code\":\"A3000\",\"cause\":{\"message\":\"Internal framework error.\"}}"},"client":{"outcome":"framework-error","code":"A3000"}},
|
|
92
|
+
{"label":"internal: an Adapter that throws → 500 A3001","request":{"method":"POST","path":"/_resources/authors/find/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-internal-a3001"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"A3001\"}}"}},"server":{"status":500,"code":"A3001","causeKeys":["message"],"adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-internal-a3001"},"bodyBytes":"{\"data\":null,\"code\":\"A3001\",\"cause\":{\"message\":\"Adapter execution failed.\"}}"},"client":{"outcome":"framework-error","code":"A3001"}},
|
|
93
|
+
{"label":"internal: a plan whose commit fails after the work → 500 A3002","request":{"method":"POST","path":"/_transactions","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-internal-a3002"},"body":{"kind":"raw","content":"{\"operations\":[{\"resource\":\"authors\",\"family\":\"update\",\"variant\":\"unique\",\"args\":{\"where\":{\"id\":\"A3002\"},\"data\":{\"name\":\"Ada\"}},\"fingerprint\":\"fp1:8gs-RmzsqGlD_FFmk6dlQA\"}]}"}},"server":{"status":500,"code":"A3002","causeKeys":["message"],"adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-internal-a3002"},"bodyBytes":"{\"data\":null,\"code\":\"A3002\",\"cause\":{\"message\":\"Transaction failed.\"}}"},"client":{"outcome":"framework-error","code":"A3002"}},
|
|
94
|
+
{"label":"internal: a result the wire cannot spell → 500 A3003","request":{"method":"POST","path":"/_resources/samples/find/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-internal-a3003"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"A3003\"}}"}},"server":{"status":500,"code":"A3003","causeKeys":["message"],"adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-internal-a3003"},"bodyBytes":"{\"data\":null,\"code\":\"A3003\",\"cause\":{\"message\":\"Result serialization failed.\"}}"},"client":{"outcome":"framework-error","code":"A3003"}},
|
|
95
|
+
{"label":"internal: a pipe whose output the server contract refuses → 500 A3004","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-internal-a3004"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"A3004\"}}"}},"server":{"status":500,"code":"A3004","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-internal-a3004"},"bodyBytes":"{\"data\":null,\"code\":\"A3004\",\"cause\":{\"message\":\"A server pipeline produced invalid arguments.\"}}"},"client":{"outcome":"framework-error","code":"A3004"}},
|
|
96
|
+
{"label":"internal: a guard that requires authentication → 401 A4000","request":{"method":"POST","path":"/_resources/authors/find/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-internal-a4000"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"A4000\"}}"}},"server":{"status":401,"code":"A4000","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-internal-a4000"},"bodyBytes":"{\"data\":null,\"code\":\"A4000\",\"cause\":{\"message\":\"Authentication is required.\"}}"},"client":{"outcome":"framework-error","code":"A4000"}},
|
|
97
|
+
{"label":"internal: a guard that denies → 403 A4001","request":{"method":"POST","path":"/_resources/authors/find/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-internal-a4001"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"A4001\"}}"}},"server":{"status":403,"code":"A4001","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-internal-a4001"},"bodyBytes":"{\"data\":null,\"code\":\"A4001\",\"cause\":{\"message\":\"Operation denied by a framework guard.\"}}"},"client":{"outcome":"framework-error","code":"A4001"}},
|
|
98
|
+
{"label":"internal: a policy denial, no reason member → 403 A4002","request":{"method":"POST","path":"/_resources/authors/find/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-internal-a4002"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"A4002\"}}"}},"server":{"status":403,"code":"A4002","causeKeys":["message"],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-internal-a4002"},"bodyBytes":"{\"data\":null,\"code\":\"A4002\",\"cause\":{\"message\":\"Denied by the corpus policy.\"}}"},"client":{"outcome":"framework-error","code":"A4002"}},
|
|
99
|
+
{"label":"conflict: the Adapter answers A2008 → 409, no issues","request":{"method":"POST","path":"/_resources/authors/update/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-conflict-A2008"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"A2008\"},\"data\":{\"name\":\"Ada\"}}"}},"server":{"status":409,"code":"A2008","causeKeys":["message"],"adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-conflict-A2008"},"bodyBytes":"{\"data\":null,\"code\":\"A2008\",\"cause\":{\"message\":\"The corpus Adapter answered A2008.\"}}"},"client":{"outcome":"framework-error","code":"A2008"}},
|
|
100
|
+
{"label":"conflict: the Adapter answers A2013 → 409, no issues","request":{"method":"POST","path":"/_resources/authors/update/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-conflict-A2013"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"A2013\"},\"data\":{\"name\":\"Ada\"}}"}},"server":{"status":409,"code":"A2013","causeKeys":["message"],"adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-conflict-A2013"},"bodyBytes":"{\"data\":null,\"code\":\"A2013\",\"cause\":{\"message\":\"The corpus Adapter answered A2013.\"}}"},"client":{"outcome":"framework-error","code":"A2013"}},
|
|
101
|
+
{"label":"conflict: the Adapter answers A2014 → 409, no issues","request":{"method":"POST","path":"/_resources/authors/update/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-conflict-A2014"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"A2014\"},\"data\":{\"name\":\"Ada\"}}"}},"server":{"status":409,"code":"A2014","causeKeys":["message"],"adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-conflict-A2014"},"bodyBytes":"{\"data\":null,\"code\":\"A2014\",\"cause\":{\"message\":\"The corpus Adapter answered A2014.\"}}"},"client":{"outcome":"framework-error","code":"A2014"}},
|
|
102
|
+
{"label":"wire: a result's bigint, datetime, decimal and bytes in wire form → 200 A1000","request":{"method":"POST","path":"/_resources/samples/find/unique","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-wire-result"},"body":{"kind":"raw","content":"{\"where\":{\"id\":\"s1\"}}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-wire-result"},"bodyBytes":"{\"data\":{\"id\":\"s1\",\"count\":\"9007199254740993\",\"at\":\"2026-10-05T12:34:56.789Z\",\"amount\":\"12.50\",\"blob\":\"/wAQ\"},\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
103
|
+
{"label":"wire: bytes \"AB==\" (non-zero pad bits) → 422 A2004 / V1003, no Adapter call","request":{"method":"POST","path":"/_resources/samples/create/one","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-wire-pad-bits"},"body":{"kind":"raw","content":"{\"data\":{\"count\":\"1\",\"at\":\"2026-10-05T00:00:00.000Z\",\"amount\":\"1.5\",\"blob\":\"AB==\"}}"}},"server":{"status":422,"code":"A2004","causeKeys":["issues","message"],"issues":[{"code":"V1003","path":["arguments","data","blob"]}],"adapterCalls":0,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-wire-pad-bits"},"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"Operation arguments failed framework validation.\",\"issues\":[{\"code\":\"V1003\",\"path\":[\"arguments\",\"data\",\"blob\"],\"message\":\"Value must use RFC 4648 base64 encoding.\"}]}}"},"client":{"outcome":"framework-error","code":"A2004"}},
|
|
104
|
+
{"label":"wire: bytes \"AA==\" (canonical) → 201 A1002","request":{"method":"POST","path":"/_resources/samples/create/one","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"corpus-wire-canonical"},"body":{"kind":"raw","content":"{\"data\":{\"count\":\"1\",\"at\":\"2026-10-05T00:00:00.000Z\",\"amount\":\"1.5\",\"blob\":\"AA==\"}}"}},"server":{"status":201,"code":"A1002","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"corpus-wire-canonical"},"bodyBytes":"{\"data\":{\"id\":\"s1\",\"count\":\"9007199254740993\",\"at\":\"2026-10-05T12:34:56.789Z\",\"amount\":\"12.50\",\"blob\":\"/wAQ\"},\"code\":\"A1002\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
105
|
+
{"label":"correlation: a 128-character id is adopted and echoed","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json","Aventara-Request-Id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"bodyBytes":"{\"data\":[{\"id\":\"a1\",\"name\":\"Ada\"}],\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
106
|
+
{"label":"correlation: a 129-character id is not adopted, and never refused → 200 A1000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json"},"bodyBytes":"{\"data\":[{\"id\":\"a1\",\"name\":\"Ada\"}],\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
107
|
+
{"label":"correlation: an empty id is not adopted, and never refused → 200 A1000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":""},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json"},"bodyBytes":"{\"data\":[{\"id\":\"a1\",\"name\":\"Ada\"}],\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
108
|
+
{"label":"correlation: an id with a space is not adopted, and never refused → 200 A1000","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:07b1a75a6e8e88e30115ae81bcf7e3a12fa493bddce995a01867e2381bd158d0","Aventara-Request-Id":"a b"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":"A1000","adapterCalls":1,"responseHeaders":{"Content-Type":"application/json"},"bodyBytes":"{\"data\":[{\"id\":\"a1\",\"name\":\"Ada\"}],\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"resolve"}},
|
|
109
|
+
{"label":"transport-error: 502 with an HTML page","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":502,"code":null,"adapterCalls":0,"bodyBytes":"<html><body><h1>502 Bad Gateway</h1></body></html>"},"client":{"outcome":"transport-error"}},
|
|
110
|
+
{"label":"transport-error: 200 with JSON of another shape","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":null,"adapterCalls":0,"bodyBytes":"{\"ok\":true}"},"client":{"outcome":"transport-error"}},
|
|
111
|
+
{"label":"transport-error: connection failure — no response arrived","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":0,"code":null,"adapterCalls":0},"client":{"outcome":"transport-error"}},
|
|
112
|
+
{"label":"transport-error: a truncated body","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A10"},"client":{"outcome":"transport-error"}},
|
|
113
|
+
{"label":"transport-error: an empty body","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":204,"code":null,"adapterCalls":0,"bodyBytes":""},"client":{"outcome":"transport-error"}},
|
|
114
|
+
{"label":"transport-error: a JSON array","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":null,"adapterCalls":0,"bodyBytes":"[]"},"client":{"outcome":"transport-error"}},
|
|
115
|
+
{"label":"transport-error: JSON null","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":null,"adapterCalls":0,"bodyBytes":"null"},"client":{"outcome":"transport-error"}},
|
|
116
|
+
{"label":"transport-error: a JSON string","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":null,"adapterCalls":0,"bodyBytes":"\"A1000\""},"client":{"outcome":"transport-error"}},
|
|
117
|
+
{"label":"transport-error: a code this protocol does not allocate","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":400,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A9999\",\"cause\":{\"message\":\"x\"}}"},"client":{"outcome":"transport-error"}},
|
|
118
|
+
{"label":"transport-error: a code that is not a string","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":1000,\"cause\":null}"},"client":{"outcome":"transport-error"}},
|
|
119
|
+
{"label":"transport-error: no data member","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":null,"adapterCalls":0,"bodyBytes":"{\"code\":\"A1000\",\"cause\":null}"},"client":{"outcome":"transport-error"}},
|
|
120
|
+
{"label":"transport-error: no cause member","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":1,\"code\":\"A1000\"}"},"client":{"outcome":"transport-error"}},
|
|
121
|
+
{"label":"transport-error: a success code with a cause","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":1,\"code\":\"A1000\",\"cause\":{\"message\":\"x\"}}"},"client":{"outcome":"transport-error"}},
|
|
122
|
+
{"label":"transport-error: A1001 with data","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":200,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":{\"id\":1},\"code\":\"A1001\",\"cause\":null}"},"client":{"outcome":"transport-error"}},
|
|
123
|
+
{"label":"transport-error: an error code with a null cause","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":404,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2003\",\"cause\":null}"},"client":{"outcome":"transport-error"}},
|
|
124
|
+
{"label":"transport-error: an error code with data","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":404,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":{\"id\":1},\"code\":\"A2003\",\"cause\":{\"message\":\"x\"}}"},"client":{"outcome":"transport-error"}},
|
|
125
|
+
{"label":"transport-error: a cause whose message is not a string","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":422,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":5}}"},"client":{"outcome":"transport-error"}},
|
|
126
|
+
{"label":"transport-error: a cause that is a string","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":422,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":\"Invalid.\"}"},"client":{"outcome":"transport-error"}},
|
|
127
|
+
{"label":"transport-error: issues that are not an array","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":422,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"x\",\"issues\":{}}}"},"client":{"outcome":"transport-error"}},
|
|
128
|
+
{"label":"transport-error: an issue whose code is not a validation code","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":422,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"x\",\"issues\":[{\"code\":\"V9999\",\"message\":\"y\"}]}}"},"client":{"outcome":"transport-error"}},
|
|
129
|
+
{"label":"transport-error: an issue whose message is not a string","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":422,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"x\",\"issues\":[{\"code\":\"V1000\"}]}}"},"client":{"outcome":"transport-error"}},
|
|
130
|
+
{"label":"transport-error: an issue whose path is not an array","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":422,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"x\",\"issues\":[{\"path\":\"a.b\",\"code\":\"V1000\",\"message\":\"y\"}]}}"},"client":{"outcome":"transport-error"}},
|
|
131
|
+
{"label":"transport-error: an issue whose path holds an object","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":422,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"x\",\"issues\":[{\"path\":[{}],\"code\":\"V1000\",\"message\":\"y\"}]}}"},"client":{"outcome":"transport-error"}},
|
|
132
|
+
{"label":"transport-error: an issue whose path holds a fraction","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":422,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2004\",\"cause\":{\"message\":\"x\",\"issues\":[{\"path\":[0.5],\"code\":\"V1000\",\"message\":\"y\"}]}}"},"client":{"outcome":"transport-error"}},
|
|
133
|
+
{"label":"transport-error: an operation index that is a string","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":409,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2008\",\"cause\":{\"message\":\"x\",\"operation\":\"1\"}}"},"client":{"outcome":"transport-error"}},
|
|
134
|
+
{"label":"transport-error: a negative operation index","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":409,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2008\",\"cause\":{\"message\":\"x\",\"operation\":-1}}"},"client":{"outcome":"transport-error"}},
|
|
135
|
+
{"label":"transport-error: a fractional operation index","request":{"method":"POST","path":"/_resources/authors/find/many","headers":{"Content-Type":"application/json","Aventara-Protocol-Version":"1","Aventara-Contract-Hash":"sha256:0000000000000000000000000000000000000000000000000000000000000000"},"body":{"kind":"raw","content":"{}"}},"server":{"status":409,"code":null,"adapterCalls":0,"bodyBytes":"{\"data\":null,\"code\":\"A2008\",\"cause\":{\"message\":\"x\",\"operation\":0.5}}"},"client":{"outcome":"transport-error"}}
|
|
136
|
+
]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aventara/testing",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.0.0-rc.0",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE",
|
|
5
5
|
"description": "Conformance and extension testing utilities for Aventara.",
|
|
6
6
|
"type": "module",
|
|
@@ -12,23 +12,27 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
|
-
"import": "./dist/index.js"
|
|
16
|
-
|
|
15
|
+
"import": "./dist/index.js",
|
|
16
|
+
"default": "./dist/index.js"
|
|
17
|
+
},
|
|
18
|
+
"./fixtures/*": "./fixtures/*"
|
|
17
19
|
},
|
|
18
20
|
"files": [
|
|
19
21
|
"dist",
|
|
20
|
-
"
|
|
22
|
+
"fixtures/protocol-v1.json",
|
|
23
|
+
"LICENSE-ADDITIONAL-PERMISSION.md",
|
|
24
|
+
"CHANGELOG.md"
|
|
21
25
|
],
|
|
22
26
|
"dependencies": {
|
|
23
|
-
"@aventara/core": "
|
|
27
|
+
"@aventara/core": "1.0.0-rc.0"
|
|
24
28
|
},
|
|
25
29
|
"publishConfig": {
|
|
26
30
|
"access": "public"
|
|
27
31
|
},
|
|
28
32
|
"scripts": {
|
|
29
|
-
"build": "tsc -p tsconfig.json --removeComments --declaration false && tsc -p tsconfig.json --emitDeclarationOnly && node ../../scripts/build/declaration-comments.sanitizer.ts dist",
|
|
33
|
+
"build": "node ../../scripts/build/build-output.cleaner.ts dist && tsc -p tsconfig.json --removeComments --declaration false && tsc -p tsconfig.json --emitDeclarationOnly && node ../../scripts/build/declaration-comments.sanitizer.ts dist && node scripts/protocol-fixtures.generator.ts",
|
|
30
34
|
"typecheck": "tsc -p tsconfig.typecheck.json --noEmit",
|
|
31
35
|
"test": "vitest run --typecheck --config ../../vitest.config.mts --root .",
|
|
32
|
-
"lint": "biome lint src"
|
|
36
|
+
"lint": "biome lint src scripts"
|
|
33
37
|
}
|
|
34
38
|
}
|