{ "module": "openapi_first.templates.model_app.routes", "content": { "path": "openapi_first.templates.model_app.routes", "docstring": "CRUD route handlers bound via OpenAPI operationId.\n\nThis module defines OpenAPI-bound operation handlers for a model-based\nCRUD service. Functions in this module are bound to HTTP routes\nexclusively via OpenAPI ``operationId`` values.\n\nHandlers explicitly control HTTP response status codes to ensure runtime\nbehavior matches the OpenAPI contract. Domain models defined using\nPydantic are used for request and response payloads.\n\nNo routing decorators, path definitions, or implicit framework behavior\nappear in this module. All routing, HTTP methods, and schemas are defined\nin the OpenAPI specification.", "objects": { "Response": { "name": "Response", "kind": "alias", "path": "openapi_first.templates.model_app.routes.Response", "signature": "", "docstring": null }, "HTTPException": { "name": "HTTPException", "kind": "alias", "path": "openapi_first.templates.model_app.routes.HTTPException", "signature": "", "docstring": null }, "ItemCreate": { "name": "ItemCreate", "kind": "alias", "path": "openapi_first.templates.model_app.routes.ItemCreate", "signature": "", "docstring": null }, "list_items": { "name": "list_items", "kind": "function", "path": "openapi_first.templates.model_app.routes.list_items", "signature": "", "docstring": "List all items.\n\nImplements the OpenAPI operation identified by\n``operationId: list_items``.\n\nReturns\n-------\nlist[Item]\n A list of item domain objects." }, "get_item": { "name": "get_item", "kind": "function", "path": "openapi_first.templates.model_app.routes.get_item", "signature": "", "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-------\nItem\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.model_app.routes.create_item", "signature": "", "docstring": "Create a new item.\n\nImplements the OpenAPI operation identified by\n``operationId: create_item``.\n\nParameters\n----------\npayload : ItemCreate\n Request body describing the item to create.\nresponse : fastapi.Response\n Response object used to set the HTTP status code.\n\nReturns\n-------\nItem\n The newly created item." }, "update_item": { "name": "update_item", "kind": "function", "path": "openapi_first.templates.model_app.routes.update_item", "signature": "", "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 : ItemCreate\n New item data.\n\nReturns\n-------\nItem\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.model_app.routes.delete_item", "signature": "", "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 : fastapi.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." } } } }