npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@lunch-money/v2-api-spec

v2.8.2

Published

OpenAPI specification and version history for the Lunch Money v2 API

Downloads

149

Readme

@lunch-money/v2-api-spec

OpenAPI specification and version history for the Lunch Money v2 API.

Installation

npm install @lunch-money/v2-api-spec

Contents

After installation, the package provides:

  • OpenAPI Specification: node_modules/@lunch-money/v2-api-spec/lunch-money-api-v2.yaml
  • Version History: node_modules/@lunch-money/v2-api-spec/version-history.md

Usage

Accessing the OpenAPI Specification

const fs = require('fs');
const path = require('path');

const specPath = path.join(
  __dirname,
  'node_modules/@lunch-money/v2-api-spec/lunch-money-api-v2.yaml'
);
const spec = fs.readFileSync(specPath, 'utf8');

Using with OpenAPI Tools

# Generate TypeScript types
npx @openapitools/openapi-generator-cli generate \
  -i node_modules/@lunch-money/v2-api-spec/lunch-money-api-v2.yaml \
  -g typescript-axios \
  -o ./generated

# Validate the spec
npx swagger-cli validate node_modules/@lunch-money/v2-api-spec/lunch-money-api-v2.yaml

Updating URLs for Local Development

The package includes a script to help switch between local and production URLs in the OpenAPI specification. This is useful when developing against a local server.

Using the Script

The script is located at node_modules/@lunch-money/v2-api-spec/update-urls.sh.

Required flags:

  • --local - Switch URLs to local development (default: http://localhost:3000/v2)
  • --production - Switch URLs to production deployment URLs

Switch to production URLs (using defaults):

cd node_modules/@lunch-money/v2-api-spec
./update-urls.sh --production

Switch to production URLs (with custom URLs):

cd node_modules/@lunch-money/v2-api-spec
API_DEPLOY_URL=https://api.lunchmoney.app/v2 \
DOCS_DEPLOY_URL=https://alpha.lunchmoney.app/v2 \
./update-urls.sh --production

Switch to local URLs:

cd node_modules/@lunch-money/v2-api-spec
./update-urls.sh --local

Switch to local URLs (with custom local URL):

cd node_modules/@lunch-money/v2-api-spec
LOCAL_URL=http://localhost:4000/v2 ./update-urls.sh --local

Using environment variables: Create a .env file in the package directory:

LOCAL_URL=http://localhost:3000/v2
API_DEPLOY_URL=https://api.lunchmoney.app/v2
DOCS_DEPLOY_URL=https://alpha.lunchmoney.app/v2

Then run:

./update-urls.sh --production
# or
./update-urls.sh --local

How It Works

The script updates the servers section in the OpenAPI specification:

  • Server 1: Typically the production API server
  • Server 2: Typically a mock or staging server

It also updates any references to these URLs throughout the specification file.

Important Notes

  • The script modifies the spec file in place
  • Changes are not persisted across npm install - the package will be restored to its original state
  • For persistent changes, consider copying the spec to your project directory first
  • The script works in both the npm package and the git repository

Versioning

This package follows the Lunch Money API versioning scheme:

  • Major version: API version (currently 2)
  • Minor version: Number of main endpoint groups
  • Revision: Number of updates since last endpoint addition

For example, version 2.8.2 means:

  • API version 2
  • 8 main endpoint groups
  • 2 updates since the 8th endpoint was added

Resources

License

ISC