vendorspec

command
v0.5.0-beta.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 26, 2026 License: PostgreSQL Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Command vendorspec captures the published per-product OpenAPI contracts into openapi/. It is the engine behind `make vendor-spec`.

Each contract is served unauthenticated at {base}/{product}/v1/openapi.json, already filtered to the public, enterprise-maximal surface by the API itself, so what this tool fetches IS the public contract and nothing here derives or filters.

go run ./cmd/vendorspec -out openapi
go run ./cmd/vendorspec -out openapi -check

-base defaults to production because the vendored contract must be the one customers are served (TestVendoredSpecsAreCanonical pins the vendored servers URL there). -check reports drift without writing; a servers block that differs is a note, not drift, so a check against another environment still answers for paths and schemas. Both modes hit the network, so neither runs in CI.

Every product is validated before any file is written, and three things abort the run: an `x-pgedge-*` key anywhere (the upstream filter regressed); `x-go-type-import`, which names a package inside the API server's module that this module cannot import (a bare `x-go-type` naming UUID is expected, and each module's api/types.go supplies it); and a path outside the product's own namespace.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL