Files
openapi-first/docs/mcp/modules/openapi_first.security.json
Vishesh 'ironeagle' Bangotra 621f10409e chore(release): 0.0.7
Squash-merge lib-standardisation: adopt repo standards across packaging,
tooling, docs, and CI.

- standardize pyproject.toml (canonical packaging, lint config, extras, GSDFC pydoclint)
- add py.typed marker, modernize type hints and Google-style docstrings
- nest generated docs under docs/lib and docs/mcp; add hand-written wiki
- adopt standard Type A PyPI CI pipeline (tag==version guard + quality gate)
- promote generated CHANGELOG.md; bump version to 0.0.7
2026-10-17 02:16:49 +05:30

23 lines
1.5 KiB
JSON

{
"module": "openapi_first.security",
"content": {
"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": {
"parse_security_schemes": {
"name": "parse_security_schemes",
"kind": "function",
"path": "openapi_first.security.parse_security_schemes",
"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": "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."
}
}
}
}