Loyalty Engine REST specifications: API documentation and client code generation.
This project contains OpenAPI specifications for the Loyalty Engine API. It provides:
- Interactive API Documentation - Powered by Scalar
- Client Code Generation - Automated generation of Maven (Java) and Node.js client artifacts
- Cloudflare Workers Deployment - Deployment to Cloudflare Workers
- Spec Validation - Redocly linting for specification quality
- OpenAPI 3.1 - API specification standard
- Node.js - Runtime environment
- Cloudflare Workers - Deployment platform
- Scalar - Modern API documentation UI
- Redocly CLI - OpenAPI bundling and linting
- OpenAPI Generator - Client code generation for multiple languages
- Express - Server framework
- Node.js
- npm
- Cloudflare account (for deployment)
- Wrangler CLI (installed via devDependencies)
openapi-specifications/
βββ openapi/ # OpenAPI specification files
β βββ auth-v1.yaml # Authentication and Users API
β βββ properties-v1.yaml # Properties API
β βββ coupons-v1.yaml # Coupons API
β βββ points-v1.yaml # Points API
β βββ shared/ # Shared schemas and components
βββ packages/ # Client code artifacts
β βββ maven/ # Java/Maven artifacts
β βββ node/ # Node.js artifacts
βββ dist/ # Bundled OpenAPI specs (generated)
βββ index.js # Cloudflare Workers entry point and Scalar configuration
βββ wrangler.jsonc # Cloudflare Workers configuration
βββ redocly.yaml # Redocly configuration
- Install dependencies:
npm install- Bundle OpenAPI specs:
npm run bundle- Start the development server:
npm run dev- Open your browser at
http://localhost:8787
The application is configured to run on Cloudflare Workers:
Development:
npm run devProduction Deployment:
npm run deploy- Authentication and Users API
- Properties API
- Coupons API
- Points API
This project is licensed under the terms specified in the LICENSE file.