Files
docs/mongo-ops/mcp/modules/mongo_ops.populate.rules.json
Vishesh 'ironeagle' Bangotra fced40af59 feat(standards): codify codegen, ship generic Tier-B infra, add get_app_template + prompts; fix docs:// regressions
P0: fix doc:// -> docs:// across standards src/server/registry and regenerate stale mongo-ops bundle. P1: build recipe + spec-first routing now document the openapi-first codegen fast path (models/routes with --inject-request/--package). P4: CRUD template documents the model-vs-document id rule (BaseDocument owns id). P5: authless guidance (omit security keys). P6: template gains generic infra (http_cache, keyed SSE bus, KV port+in-memory+Redis), interfaces/openapi.py + .dockerignore + generic build test registered as components, and a get_app_template tool; genericity matrix marks LLM pool + human-in-loop as reference-app patterns. P7: intake/build/start_app/trial prompts. P8: template ships tests/integration/test_openapi_app_builds.py. Rebuilt standards + openapi-first bundles and re-collected.
2026-10-13 03:26:51 +05:30

60 lines
2.9 KiB
JSON

{
"module": "mongo_ops.populate.rules",
"content": {
"path": "mongo_ops.populate.rules",
"docstring": "# Summary\n\nPopulate rules describing which foreign-key fields to resolve.",
"objects": {
"PopulateRule": {
"name": "PopulateRule",
"kind": "class",
"path": "mongo_ops.populate.rules.PopulateRule",
"signature": "PopulateRule(field_name: str, collection_name: str, nested_rules: list[PopulateRule] | None = None, max_depth: int = 1, filter: dict[str, Any] | None = None, projection: dict[str, Any] | None = None)",
"docstring": "Describes how a foreign-key field resolves to another collection.\n\nA rule declares the field to resolve, the collection its references\npoint at, and optional nested rules applied to the referenced document\nitself. It also bounds how deep the resolution may recurse.\n\nAttributes:\n field_name (str):\n Name of the FK field on the source document.\n collection_name (str):\n Collection the reference points into.\n nested_rules (Optional[list[PopulateRule]]):\n Sub-rules applied to the referenced document. Defaults to None.\n max_depth (int):\n Maximum recursion depth for this rule. Defaults to 1.\n filter (Optional[dict[str, Any]]):\n Optional Mongo filter applied when fetching the reference.\n Defaults to None.\n projection (Optional[dict[str, Any]]):\n Optional Mongo projection applied when fetching the reference.\n Defaults to None.",
"members": {
"field_name": {
"name": "field_name",
"kind": "attribute",
"path": "mongo_ops.populate.rules.PopulateRule.field_name",
"signature": null,
"docstring": null
},
"collection_name": {
"name": "collection_name",
"kind": "attribute",
"path": "mongo_ops.populate.rules.PopulateRule.collection_name",
"signature": null,
"docstring": null
},
"nested_rules": {
"name": "nested_rules",
"kind": "attribute",
"path": "mongo_ops.populate.rules.PopulateRule.nested_rules",
"signature": null,
"docstring": null
},
"max_depth": {
"name": "max_depth",
"kind": "attribute",
"path": "mongo_ops.populate.rules.PopulateRule.max_depth",
"signature": null,
"docstring": null
},
"filter": {
"name": "filter",
"kind": "attribute",
"path": "mongo_ops.populate.rules.PopulateRule.filter",
"signature": null,
"docstring": null
},
"projection": {
"name": "projection",
"kind": "attribute",
"path": "mongo_ops.populate.rules.PopulateRule.projection",
"signature": null,
"docstring": null
}
}
}
}
}
}