This commit is contained in:
2026-03-08 00:41:19 +05:30
parent f03e250763
commit 80f8defcc2
18 changed files with 126 additions and 94 deletions

View File

@@ -2,21 +2,21 @@
"module": "openapi_first.errors",
"content": {
"path": "openapi_first.errors",
"docstring": "openapi_first.errors\n============================\n\nCustom exceptions for OpenAPI-first FastAPI applications.\n\nThis module defines a small hierarchy of explicit, intention-revealing\nexceptions used to signal contract violations between an OpenAPI\nspecification and its Python implementation.\n\nDesign principles\n-----------------\n- Errors represent *programmer mistakes*, not runtime conditions.\n- All errors are raised during application startup.\n- Messages are actionable and suitable for CI/CD output.\n- Exceptions are explicit rather than reused from generic built-ins.\n\nThese errors should normally cause immediate application failure.",
"docstring": "Exceptions for OpenAPI-first FastAPI applications.\n\n---\n\n## Summary\n\nThis module defines a small hierarchy of explicit, intention-revealing\nexceptions used to signal contract violations between an OpenAPI\nspecification and its Python implementation.\n\nNotes:\n **Design Principles:**\n\n - Errors represent programmer mistakes, not runtime conditions\n - All errors are raised during application startup\n - Messages are actionable and suitable for CI/CD output\n - Exceptions are explicit rather than reused from generic built-ins\n\n These errors should normally cause immediate application failure.",
"objects": {
"OpenAPIFirstError": {
"name": "OpenAPIFirstError",
"kind": "class",
"path": "openapi_first.errors.OpenAPIFirstError",
"signature": "<bound method Class.signature of Class('OpenAPIFirstError', 21, 32)>",
"docstring": "Base exception for all OpenAPI-first enforcement errors.\n\nThis exception exists to allow callers, test suites, and CI pipelines\nto catch and distinguish OpenAPI contract violations from unrelated\nruntime errors.\n\nAll exceptions raised by the OpenAPI-first core should inherit from\nthis type."
"signature": "<bound method Class.signature of Class('OpenAPIFirstError', 23, 33)>",
"docstring": "Base exception for all OpenAPI-first enforcement errors.\n\nNotes:\n **Responsibilities:**\n\n - This exception exists to allow callers, test suites, and CI pipelines to catch and distinguish OpenAPI contract violations from unrelated runtime errors\n - All exceptions raised by the OpenAPI-first core should inherit from this type"
},
"MissingOperationHandler": {
"name": "MissingOperationHandler",
"kind": "class",
"path": "openapi_first.errors.MissingOperationHandler",
"signature": "<bound method Class.signature of Class('MissingOperationHandler', 35, 72)>",
"docstring": "Raised when an OpenAPI operation cannot be resolved to a handler.\n\nThis error occurs when:\n- An OpenAPI operation does not define an operationId, or\n- An operationId is defined but no matching function exists in the\n provided routes module.\n\nThis represents a violation of the OpenAPI-first contract and\nindicates that the specification and implementation are out of sync."
"signature": "<bound method Class.signature of Class('MissingOperationHandler', 36, 74)>",
"docstring": "Raised when an OpenAPI operation cannot be resolved to a handler.\n\nNotes:\n **Scenarios:**\n\n - An OpenAPI operation does not define an operationId\n - An operationId is defined but no matching function exists in the provided routes module\n\n **Guarantees:**\n\n - This represents a violation of the OpenAPI-first contract and indicates that the specification and implementation are out of sync"
},
"Optional": {
"name": "Optional",