package mantra.rest

CrudController

INTERFACE public interface

Convenience trait for full CRUD controllers providing automatic mount prefix generation.

🏗️ Constructor Summary

Constructor Signature
interface CrudController extends RestController

⚙️ Method Summary

Modifier & Return Type Method Signature Description
String pub def mount_prefix() Returns conventional REST mount path e.g. /api/v1/{resource_name}.

🔍 Detailed Method Specifications

pub def mount_prefix() -> String
Returns conventional REST mount path e.g. /api/v1/{resource_name}.

💡 Example Usage

crud_example.mantra
class ProductController extends RestController implements CrudController:
    def __init__(self):
        super("products")
    # Inherits mount_prefix() -> "/api/v1/products"