mix selecto.gen.api (selecto_mix v0.4.2)
Generates a Selecto API endpoint and LiveView control panel.
The generator creates:
- a domain-aware API module that maps JSON payloads to SelectoUpdato operations
- Selecto-powered read/query handlers
- a Phoenix controller for the API endpoint
- a LiveView control panel for editing configuration and sending requests
Usage
mix selecto.gen.api orders --domain MyApp.OrdersDomainOptions
--domain- Domain module used by generated API module (default: inferred)--schema- Ecto schema module used for write operations (default: inferred)--repo- Repo module used for execution (default:MyApp.Repo)--api-path- Route path used in controller docs (default:/api/v1/updato/<name>)--panel-path- Route path used for the control panel (default:/updato/<name>/control)--panel-in-prod- Include control panel route in production snippets (default: false)--force- Overwrite generated files
The task prints route snippets to add into your router.ex.