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.
This commit is contained in:
@@ -4,88 +4,18 @@
|
||||
"path": "openapi_first.security",
|
||||
"docstring": "# Summary\n\nOpenAPI security scheme parsing and auto-generated auth dependencies.\n\nThis module reads `securitySchemes` and per-operation `security` from an\nOpenAPI spec, resolves `{ENV_VAR}` placeholders in `x-` extension fields,\nand generates FastAPI dependencies for token validation (e.g., Bearer JWT\nintrospection).",
|
||||
"objects": {
|
||||
"os": {
|
||||
"name": "os",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.security.os",
|
||||
"signature": "<bound method Alias.signature of Alias('os', 'os')>",
|
||||
"docstring": null
|
||||
},
|
||||
"re": {
|
||||
"name": "re",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.security.re",
|
||||
"signature": "<bound method Alias.signature of Alias('re', 're')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Callable": {
|
||||
"name": "Callable",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.security.Callable",
|
||||
"signature": "<bound method Alias.signature of Alias('Callable', 'collections.abc.Callable')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Any": {
|
||||
"name": "Any",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.security.Any",
|
||||
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
|
||||
"docstring": null
|
||||
},
|
||||
"httpx": {
|
||||
"name": "httpx",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.security.httpx",
|
||||
"signature": "<bound method Alias.signature of Alias('httpx', 'httpx')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Depends": {
|
||||
"name": "Depends",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.security.Depends",
|
||||
"signature": "<bound method Alias.signature of Alias('Depends', 'fastapi.Depends')>",
|
||||
"docstring": null
|
||||
},
|
||||
"HTTPException": {
|
||||
"name": "HTTPException",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.security.HTTPException",
|
||||
"signature": "<bound method Alias.signature of Alias('HTTPException', 'fastapi.HTTPException')>",
|
||||
"docstring": null
|
||||
},
|
||||
"Request": {
|
||||
"name": "Request",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.security.Request",
|
||||
"signature": "<bound method Alias.signature of Alias('Request', 'fastapi.Request')>",
|
||||
"docstring": null
|
||||
},
|
||||
"HTTPAuthorizationCredentials": {
|
||||
"name": "HTTPAuthorizationCredentials",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.security.HTTPAuthorizationCredentials",
|
||||
"signature": "<bound method Alias.signature of Alias('HTTPAuthorizationCredentials', 'fastapi.security.HTTPAuthorizationCredentials')>",
|
||||
"docstring": null
|
||||
},
|
||||
"HTTPBearer": {
|
||||
"name": "HTTPBearer",
|
||||
"kind": "alias",
|
||||
"path": "openapi_first.security.HTTPBearer",
|
||||
"signature": "<bound method Alias.signature of Alias('HTTPBearer', 'fastapi.security.HTTPBearer')>",
|
||||
"docstring": null
|
||||
},
|
||||
"parse_security_schemes": {
|
||||
"name": "parse_security_schemes",
|
||||
"kind": "function",
|
||||
"path": "openapi_first.security.parse_security_schemes",
|
||||
"signature": "<bound method Function.signature of Function('parse_security_schemes', 46, 49)>",
|
||||
"signature": "parse_security_schemes(spec: dict[str, Any]) -> dict[str, dict[str, Any]]",
|
||||
"docstring": "Extract and resolve environment variables in security schemes."
|
||||
},
|
||||
"make_security_dependencies": {
|
||||
"name": "make_security_dependencies",
|
||||
"kind": "function",
|
||||
"path": "openapi_first.security.make_security_dependencies",
|
||||
"signature": "<bound method Function.signature of Function('make_security_dependencies', 116, 153)>",
|
||||
"signature": "make_security_dependencies(spec: dict[str, Any], security_schemes: dict[str, dict[str, Any]]) -> dict[str, list[Any]]",
|
||||
"docstring": "Build a mapping of ``METHOD:/path`` → list of ``Depends(...)``.\n\nThe effective security for each operation is resolved by:\n\n1. Using the operation-level ``security`` field if present.\n2. Falling back to the top-level ``security`` field.\n3. An empty list means *no auth required* for that operation."
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user