tlpp-rest-endpoint-generator

Generate TTALK-compliant TLPP REST endpoints with annotation-based routing.

115|54|Updated May 25, 2026
One-click install
npx skills add https://github.com/totvs/engpro-advpl-tlpp-skills --skill tlpp-rest-endpoint-generator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: tlpp-rest-endpoint-generator
Source: https://github.com/totvs/engpro-advpl-tlpp-skills/tree/main/skills/advpl-tlpp/tlpp-rest-endpoint-generator
Command: npx skills add https://github.com/totvs/engpro-advpl-tlpp-skills --skill tlpp-rest-endpoint-generator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill removes the boilerplate and error-prone effort of creating TLPP REST endpoints by generating production-ready routes that follow TOTVS TTALK standards.

Core Features & Use Cases

  • Annotation-based REST endpoint generation: Builds @Get, @Post, @Put, @Patch, and @Delete handlers using the global oRest object.
  • TTALK-compliant responses and errors: Produces standardized JSON for collections, errors, and validation failures, including correct HTTP status codes.
  • Swagger/OpenAPI alignment: Leverages annotations so routes are documented automatically.
  • Typical use: Create CRUD endpoints for Protheus entities and expose them as integration APIs, including pagination for list endpoints.

Quick Start

Generate a TTALK-compliant TLPP REST CRUD endpoint for the Protheus entity SA1 under the path /api/v1/customers, including paginated GET list, GET by code/store, POST create, PUT update, and DELETE logical delete.

Frequently Asked Questions about tlpp-rest-endpoint-generator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create TTALK-compliant REST APIs in Protheus using TLPP?

You create TTALK-compliant REST APIs by generating TLPP endpoint functions with annotation-based routing using the global oRest object, which standardizes JSON responses and HTTP status codes for Protheus entity integrations.

How do I generate CRUD endpoints with pagination for a Protheus REST API?

Generate CRUD endpoints with pagination by creating TLPP handlers for GET, POST, PUT, PATCH, and DELETE operations. The generated routes include paginated list endpoints and standardize collection responses to satisfy TTALK integration requirements.

What is the best way to prevent SQL injection in Protheus REST endpoints?

Prevent SQL injection in Protheus REST endpoints by using FWExecStatement for database operations. Generated TLPP routes validate inputs and apply FWExecStatement to secure query execution against malicious injections.

Can I use Swagger annotations with TLPP REST endpoints?

Yes, you can use Swagger annotations with TLPP REST endpoints. The generated routes leverage annotation-based routing so your REST APIs are documented automatically and remain aligned with OpenAPI standards.

How do I return standardized error JSON with correct HTTP status codes in TLPP?

Return standardized error JSON by generating TLPP REST endpoints that follow TTALK standards for validation failures and errors. The produced routes output standardized JSON structures paired with appropriate HTTP status codes automatically.