Работает агент, поправлены пути
This commit is contained in:
@@ -51,7 +51,7 @@ def test_collector_ignores_file_paths_from_content() -> None:
|
||||
assert endpoints == ["GET /health"]
|
||||
|
||||
|
||||
def test_collector_uses_title_path_fallback_when_endpoint_metadata_missing() -> None:
|
||||
def test_collector_ignores_title_when_endpoint_metadata_missing() -> None:
|
||||
rows = [
|
||||
{
|
||||
"metadata": {
|
||||
@@ -65,4 +65,4 @@ def test_collector_uses_title_path_fallback_when_endpoint_metadata_missing() ->
|
||||
|
||||
endpoints = ApiEndpointCollector().collect(rows)
|
||||
|
||||
assert endpoints == ["GET /actions/{action}"]
|
||||
assert endpoints == []
|
||||
|
||||
@@ -20,6 +20,8 @@ sub_domain: invoices
|
||||
layer: application
|
||||
status: draft
|
||||
updated_at: 2026-03-23
|
||||
endpoint: POST /billing/invoices
|
||||
source_of_truth: analytics
|
||||
tags: [billing, api]
|
||||
entities: [Invoice]
|
||||
parent: billing_api
|
||||
@@ -125,9 +127,13 @@ Create invoice
|
||||
|
||||
catalog_doc = next(doc for doc in docs if doc.layer == RagLayer.DOCS_DOCUMENT_CATALOG)
|
||||
assert catalog_doc.metadata["document_id"] == "api.billing.create_invoice"
|
||||
assert catalog_doc.metadata["id"] == "api.billing.create_invoice"
|
||||
assert catalog_doc.metadata["module"] == "billing"
|
||||
assert catalog_doc.metadata["domain"] == "billing"
|
||||
assert catalog_doc.metadata["subdomain"] == "invoices"
|
||||
assert catalog_doc.metadata["sub_domain"] == "invoices"
|
||||
assert "subdomain" not in catalog_doc.metadata
|
||||
assert catalog_doc.metadata["endpoint"] == "POST /billing/invoices"
|
||||
assert catalog_doc.metadata["source_of_truth"] == "analytics"
|
||||
assert catalog_doc.metadata["summary_text"] == "Creates an invoice in billing."
|
||||
|
||||
fact_texts = [doc.text for doc in docs if doc.layer == RagLayer.DOCS_FACT_INDEX]
|
||||
@@ -335,3 +341,4 @@ Control actions endpoint.
|
||||
catalog = next(doc for doc in docs if doc.layer == RagLayer.DOCS_DOCUMENT_CATALOG)
|
||||
assert catalog.metadata["type"] == "api_method"
|
||||
assert catalog.metadata["title"] == "HTTP API /actions/{action}"
|
||||
assert catalog.metadata["endpoint"] == "GET|POST /actions/{action}"
|
||||
|
||||
Reference in New Issue
Block a user