Add Eve receipt schemas
This commit is contained in:
parent
14a2ea764b
commit
4ed1359e04
9 changed files with 170 additions and 2 deletions
|
|
@ -24,7 +24,9 @@
|
|||
"schemas/gamecult.eve.provider_scenario.v1.schema.json",
|
||||
"schemas/gamecult.eve.provider_advertisement.v1.schema.json",
|
||||
"schemas/gamecult.eve.runtime_capability.v1.schema.json",
|
||||
"schemas/gamecult.eve.command_receipt.v1.schema.json",
|
||||
"schemas/gamecult.eve.plugin.v1.schema.json",
|
||||
"schemas/gamecult.eve.plugin_receipt.v1.schema.json",
|
||||
"schemas/gamecult.eve.plugin_advertisement.v1.schema.json",
|
||||
"schemas/gamecult.eve.plugin_abi_fixture.v1.schema.json",
|
||||
"schemas/gamecult.eve.plugin_abi.request.v1.schema.json",
|
||||
|
|
@ -63,10 +65,12 @@
|
|||
"contractInputs": [
|
||||
"gamecult.eve.surface.v1",
|
||||
"gamecult.eve.command.v1",
|
||||
"gamecult.eve.command_receipt.v1",
|
||||
"gamecult.eve.conformance_export.v1",
|
||||
"gamecult.eve.conformance_fixture.v1",
|
||||
"gamecult.eve.provider_scenario.v1",
|
||||
"gamecult.eve.plugin.v1",
|
||||
"gamecult.eve.plugin_receipt.v1",
|
||||
"gamecult.eve.plugin_advertisement.v1",
|
||||
"gamecult.eve.plugin_abi_fixture.v1",
|
||||
"gamecult.eve.plugin_abi.request.v1",
|
||||
|
|
|
|||
|
|
@ -10,7 +10,9 @@
|
|||
"gamecult.eve.conformance_fixture.v1": "schemas/gamecult.eve.conformance_fixture.v1.schema.json",
|
||||
"gamecult.eve.conformance_export.v1": "schemas/gamecult.eve.conformance_export.v1.schema.json",
|
||||
"gamecult.eve.command.v1": "schemas/gamecult.eve.command.v1.schema.json",
|
||||
"gamecult.eve.command_receipt.v1": "schemas/gamecult.eve.command_receipt.v1.schema.json",
|
||||
"gamecult.eve.plugin.v1": "schemas/gamecult.eve.plugin.v1.schema.json",
|
||||
"gamecult.eve.plugin_receipt.v1": "schemas/gamecult.eve.plugin_receipt.v1.schema.json",
|
||||
"gamecult.eve.plugin_abi.request.v1": "schemas/gamecult.eve.plugin_abi.request.v1.schema.json",
|
||||
"gamecult.eve.plugin_abi.response.v1": "schemas/gamecult.eve.plugin_abi.response.v1.schema.json",
|
||||
"gamecult.eve.plugin_abi_fixture.v1": "schemas/gamecult.eve.plugin_abi_fixture.v1.schema.json",
|
||||
|
|
|
|||
|
|
@ -604,7 +604,12 @@ function validatePluginRuntimeBoundary(plugin, runtimeBoundary) {
|
|||
errors.push(...missingMembers(expectedRuntime.authority || [], runtimeBoundary.advertisementAuthority || [], "runtime.advertisementAuthority"));
|
||||
errors.push(...comparePluginSidecar(expectedRuntime.sidecar || {}, runtimeBoundary.sidecar || {}, "runtime.sidecar"));
|
||||
errors.push(...comparePluginSidecar(runtimeBoundary.sidecar || {}, runtimeBoundary.advertisementSidecar || {}, "runtime.advertisementSidecar"));
|
||||
for (const schemaId of [runtimeBoundary.sidecar?.requestSchema, runtimeBoundary.sidecar?.responseSchema].filter(Boolean)) {
|
||||
for (const schemaId of [
|
||||
runtimeBoundary.sidecar?.requestSchema,
|
||||
runtimeBoundary.sidecar?.responseSchema,
|
||||
runtimeBoundary.sidecar?.commandEnvelope,
|
||||
runtimeBoundary.sidecar?.receiptSchema,
|
||||
].filter(Boolean)) {
|
||||
if (!manifest.schemas?.[schemaId]) {
|
||||
errors.push(`runtime.sidecar.schemaCatalog:${schemaId}:missing`);
|
||||
}
|
||||
|
|
@ -937,7 +942,8 @@ async function validatePluginAbiFixture(plugin) {
|
|||
if (abiFixture.responseSchema !== pluginManifest.runtime?.sidecar?.responseSchema) {
|
||||
errors.push(`${plugin.abiFixturePath}:responseSchema:expected ${pluginManifest.runtime?.sidecar?.responseSchema || ""} got ${abiFixture.responseSchema || ""}`);
|
||||
}
|
||||
for (const schemaId of [abiFixture.requestSchema, abiFixture.responseSchema].filter(Boolean)) {
|
||||
const sidecarReceiptSchema = pluginManifest.runtime?.sidecar?.receiptSchema || "";
|
||||
for (const schemaId of [abiFixture.requestSchema, abiFixture.responseSchema, sidecarReceiptSchema].filter(Boolean)) {
|
||||
if (!manifest.schemas?.[schemaId]) {
|
||||
errors.push(`${plugin.abiFixturePath}:schemaCatalog:${schemaId}:missing`);
|
||||
}
|
||||
|
|
@ -985,6 +991,9 @@ async function validatePluginAbiFixture(plugin) {
|
|||
if (measure.preservesProviderAuthority !== true) errors.push(`${plugin.abiFixturePath}:measure.preservesProviderAuthority:expected true`);
|
||||
|
||||
const apply = operations.get("apply")?.expect || {};
|
||||
if (apply.receiptSchema !== sidecarReceiptSchema) {
|
||||
errors.push(`${plugin.abiFixturePath}:apply.receiptSchema:expected ${sidecarReceiptSchema} got ${apply.receiptSchema || ""}`);
|
||||
}
|
||||
if (manifestCommands.length) {
|
||||
const commandEffects = apply.commandEffects || {};
|
||||
for (const command of manifestCommands) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue