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
44 lines
3.6 KiB
JSON
44 lines
3.6 KiB
JSON
{
|
|
"module": "openapi_first.templates.crud_app.routes",
|
|
"content": {
|
|
"path": "openapi_first.templates.crud_app.routes",
|
|
"docstring": "CRUD route handlers bound via OpenAPI operationId.\n\nThese handlers explicitly control HTTP status codes to ensure\nruntime behavior matches the OpenAPI contract.\n\nThis module defines OpenAPI-bound operation handlers for a simple CRUD\nservice. Functions in this module are bound to HTTP routes exclusively\nvia OpenAPI ``operationId`` values.\n\nHandlers explicitly control HTTP response status codes to ensure runtime\nbehavior matches the OpenAPI contract. Error conditions are translated\ninto explicit HTTP responses rather than relying on implicit framework\nbehavior.\n\nNo routing decorators or path definitions appear in this module. All\nrouting, HTTP methods, and schemas are defined in the OpenAPI\nspecification.",
|
|
"objects": {
|
|
"list_items": {
|
|
"name": "list_items",
|
|
"kind": "function",
|
|
"path": "openapi_first.templates.crud_app.routes.list_items",
|
|
"signature": "list_items() -> list[dict]",
|
|
"docstring": "List all items.\n\nImplements the OpenAPI operation identified by\n``operationId: list_items``.\n\nReturns\n-------\nlist[dict]\n A list of item representations."
|
|
},
|
|
"get_item": {
|
|
"name": "get_item",
|
|
"kind": "function",
|
|
"path": "openapi_first.templates.crud_app.routes.get_item",
|
|
"signature": "get_item(item_id: int) -> dict",
|
|
"docstring": "Retrieve a single item by ID.\n\nImplements the OpenAPI operation identified by\n``operationId: get_item``.\n\nParameters\n----------\nitem_id : int\n Identifier of the item to retrieve.\n\nReturns\n-------\ndict\n The requested item.\n\nRaises\n------\nHTTPException\n 404 if the item does not exist."
|
|
},
|
|
"create_item": {
|
|
"name": "create_item",
|
|
"kind": "function",
|
|
"path": "openapi_first.templates.crud_app.routes.create_item",
|
|
"signature": "create_item(payload: dict, response: Response) -> dict",
|
|
"docstring": "Create a new item.\n\nImplements the OpenAPI operation identified by\n``operationId: create_item``.\n\nParameters\n----------\npayload : dict\n Item attributes excluding the ``id`` field.\nresponse : Response\n Response object used to set the HTTP status code.\n\nReturns\n-------\ndict\n The newly created item."
|
|
},
|
|
"update_item": {
|
|
"name": "update_item",
|
|
"kind": "function",
|
|
"path": "openapi_first.templates.crud_app.routes.update_item",
|
|
"signature": "update_item(item_id: int, payload: dict) -> dict",
|
|
"docstring": "Update an existing item.\n\nImplements the OpenAPI operation identified by\n``operationId: update_item``.\n\nParameters\n----------\nitem_id : int\n Identifier of the item to update.\npayload : dict\n Item attributes excluding the ``id`` field.\n\nReturns\n-------\ndict\n The updated item.\n\nRaises\n------\nHTTPException\n 404 if the item does not exist."
|
|
},
|
|
"delete_item": {
|
|
"name": "delete_item",
|
|
"kind": "function",
|
|
"path": "openapi_first.templates.crud_app.routes.delete_item",
|
|
"signature": "delete_item(item_id: int, response: Response) -> None",
|
|
"docstring": "Delete an existing item.\n\nImplements the OpenAPI operation identified by\n``operationId: delete_item``.\n\nParameters\n----------\nitem_id : int\n Identifier of the item to delete.\nresponse : Response\n Response object used to set the HTTP status code.\n\nReturns\n-------\nNone\n No content.\n\nRaises\n------\nHTTPException\n 404 if the item does not exist."
|
|
}
|
|
}
|
|
}
|
|
} |