Crossplane · API Governance Rules

Crossplane API Rules

Spectral linting rules defining API design standards and conventions for Crossplane.

7 Rules error 5 warn 2
View Rules File View on GitHub

Rule Categories

crossplane

Rules

error
crossplane-info-contact
API info object should reference Crossplane community contact.
$.info.contact
warn
crossplane-server-kubernetes
Server URL should reference the Kubernetes API server.
$.servers[*].url
error
crossplane-required-paths
API must define core Crossplane API extension paths.
$.paths
error
crossplane-pkg-paths
API must define package management paths under pkg.crossplane.io.
$.paths
error
crossplane-operation-id
All operations must define an operationId.
$.paths.*.*
warn
crossplane-operation-id-prefix
Operation IDs should start with a verb (list, get, create, replace, delete, patch).
$.paths.*.*.operationId
error
crossplane-tags
All operations must define tags.
$.paths.*.*

Spectral Ruleset

Raw ↑
extends: ["spectral:oas"]
documentationUrl: https://docs.crossplane.io/latest/api/
rules:
  crossplane-info-contact:
    description: API info object should reference Crossplane community contact.
    given: "$.info.contact"
    severity: error
    then:
      field: url
      function: pattern
      functionOptions:
        match: "(crossplane|slack)"
  crossplane-server-kubernetes:
    description: Server URL should reference the Kubernetes API server.
    given: "$.servers[*].url"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "kubernetes"
  crossplane-required-paths:
    description: API must define core Crossplane API extension paths.
    given: "$.paths"
    severity: error
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required:
            - /apis/apiextensions.crossplane.io/v1/compositions
            - /apis/apiextensions.crossplane.io/v1/compositeresourcedefinitions
  crossplane-pkg-paths:
    description: API must define package management paths under pkg.crossplane.io.
    given: "$.paths"
    severity: error
    then:
      function: schema
      functionOptions:
        schema:
          type: object
          required:
            - /apis/pkg.crossplane.io/v1/providers
  crossplane-operation-id:
    description: All operations must define an operationId.
    given: "$.paths.*.*"
    severity: error
    then:
      field: operationId
      function: truthy
  crossplane-operation-id-prefix:
    description: Operation IDs should start with a verb (list, get, create, replace, delete, patch).
    given: "$.paths.*.*.operationId"
    severity: warn
    then:
      function: pattern
      functionOptions:
        match: "^(list|get|create|replace|delete|patch)"
  crossplane-tags:
    description: All operations must define tags.
    given: "$.paths.*.*"
    severity: error
    then:
      field: tags
      function: truthy

Work with this as data

Every ruleset here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for spectral rules

4 MCP tools reach this
  • find_rulesBrowse and filter every ruleset in the catalog.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This ruleset
curl "https://apis.io/api/v1/rules/crossplane-kubernetes-api-rules"
All spectral rules
curl "https://apis.io/api/v1/rules?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.