Skip to content

REST Builder

Generates REST APIs automatically from an OpenAPI (Swagger) YAML file.

  • Design-first API development (define schema before coding).
  • Auto-generate CRUD endpoints for entities.
Terminal window
blade create -t rest-builder library-api
library-api/src/main/resources/openapi.yaml
paths:
/books:
get:
summary: Get all books
responses:
200:
description: List of books
content:
application/json:
schema:
type: array
items:
$ref: "#/components/schemas/Book"
components:
schemas:
Book:
type: object
properties:
id:
type: integer
title:
type: string

Liferay auto-generates endpoints at:
http://localhost:8080/o/library-api/books

  • Rapid Prototyping: Quickly scaffold APIs.
  • Standardized APIs: Enforce OpenAPI compliance.