The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

1090 Modules
628 Ready
462 Need Help
🏆 Leaderboard
Actively Maintained v0.0.1

Magento 2 LAPIS

fr3on/magento2-lapis

Automatically generates LAPIS (Lifecycle & Protocol Intent Specification) declarations from a live Magento 2 install by introspecting order statuses, transitions, and state mappings. Produces YAML/JSON for orders, invoices, credit memos, shipments, and cart, adds X-LAPIS state/transition REST headers, an admin state-machine visualizer, and CLI generate/validate tools. Read-only.

10
Downloads
Below average
0
GitHub Stars
3mo ago
Last Release
0
Open Issues
Build Issues
0/3 checks passed

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
PHPStan

Tested on Magento 2.4.9

Recent Test History

Each release is tested against the latest Magento version at that time.

v0.0.1 on Magento 2.4.9
Jun 7, 2026
v0.0.2 on Magento 2.4.9
Jun 1, 2026

Looking for Contributors

Composer installation fails. Your contribution could help the entire Magento community!

Contribute

Share This Module's Status

Magento 2 LAPIS Magento compatibility status badge

README

Loaded from GitHub

Magento 2 LAPIS

Automatic LAPIS (Lifecycle & Protocol Intent Specification) declarations for Magento 2 REST APIs.

Mission

This composer package automatically generates LAPIS declarations from a live Magento 2 installation. It introspects what Magento already knows—Order statuses, Transitions, State-to-Status mappings—and surfaces it in a form every system can consume.

Read-only. This module never writes to Magento's own tables. It only reads.

Installation

composer require fr3on/magento2-lapis
bin/magento module:enable Fr3on_Lapis
bin/magento setup:upgrade

Features

  • RLD Generator: Produces valid YAML/JSON for Order, Invoice, Credit Memo, Shipment, and Cart.
  • REST Response Headers: Every API response includes X-LAPIS-State and X-LAPIS-Transitions.
  • Admin Visualizer: Interactive state machine graphs at System > LAPIS.
  • CLI Tools: Generate and validate declarations from the terminal.

Usage

CLI Commands

bin/magento lapis:generate    # Generates YAML files in var/lapis/
bin/magento lapis:validate    # Validates generated files against schema

Extending via lapis.xml

You can declare custom transitions or override heuristics by creating a lapis.xml in your module's etc directory:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <resource id="order">
        <transition from="processing" to="custom_state" via="myCustomMethod()" actor="admin"/>
    </resource>
</config>

Dashboard

Navigate to System > LAPIS in the Magento Admin to see the live state machine of your store.

License

MIT

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.