{ "module": "openapi_first.templates.crud_app.data", "content": { "path": "openapi_first.templates.crud_app.data", "docstring": "In-memory mock data store for CRUD example.\n\nThis module intentionally avoids persistence and concurrency guarantees.\nIt is suitable for demos, tests, and scaffolding only.\n\nIt intentionally avoids\n- persistence\n- concurrency guarantees\n- validation\n- error handling\n\nThe implementation is suitable for:\n- demonstrations\n- tests\n- scaffolding and example services\n\nIt is explicitly NOT suitable for production use.\n\nThis module is not part of the ``openapi_first`` library API surface.", "objects": { "Dict": { "name": "Dict", "kind": "alias", "path": "openapi_first.templates.crud_app.data.Dict", "signature": "", "docstring": null }, "list_items": { "name": "list_items", "kind": "function", "path": "openapi_first.templates.crud_app.data.list_items", "signature": "", "docstring": "Return all items in the data store.\n\nThis function performs no filtering, pagination, or sorting.\nThe returned collection reflects the current in-memory state.\n\nReturns\n-------\nlist[dict]\n A list of item representations." }, "get_item": { "name": "get_item", "kind": "function", "path": "openapi_first.templates.crud_app.data.get_item", "signature": "", "docstring": "Retrieve a single item by ID.\n\nThis function assumes the item exists and will raise ``KeyError``\nif the ID is not present in the store.\n\nParameters\n----------\nitem_id : int\n Identifier of the item to retrieve.\n\nReturns\n-------\ndict\n The stored item representation." }, "create_item": { "name": "create_item", "kind": "function", "path": "openapi_first.templates.crud_app.data.create_item", "signature": "", "docstring": "Create a new item in the data store.\n\nA new integer ID is assigned automatically. No validation is\nperformed on the provided payload.\n\nParameters\n----------\npayload : dict\n Item attributes excluding the ``id`` field.\n\nReturns\n-------\ndict\n The newly created item, including its assigned ID." }, "update_item": { "name": "update_item", "kind": "function", "path": "openapi_first.templates.crud_app.data.update_item", "signature": "", "docstring": "Replace an existing item in the data store.\n\nThis function overwrites the existing item entirely and does not\nperform partial updates or validation. If the item does not exist,\nit will be created implicitly.\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 representation." }, "delete_item": { "name": "delete_item", "kind": "function", "path": "openapi_first.templates.crud_app.data.delete_item", "signature": "", "docstring": "Remove an item from the data store.\n\nThis function assumes the item exists and will raise ``KeyError``\nif the ID is not present.\n\nParameters\n----------\nitem_id : int\n Identifier of the item to delete." } } } }