Socket
Book a DemoInstallSign in
Socket

@coveo/api-standards

Package Overview
Dependencies
Maintainers
16
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@coveo/api-standards

Coveo’s standard OpenAPI ruleset is enforced using [Spectral CLI](https://docs.stoplight.io/docs/spectral/674b27b261c3c-overview). This ruleset is made available for other tools at Coveo, ensuring that API owners can lint their OpenAPI specifications.

latest
npmnpm
Version
0.0.3
Version published
Maintainers
16
Created
Source

OpenAPI Specifications

Coveo’s standard OpenAPI ruleset is enforced using Spectral CLI. This ruleset is made available for other tools at Coveo, ensuring that API owners can lint their OpenAPI specifications.

Consuming those rules

Install from npm

From an npm project, install the rules as a standard npm package.

npm i @coveo/api-standards @stoplight/spectral-cli

Then create a local spectral.yaml file with only this configuration:

extends: "@coveo/api-standards"

Adding New Rules

To add a new rule meant to be statically enforced at Coveo, follow this process:

  • Add the rule
    Add a new rule in tools/spectral-ruleset/spectral.yaml. Follow the Spectral CLI documentation to learn how to define a new rule.

  • Add test cases

    • Add a new test case file that verifies that the new rule correctly catches an OpenAPI violation
    • Add a new entry in valid.openapi.json to verify that the new rule does not incorrectly flag a valid OpenAPI specification.
  • Test the new rule

    • Install pnpm
    • At the root of the repo, run pnpm install
    • Then run pnpm run test

FAQs

Package last updated on 04 Apr 2025

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