Skip to content

About

Loyalty Engine OpenAPI specification for client code generation and API documentation πŸš€

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

62 Commits

Folders and files

Repository files navigation

OpenAPI Specifications

Loyalty Engine REST specifications: API documentation and client code generation.

Overview

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

Tech Stack

  • 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

Prerequisites

  • Node.js
  • npm
  • Cloudflare account (for deployment)
  • Wrangler CLI (installed via devDependencies)

Project Structure

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

Getting Started

Local Development

  1. Install dependencies:
npm install
  1. Bundle OpenAPI specs:
npm run bundle
  1. Start the development server:
npm run dev
  1. Open your browser at http://localhost:8787

Cloudflare Workers Deployment

The application is configured to run on Cloudflare Workers:

Development:

npm run dev

Production Deployment:

npm run deploy

Available APIs

  • Authentication and Users API
  • Properties API
  • Coupons API
  • Points API

License

This project is licensed under the terms specified in the LICENSE file.

About

Loyalty Engine OpenAPI specification for client code generation and API documentation πŸš€

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages