Skip to content

open-rpc/openrpc-linter

Repository files navigation

OpenRPC Linter

CI

Fast, extensible linter for OpenRPC documents.

Usage

# Lint with default rules
openrpc-linter lint openrpc.json -r rules.yml

# JSON output
openrpc-linter lint openrpc.json -r rules.yml -f json

# Validate document structure
openrpc-linter validate openrpc.json

Install

go install github.com/open-rpc/openrpc-linter@latest

Rules

Create a rules rules.yml with rules you want to apply:

rules:
  method-description:
    description: "Methods must have descriptions"
    given: "$.methods[*]"
    severity: "error"
    then:
      field: "description"
      function: "truthy"