feat(epic3): deliver the accepted Epic 3 scope through Story 3.17
CI / Rust Checks (pull_request) Failing after 13m41s
CI / UI Checks (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Deploy (pull_request) Skipped
Community Release / release (push) Failing after 13m33s
CI / Rust Checks (pull_request) Failing after 13m41s
CI / UI Checks (pull_request) Skipped
CI / Frontend E2E (pull_request) Skipped
CI / Community Image Smoke (pull_request) Skipped
CI / Deploy (pull_request) Skipped
Community Release / release (push) Failing after 13m33s
Recovery delivery of the accumulated, TL-accepted Epic 3 work that had never been
committed to Git (stories 3.6-3.17, see the crank board). Story 3.18 is not accepted
yet and is deliberately excluded: its logging surface, its capability registration,
its oracle projections and its tests are not part of this tree.
Accepted scope
- 3.6 typed static Resource Drafts; 3.7 publication and exact binding of static
Resource Versions; 3.8 MCP discovery/read and revocation of static Resources;
- 3.9 Resource import/export in API and UI plus TLS dependency maintenance;
3.10 REST-backed Resource templates; 3.11 shared REST read runtime and the MCP
revision/capability foundation;
- 3.12 parameterised Prompt Drafts with preview; 3.13 Prompt publication and exact
version binding to Agents; 3.14 MCP prompts; 3.15 Prompt import/export;
- 3.16 composite Prompts with published Resources (dependency content scan plus
dynamic read through the accepted 3.11 runtime, admin preview and MCP prompts/get);
- 3.17 bounded MCP completion suggestions from typed published schemas and the
resources/list admission fix for bound template publications.
Accepted evidence being reused (unchanged code paths)
- 3.16 candidate: core 7, admin-api 22, registry 4, mcp-server 4, UI 6; one final
`just verify` run 1651 passed / 0 failed / 2 ignored.
- 3.17 candidate: full run 1672 passed / 0 failed / 2 ignored, QA targeted reruns and
a real MCP Inspector 2.12.0 client smoke.
Delivery engineering in this commit
- CI: one event per change (feature branches are gated by their pull request, push
runs only on main), story events run the changed packages, the full workspace suite
stays the feature/release gate; no cache/sharding without a measured runner check.
- Release: the packaged archives, checksums and SBOM are now uploaded to the Gitea
release entry of the tag instead of dying with the runner workspace.
Not included on purpose: Story 3.18 work, build caches, runtime databases, local
credentials and scratch evidence.
Refs: crank kanban t_e39d7263; baseline 1b6db09bd1.
This commit is contained in:
1 parent
1b6db09bd1
commit
54ce770682
357 files changed
+117394
-5115
No files matched your search
@@ -0,0 +1,554 @@
|
||||
//! AT-3.10-03 (AC3) — typed URI template parameters и однозначный mapping в
|
||||
//! pinned Operation input; unknown/duplicate/unmapped/incompatible/default и
|
||||
//! scheme/authority/host injection.
|
||||
//!
|
||||
//! RED-состояние: шаблонного source в API ещё нет (create падает на отсутствии
|
||||
//! части `content`), поэтому все ожидания ниже — поведенческие.
|
||||
|
||||
use super::*;
|
||||
|
||||
/// Published GET-операция с двумя input-полями: `order_id` (string/uuid) и
|
||||
/// `region` (string/enum), используемыми для path и query соответственно.
|
||||
fn two_field_payload(upstream: &str, name: &str) -> Value {
|
||||
operation_payload(
|
||||
name,
|
||||
upstream,
|
||||
"GET",
|
||||
"/orders/{order_id}",
|
||||
json!({ "type": "object", "required": true, "fields": {
|
||||
"order_id": { "type": "string", "required": true, "format": "uuid" },
|
||||
"region": { "type": "string", "required": true, "enum_values": ["eu", "us"] }
|
||||
} }),
|
||||
json!({ "rules": [
|
||||
{ "source": "$.mcp.order_id", "target": "$.request.path.order_id", "required": true },
|
||||
{ "source": "$.mcp.region", "target": "$.request.query.region", "required": true }
|
||||
] }),
|
||||
json!({ "timeout_ms": 1_000, "safety": { "class": "read" } }),
|
||||
)
|
||||
}
|
||||
|
||||
fn valid_parameters() -> Value {
|
||||
json!([
|
||||
order_parameter(
|
||||
"order_id",
|
||||
"input.order_id",
|
||||
json!({ "type": "string", "required": true, "format": "uuid" })
|
||||
),
|
||||
order_parameter(
|
||||
"region",
|
||||
"input.region",
|
||||
json!({ "type": "string", "required": true, "enum_values": ["eu", "us"] })
|
||||
)
|
||||
])
|
||||
}
|
||||
|
||||
fn valid_two_param_source(operation_id: &str) -> Value {
|
||||
template_source(
|
||||
operation_id,
|
||||
1,
|
||||
"crank://orders/{order_id}/{region}",
|
||||
valid_parameters(),
|
||||
cache_policy(json!(60_000), json!(["order_id", "region"]), json!(65_536)),
|
||||
error_outcome(),
|
||||
)
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
#[serial_test::serial]
|
||||
async fn story310_at03_uri_template_parameters_roundtrip_and_blocker_findings() {
|
||||
let (_registry, server, client, upstream) = spawn_stand("story310_at03_params").await;
|
||||
let operation_id = create_operation(
|
||||
&client,
|
||||
&server,
|
||||
&two_field_payload(&upstream, "story310_at03_read"),
|
||||
)
|
||||
.await;
|
||||
publish_operation(&client, &server, &operation_id).await;
|
||||
|
||||
// Positive: roundtrip schema facts и однозначный mapping в input.
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-valid",
|
||||
"story310_params_valid",
|
||||
valid_two_param_source(&operation_id),
|
||||
);
|
||||
let created = create_template_draft(&client, &server, &metadata).await;
|
||||
let resource_id = created["resource"]["resource_id"]
|
||||
.as_str()
|
||||
.expect("template Draft id")
|
||||
.to_owned();
|
||||
let source = &created["source"];
|
||||
assert_eq!(
|
||||
source["uri_template"],
|
||||
json!("crank://orders/{order_id}/{region}")
|
||||
);
|
||||
assert_eq!(source["parameters"][0]["name"], json!("order_id"));
|
||||
assert_eq!(
|
||||
source["parameters"][0]["input_path"],
|
||||
json!("input.order_id")
|
||||
);
|
||||
assert_eq!(source["parameters"][0]["schema"]["type"], json!("string"));
|
||||
assert_eq!(source["parameters"][0]["schema"]["required"], json!(true));
|
||||
assert_eq!(source["parameters"][0]["schema"]["format"], json!("uuid"));
|
||||
assert_eq!(source["parameters"][1]["name"], json!("region"));
|
||||
assert_eq!(source["parameters"][1]["input_path"], json!("input.region"));
|
||||
assert_eq!(
|
||||
source["parameters"][1]["schema"]["enum_values"],
|
||||
json!(["eu", "us"]),
|
||||
"the pinned enum facts must survive the roundtrip without loss"
|
||||
);
|
||||
let (status, text, preview) = read_preview(&client, &server, &resource_id).await;
|
||||
assert_eq!(
|
||||
status,
|
||||
StatusCode::OK,
|
||||
"valid preview must answer 200: {text}"
|
||||
);
|
||||
assert!(
|
||||
preview_codes(&preview).is_empty(),
|
||||
"a fully mapped template has no findings: {preview}"
|
||||
);
|
||||
let (status, text, published) = publish_with_card(&client, &server, &resource_id).await;
|
||||
assert_eq!(
|
||||
status,
|
||||
StatusCode::OK,
|
||||
"the accepted parameter mapping must publish; observed {} body={text}",
|
||||
error_signature(status, &published)
|
||||
);
|
||||
|
||||
// Negative 1: параметр, которого нет в шаблоне.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"] = json!([
|
||||
order_parameter(
|
||||
"order_id",
|
||||
"input.order_id",
|
||||
json!({ "type": "string", "required": true, "format": "uuid" })
|
||||
),
|
||||
order_parameter(
|
||||
"region",
|
||||
"input.region",
|
||||
json!({ "type": "string", "required": true, "enum_values": ["eu", "us"] })
|
||||
),
|
||||
order_parameter(
|
||||
"lang",
|
||||
"input.region",
|
||||
json!({ "type": "string", "required": false, "default_value": "eu" })
|
||||
)
|
||||
]);
|
||||
source["cache"]["vary"] = json!(["order_id", "region", "lang"]);
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-unknown",
|
||||
"story310_params_unknown",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_unknown",
|
||||
"unknown parameter",
|
||||
)
|
||||
.await;
|
||||
|
||||
// Negative 2: placeholder без параметра.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"] = json!([order_parameter(
|
||||
"order_id",
|
||||
"input.order_id",
|
||||
json!({ "type": "string", "required": true, "format": "uuid" })
|
||||
)]);
|
||||
source["cache"]["vary"] = json!(["order_id"]);
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-unmapped",
|
||||
"story310_params_unmapped",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_unmapped",
|
||||
"unmapped placeholder",
|
||||
)
|
||||
.await;
|
||||
|
||||
// Negative 3: повтор placeholder.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["uri_template"] = json!("crank://orders/{order_id}/{order_id}");
|
||||
source["parameters"] = json!([order_parameter(
|
||||
"order_id",
|
||||
"input.order_id",
|
||||
json!({ "type": "string", "required": true, "format": "uuid" })
|
||||
)]);
|
||||
source["cache"]["vary"] = json!(["order_id"]);
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-duplicate-placeholder",
|
||||
"story310_params_duplicate_placeholder",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_duplicate",
|
||||
"duplicate placeholder",
|
||||
)
|
||||
.await;
|
||||
|
||||
// Negative 4: повтор имени параметра.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"] = json!([
|
||||
order_parameter(
|
||||
"order_id",
|
||||
"input.order_id",
|
||||
json!({ "type": "string", "required": true, "format": "uuid" })
|
||||
),
|
||||
order_parameter(
|
||||
"order_id",
|
||||
"input.order_id",
|
||||
json!({ "type": "string", "required": true, "format": "uuid" })
|
||||
),
|
||||
order_parameter(
|
||||
"region",
|
||||
"input.region",
|
||||
json!({ "type": "string", "required": true, "enum_values": ["eu", "us"] })
|
||||
)
|
||||
]);
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-duplicate-name",
|
||||
"story310_params_duplicate_name",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_duplicate",
|
||||
"duplicate parameter name",
|
||||
)
|
||||
.await;
|
||||
|
||||
// Negative 5: несовместимый тип.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"][0]["schema"] = json!({ "type": "integer", "required": true });
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-type",
|
||||
"story310_params_type",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_type_mismatch",
|
||||
"incompatible parameter type",
|
||||
)
|
||||
.await;
|
||||
|
||||
// Negative 6: несовместимый format при том же типе.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"][0]["schema"]["format"] = json!("int64");
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-format",
|
||||
"story310_params_format",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_type_mismatch",
|
||||
"incompatible parameter format",
|
||||
)
|
||||
.await;
|
||||
|
||||
// Negative 7: default вне enum pinned input, хотя schema шаблона не копирует enum.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"][1]["schema"] = json!({
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"default_value": "apac"
|
||||
});
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-default",
|
||||
"story310_params_default",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_default_invalid",
|
||||
"invalid default value",
|
||||
)
|
||||
.await;
|
||||
|
||||
// Negative 8: optional без default — URI невозможно отрендерить.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"][1]["schema"] = json!({
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"enum_values": ["eu", "us"]
|
||||
});
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-optional",
|
||||
"story310_params_optional",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_optional_without_default",
|
||||
"optional parameter without default",
|
||||
)
|
||||
.await;
|
||||
|
||||
// Negative 9: input_path вне pinned input_schema.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"][0]["input_path"] = json!("input.unknown_field");
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-input-path",
|
||||
"story310_params_input_path",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_unmapped",
|
||||
"input_path outside the pinned input_schema",
|
||||
)
|
||||
.await;
|
||||
|
||||
// Positive control: исходный валидный source по-прежнему публикуется.
|
||||
let accepted = template_metadata(
|
||||
"crank://story310/params-accepted",
|
||||
"story310_params_accepted",
|
||||
valid_two_param_source(&operation_id),
|
||||
);
|
||||
let created = create_template_draft(&client, &server, &accepted).await;
|
||||
let accepted_id = created["resource"]["resource_id"]
|
||||
.as_str()
|
||||
.unwrap()
|
||||
.to_owned();
|
||||
let (status, text, body) = publish_with_card(&client, &server, &accepted_id).await;
|
||||
assert_eq!(
|
||||
status,
|
||||
StatusCode::OK,
|
||||
"blocker findings must not block a valid template; observed {} body={text}",
|
||||
error_signature(status, &body)
|
||||
);
|
||||
}
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
#[serial_test::serial]
|
||||
async fn story310_at03_uri_template_scheme_authority_and_traversal_are_rejected() {
|
||||
let (_registry, server, client, upstream) = spawn_stand("story310_at03_uri").await;
|
||||
let operation_id = create_operation(
|
||||
&client,
|
||||
&server,
|
||||
&two_field_payload(&upstream, "story310_at03_uri_read"),
|
||||
)
|
||||
.await;
|
||||
publish_operation(&client, &server, &operation_id).await;
|
||||
|
||||
// Positive control: валидный crank:// template создаётся.
|
||||
let accepted = template_metadata(
|
||||
"crank://story310/uri-accepted",
|
||||
"story310_uri_accepted",
|
||||
valid_two_param_source(&operation_id),
|
||||
);
|
||||
create_template_draft(&client, &server, &accepted).await;
|
||||
let (_, _, listed_before) = list_resources(&client, &server).await;
|
||||
let before = listed_before["items"].as_array().map(Vec::len).unwrap_or(0);
|
||||
|
||||
let rejected = [
|
||||
"https://evil.example/orders/{order_id}",
|
||||
"//evil.example/orders/{order_id}",
|
||||
"crank://user@{order_id}/orders",
|
||||
"crank://host:8080/orders/{order_id}",
|
||||
"crank://host/orders?q={order_id}",
|
||||
"crank://host/orders/{order_id}#fragment",
|
||||
"crank://host/../{order_id}",
|
||||
"crank://host//orders/{order_id}",
|
||||
"crank://ho{st}/orders/{order_id}",
|
||||
"crank://host/orders/{Order_ID}",
|
||||
"crank://host/orders/{order_id",
|
||||
"CRANK://host/orders/{order_id}",
|
||||
];
|
||||
for (index, uri_template) in rejected.iter().enumerate() {
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["uri_template"] = json!(uri_template);
|
||||
source["parameters"] = json!([order_parameter(
|
||||
"order_id",
|
||||
"input.order_id",
|
||||
json!({ "type": "string", "required": true, "format": "uuid" })
|
||||
)]);
|
||||
source["cache"]["vary"] = json!(["order_id"]);
|
||||
let metadata = template_metadata(
|
||||
&format!("crank://story310/uri-rejected-{index}"),
|
||||
&format!("story310_uri_rejected_{index}"),
|
||||
source,
|
||||
);
|
||||
let (status, text, body) = post_template_raw(&client, &server, &metadata).await;
|
||||
assert_eq!(
|
||||
status,
|
||||
StatusCode::BAD_REQUEST,
|
||||
"uri_template `{uri_template}` must be rejected; observed {} body={text}",
|
||||
error_signature(status, &body)
|
||||
);
|
||||
assert_eq!(
|
||||
body["error"]["code"],
|
||||
json!("resource_source_invalid"),
|
||||
"uri_template `{uri_template}` must use the stable source code: {body}"
|
||||
);
|
||||
assert_eq!(
|
||||
body["error"]["context"]["field"],
|
||||
json!("source.uri_template"),
|
||||
"the rejection must name the offending field: {body}"
|
||||
);
|
||||
}
|
||||
|
||||
let (_, _, listed_after) = list_resources(&client, &server).await;
|
||||
assert_eq!(
|
||||
listed_after["items"].as_array().map(Vec::len),
|
||||
Some(before),
|
||||
"rejected uri_template values must not create Resources: {listed_after}"
|
||||
);
|
||||
}
|
||||
|
||||
/// Story 3.10 / TL amendment: optional parameter с валидным default — успешный
|
||||
/// roundtrip и публикация (URI рендерится значением по умолчанию).
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
#[serial_test::serial]
|
||||
async fn story310_at03_optional_parameter_with_default_roundtrips_and_publishes() {
|
||||
let (_registry, server, client, upstream) = spawn_stand("story310_at03_optional").await;
|
||||
let operation_id = create_operation(
|
||||
&client,
|
||||
&server,
|
||||
&two_field_payload(&upstream, "story310_at03_optional_read"),
|
||||
)
|
||||
.await;
|
||||
publish_operation(&client, &server, &operation_id).await;
|
||||
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"][1]["schema"] = json!({
|
||||
"type": "string",
|
||||
"required": false,
|
||||
"default_value": "eu",
|
||||
"enum_values": ["eu", "us"]
|
||||
});
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-optional-default",
|
||||
"story310_params_optional_default",
|
||||
source,
|
||||
);
|
||||
let created = create_template_draft(&client, &server, &metadata).await;
|
||||
let schema = &created["source"]["parameters"][1]["schema"];
|
||||
assert_eq!(schema["required"], json!(false));
|
||||
assert_eq!(schema["default_value"], json!("eu"));
|
||||
assert_eq!(schema["enum_values"], json!(["eu", "us"]));
|
||||
let resource_id = created["resource"]["resource_id"]
|
||||
.as_str()
|
||||
.expect("template Draft id")
|
||||
.to_owned();
|
||||
let (status, text, preview) = read_preview(&client, &server, &resource_id).await;
|
||||
assert_eq!(status, StatusCode::OK, "preview must succeed: {text}");
|
||||
assert!(
|
||||
preview_codes(&preview).is_empty(),
|
||||
"an optional parameter with a valid default is renderable: {preview}"
|
||||
);
|
||||
let (status, text, published) = publish_with_card(&client, &server, &resource_id).await;
|
||||
assert_eq!(
|
||||
status,
|
||||
StatusCode::OK,
|
||||
"the optional default must publish; observed {} body={text}",
|
||||
error_signature(status, &published)
|
||||
);
|
||||
}
|
||||
|
||||
/// Story 3.10 / TL amendment: повтор `input_path` — отдельный duplicate case,
|
||||
/// изолированный от повтора имени/placeholder.
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
#[serial_test::serial]
|
||||
async fn story310_at03_duplicate_input_path_is_a_blocker_finding() {
|
||||
let (_registry, server, client, upstream) = spawn_stand("story310_at03_dup_path").await;
|
||||
let operation_id = create_operation(
|
||||
&client,
|
||||
&server,
|
||||
&two_field_payload(&upstream, "story310_at03_dup_path_read"),
|
||||
)
|
||||
.await;
|
||||
publish_operation(&client, &server, &operation_id).await;
|
||||
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
// Два разных имени и два разных placeholder, но одно и то же поле входа.
|
||||
source["parameters"][1]["input_path"] = json!("input.order_id");
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-duplicate-input-path",
|
||||
"story310_params_duplicate_input_path",
|
||||
source,
|
||||
);
|
||||
let blocked = expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_duplicate",
|
||||
"duplicate input path",
|
||||
)
|
||||
.await;
|
||||
assert!(
|
||||
!blocked
|
||||
.to_string()
|
||||
.contains("story310_params_duplicate_input_path"),
|
||||
"the blocker must not echo the definition"
|
||||
);
|
||||
}
|
||||
|
||||
/// Story 3.10 / TL amendment: default/type/enum проверяются существующим Schema
|
||||
/// validator (не новым schema engine).
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
#[serial_test::serial]
|
||||
async fn story310_at03_default_type_and_enum_use_the_existing_schema_validator() {
|
||||
let (_registry, server, client, upstream) = spawn_stand("story310_at03_schema").await;
|
||||
let operation_id = create_operation(
|
||||
&client,
|
||||
&server,
|
||||
&two_field_payload(&upstream, "story310_at03_schema_read"),
|
||||
)
|
||||
.await;
|
||||
publish_operation(&client, &server, &operation_id).await;
|
||||
|
||||
// default не соответствует объявленному type.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"][0]["schema"]["default_value"] = json!(7);
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-default-type",
|
||||
"story310_params_default_type",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_default_invalid",
|
||||
"default type mismatch",
|
||||
)
|
||||
.await;
|
||||
|
||||
// enum не является подмножеством pinned перечисления.
|
||||
let mut source = valid_two_param_source(&operation_id);
|
||||
source["parameters"][1]["schema"]["enum_values"] = json!(["eu", "apac"]);
|
||||
let metadata = template_metadata(
|
||||
"crank://story310/params-enum-superset",
|
||||
"story310_params_enum_superset",
|
||||
source,
|
||||
);
|
||||
expect_blocked(
|
||||
&client,
|
||||
&server,
|
||||
&metadata,
|
||||
"resource_source_parameter_type_mismatch",
|
||||
"enum not a subset",
|
||||
)
|
||||
.await;
|
||||
}
|
||||
Reference in new issue
Block a user