Sign In

@corralimited/snapdiff-openapi

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@corralimited/snapdiff-openapi

Versioned OpenAPI 3.1 specification for the SnapDiff REST API. Use as a codegen input for typed clients (openapi-typescript, openapi-fetch, orval, kiota, etc).

Source
npmnpm
Version
0.2.0
Version published
Weekly downloads
5
-28.57%
Maintainers
1
Weekly downloads
 
Created
Source

@corralimited/snapdiff-openapi

Versioned OpenAPI 3.1 specification for the SnapDiff REST API.

Each release of this package corresponds to a specific live-API revision — pin to a version, codegen against it, and your generated client stays in sync until you bump the dep.

Install

npm install --save-dev @corralimited/snapdiff-openapi

Use as codegen input

# Generate TypeScript types
npx openapi-typescript node_modules/@corralimited/snapdiff-openapi/openapi.json -o src/snapdiff-types.ts

# Generate orval clients
npx orval --input node_modules/@corralimited/snapdiff-openapi/openapi.json --output src/api/

# Pair openapi-typescript + openapi-fetch for runtime calls
import createClient from 'openapi-fetch';
import type { paths } from './snapdiff-types';

const client = createClient<paths>({
  baseUrl: 'https://api.snapdiff.ai/v1',
  headers: { 'X-API-Key': process.env.SNAPDIFF_API_KEY! },
});

const { data, error } = await client.POST('/diff', {
  body: { before: 'https://prod.example.com', after: 'https://staging.example.com' },
});

Use the spec object directly

import { openapiSpec } from '@corralimited/snapdiff-openapi';
// or default import:
import spec from '@corralimited/snapdiff-openapi';

console.log(spec.info.version);  // matches the live API minor version

Versioning

Follows semver against API behavior:

  • Patch — backwards-compatible spec corrections (description tweaks, examples).
  • Minor — new endpoints, new optional fields, new optional query params.
  • Major — breaking changes (removed endpoints, required fields added, response shape changes). Major bumps coincide with versioned API roots (/v1/v2).

Live spec

The same spec is also served live at https://api.snapdiff.ai/openapi.json — useful for exploration. For reproducible CI builds, prefer this package.

License

MIT — see LICENSE.

Keywords

openapi

FAQs

Package last updated on 12 Jun 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts