# API Genie > API Genie is a command-line toolkit for API-first development. `apigenie` lints, formats, diffs, bundles, converts and translates OpenAPI 3.x, Swagger 2.0, AsyncAPI, Protobuf and GraphQL files, and contract-tests live APIs; `apigenie-generator` generates clients, servers and documentation for TypeScript, Python, Go, Java, C#, Elixir and Rust (experimental); `apigenie-server` serves mocks and validating proxies for HTTP, WebSocket, MQTT, gRPC and GraphQL. Every documentation page below is plain Markdown; drop the `.md` suffix for the HTML page. All of it in one file: https://apigenie.pl/llms-full.txt - [Documentation](https://apigenie.pl/docs.md): the map of Docs, every part with its pages. - [Quickstart](https://apigenie.pl/docs/quickstart.md): install API Genie and run the first commands for an existing API, a new API, or a set of APIs to keep consistent. - [FAQ](https://apigenie.pl/docs/faq.md): what leaves the machine, which versions of the standards the tools read, whether `apigenie lint` replaces Spectral, Windows and Docker, proxies and TLS, the license, what scripts can rely on. - [Troubleshooting](https://apigenie.pl/docs/troubleshooting.md): `apigenie` not found after an install, a refused configuration, a rule firing on valid input, unexpected answers of the mock or the proxy, a change rated breaking, generated code that doesn't compile. - [Downloads](https://apigenie.pl/downloads): install with Docker (`mykulyak/apigenie`), Homebrew (`brew install mykulyak/apigenie/apigenie`), npm (`npx @mykulyak/api-genie`) or a binary for macOS, Linux and Windows. - [CLI](https://apigenie.pl/tools/cli): `apigenie` lints, formats, diffs, bundles, converts and contract-tests OpenAPI, Swagger 2.0, AsyncAPI, Protobuf and GraphQL files. - [Generator](https://apigenie.pl/tools/generator): `apigenie-generator` generates clients, servers, documentation sites, test data and Zod schemas in TypeScript, Java, Go, Python, C#, Elixir and Rust (experimental). - [Generator playground](https://apigenie.pl/tools/generator/playground.md): `apigenie-generator`, built for WebAssembly, run in the browser on a sample or your own document; the files it writes, and its questions about each target with the GitHub issue an agent files to answer them. - [Server](https://apigenie.pl/tools/server): `apigenie-server` mocks OpenAPI, AsyncAPI, gRPC and GraphQL APIs and contract-tests real ones as a validating proxy. - [Catalog](https://apigenie.pl/tools/catalog): `apigenie-catalog` lists the API specifications of a Git repository and records their names and owners. - [Editor](https://apigenie.pl/tools/editor): a form-based editor for OpenAPI and AsyncAPI that keeps files byte for byte; in the browser, on the desktop from 0.12.0 (with each CLI release), in VS Code from 1.0.0. - [Doc components](https://apigenie.pl/tools/doc-components): `apg-*` custom elements that document OpenAPI, Swagger 2.0, AsyncAPI, Protobuf and GraphQL APIs. - [Doc components, live examples](https://apigenie.pl/tools/doc-components/examples): one API, Carpet Express, rendered by `` from OpenAPI 3.1, AsyncAPI 3.0, GraphQL and Protobuf documents. - [Use cases](https://apigenie.pl/use-cases): what API Genie does, one page per job: [Lint and format](https://apigenie.pl/use-cases/lint-and-format), [Catch breaking changes](https://apigenie.pl/use-cases/breaking-changes), [Generate code](https://apigenie.pl/use-cases/code-generation), [Mock and test](https://apigenie.pl/use-cases/mock-and-test), [Publish API docs](https://apigenie.pl/use-cases/api-docs), [Edit visually](https://apigenie.pl/use-cases/visual-editing), [Catalog your APIs](https://apigenie.pl/use-cases/api-catalog), [Work with AI agents](https://apigenie.pl/use-cases/ai-agents). - [API Genie by industry](https://apigenie.pl/for/industry.md): the industries whose own API rules API Genie checks. - [CAMARA's rules, without the Spectral setup](https://apigenie.pl/for/industry/telecom.md): A CAMARA API repository lints in CI with Spectral, a Node toolchain and a ruleset fetched from another repository. With API Genie, two keys in apigenie.yaml run CAMARA's own rules. - [Safety](https://apigenie.pl/safety): how the C++ code is kept safe and tested. - [Credits and licenses](https://apigenie.pl/credits): the open source libraries API Genie uses. - [Changelog](https://apigenie.pl/changelog.md): what changed in each release of the CLI. ## How-to guides - [How-to guides](https://apigenie.pl/docs/guides.md): Step-by-step guides to linting, catching breaking changes, generating code, mocking and contract testing, publishing documentation, editing and cataloging APIs with API Genie. - [Lint and format API descriptions](https://apigenie.pl/docs/guides/lint-and-format-api-descriptions.md): Give every API description of a repository the same rules and the same style, locally and in every pull request. - [Catch breaking changes in CI](https://apigenie.pl/docs/guides/catch-breaking-changes-in-ci.md): Fail the pull request that would break your clients, retire old operations on a schedule, and keep a changelog from git. - [Generate a client and a server](https://apigenie.pl/docs/guides/generate-a-client-and-a-server.md): Generate a typed client and a server from one OpenAPI document, in TypeScript, Java, Go, Python, C# or Elixir, keep your code out of the generated files, and check them in CI. - [Mock and contract-test an API](https://apigenie.pl/docs/guides/mock-and-contract-test-an-api.md): Serve an API from its contract before the server exists, then check the real server against the contract in CI. - [Publish API documentation](https://apigenie.pl/docs/guides/publish-api-documentation.md): Build a documentation site from your API descriptions, translate it, add the changelog of each API, or put a reference into a page of your own. - [Edit an API in forms](https://apigenie.pl/docs/guides/edit-an-api-in-forms.md): Open an OpenAPI or AsyncAPI file in the editor, change it in forms, and review the change like any other. - [Catalog the APIs of a repository](https://apigenie.pl/docs/guides/catalog-the-apis-of-a-repository.md): List every API specification of a repository, give each a stable name and an owner, keep the catalog current in CI, and release a specification as a Git tag. - [Work with AI agents](https://apigenie.pl/docs/guides/work-with-ai-agents.md): Put the linter, the diff and the formatter in a coding agent's loop, so that what it changes in a contract is checked the way a person's change is. - [Migrate from Spectral](https://apigenie.pl/docs/guides/migrate-from-spectral.md): Move a repository from Spectral to apigenie lint: the ruleset, your custom rules and functions, the CI step, and what has no counterpart. - [Migrate from Prism](https://apigenie.pl/docs/guides/migrate-from-prism.md): Move a repository from Prism to apigenie-server: the mock, the Prefer header, request validation, the validation proxy, the CI step, and what has no counterpart. - [Migrate from OpenAPI Generator](https://apigenie.pl/docs/guides/migrate-from-openapi-generator.md): Move a repository from OpenAPI Generator to apigenie-generator: the generators by name, the options, the files you own, the CI step, and what has no counterpart. - [Migrate from Buf](https://apigenie.pl/docs/guides/migrate-from-buf.md): Move the linting, breaking-change checks and formatting of Protobuf files from Buf to apigenie: the rules by name, buf.yaml, the CI step, and what stays with Buf. - [Migrate from Redocly CLI](https://apigenie.pl/docs/guides/migrate-from-redocly.md): Move a repository from Redocly CLI to apigenie: the rules by name, redocly.yaml, configurable rules, decorators as overlays, the bundle, the CI step, and what stays with Redocly. - [Migrate from oasdiff](https://apigenie.pl/docs/guides/migrate-from-oasdiff.md): Move the breaking-change check of a repository from oasdiff to apigenie diff: the checks as rules, the exit status, sunset dates, the formats, the CI step, and what has no counterpart. - [Lint CAMARA APIs](https://apigenie.pl/docs/guides/industry/lint-camara-apis.md): Check the APIs of a CAMARA repository with CAMARA's own rules, locally and in every pull request, without a copy of its ruleset or a Node toolchain. ## Concepts - [How the mock picks a response](https://apigenie.pl/docs/concepts/how-the-mock-picks-a-response.md): The decisions behind one answer of apigenie-server, in the order it takes them: the route, the checks on the request, who answers, the status, the body and the headers, with a document to try them on. - [What the validating proxy checks](https://apigenie.pl/docs/concepts/what-the-proxy-checks.md): What apigenie-server compares against the document when it sits in front of a real server, how each problem is rated, what report and enforce mean, and how a run ends with a report and an exit status. - [Where apigenie.yaml is found and how settings merge](https://apigenie.pl/docs/concepts/where-the-configuration-is-found.md): Which configuration file each command reads, what --config and --no-config change, what is checked before a setting is used, and how rulesets, rules, command-line options, environment variables and the file combine. - [What the catalog counts as a specification](https://apigenie.pl/docs/concepts/what-the-catalog-counts-as-a-specification.md): Which files apigenie-catalog looks at, which of them it lists as specifications, how it names them, and which directory the paths are relative to. ## Reference - [apigenie](https://apigenie.pl/docs/reference/cli.md): `apigenie` is the API Genie command-line interface. Each command works on one or more API descriptions: OpenAPI, Swagger 2.0, AsyncAPI, Protobuf or GraphQL files, in JSON or YAML. Code generation, the mock server, the API catalog and the MCP server are separate executables installed next to it: `apigenie-generator`, `apigenie-server`, `apigenie-catalog` and `apigenie-mcp`. - [apigenie bundle](https://apigenie.pl/docs/reference/cli/bundle.md): Bundles an OpenAPI, Swagger 2.0 or AsyncAPI document and the local files it references, or a Protobuf file and the files it imports, into one file that stands on its own: for tools that read a single document, and before diff and i18n, which compare and extract one file at a time. - [apigenie changelog](https://apigenie.pl/docs/reference/cli/changelog.md): Builds the changelog of an OpenAPI, Swagger, AsyncAPI, Protobuf or GraphQL file from its Git history. - [apigenie config](https://apigenie.pl/docs/reference/cli/config.md): Prints the effective configuration, checks a configuration file, and prints the JSON Schema of the configuration file. - [apigenie convert](https://apigenie.pl/docs/reference/cli/convert.md): Convert a Swagger 2.0 document to OpenAPI 3.2, a WSDL 1.1 document to OpenAPI 3.1, or a JSON Schema document of a newer draft to draft-07, draft-04 or the Schema Object dialect of OpenAPI 3.0. - [apigenie credits](https://apigenie.pl/docs/reference/cli/credits.md): Prints the open-source libraries API Genie is built with: the name, the project page and a line on what each one does, as their licenses ask. - [apigenie diff](https://apigenie.pl/docs/reference/cli/diff.md): Compares two versions of an OpenAPI, Swagger 2.0 or AsyncAPI document, of a Protobuf file or of a GraphQL schema, and reports every change with its severity, breaking, non-breaking or non-functional, as the rules define it. A script reads the status, release notes the changelog, a review the detailed list, and `--update-version` writes the version the changes call for into the document. - [Rules and severities](https://apigenie.pl/docs/reference/cli/diff/rules.md): `apigenie diff` rates every change between two versions of a document with a rule: the kind of node the change is in, the property that changed, and whether the property was added, removed or modified. Without a configuration, the rules are the `recommended` ruleset of the standard, listed below for each of them; a configuration that names `recommended` in `extends` changes some of them. This page says what the severities mean, how a report names the rule that rated a change, and what makes a breaking change acceptable. - [apigenie evolve](https://apigenie.pl/docs/reference/cli/evolve.md): Plans safe API changes: `evolve plan` splits the breaking changes between two OpenAPI documents into an expand wave (deprecate, add next to) and a contract wave (remove), writes the wave documents and the plan, and proves the plan with `diff`. - [apigenie format](https://apigenie.pl/docs/reference/cli/format.md): Formats OpenAPI, Swagger 2.0 and AsyncAPI documents, written in JSON or YAML, Protobuf files and GraphQL documents in place, or checks that they are formatted. What it changes comes from the configuration file: the layout and the YAML styles of a document, the order of the properties of every object its specification defines, and what is sorted in Protobuf and GraphQL files. A document keeps its comments and its meaning. - [Layout and YAML styles](https://apigenie.pl/docs/reference/cli/format/styles.md): The `openapi` section of `commands.format` sets how an OpenAPI document is written: its format, its indentation, its line endings, where long values are folded, the YAML styles of its strings, keys, sequences and mappings, and the layout of JSON arrays and objects. The `asyncapi` and `swagger` sections take `format`, `indent`, `force_array_indent` and `style` with the same values; the layout keys and `style_overrides` are for OpenAPI documents. - [Property order](https://apigenie.pl/docs/reference/cli/format/property-order.md): The `property_order` key of the `openapi` section of `commands.format` sets the order of the properties of every kind of OpenAPI object, and of the names in maps such as components, properties and media types. The `asyncapi` and `swagger` sections have a `property_order` of their own, with the objects of AsyncAPI 3 and Swagger 2.0. - [AsyncAPI documents](https://apigenie.pl/docs/reference/cli/format/asyncapi.md): An AsyncAPI 3 document is recognized by the `asyncapi` field of its root and formatted with the `asyncapi` section of `commands.format`. The section takes `format`, `indent`, `force_array_indent` and `style`, with the values described in Layout and YAML styles, and `property_order`, with the orders of the OpenAPI section and the objects below. The presets of `extends` apply to AsyncAPI documents as to the others. - [Swagger 2.0 documents](https://apigenie.pl/docs/reference/cli/format/swagger.md): A Swagger 2.0 document is recognized by the `swagger` field of its root and formatted with the `swagger` section of `commands.format`. The section takes `format`, `indent`, `force_array_indent` and `style`, with the values described in Layout and YAML styles, and `property_order`, with the orders of the OpenAPI section and the objects below. The presets of `extends` apply to Swagger documents as to the others. - [Protobuf files](https://apigenie.pl/docs/reference/cli/format/protobuf.md): A file with the `.proto` extension is formatted as a proto3 file, with the `protobuf` section of `commands.format`: every declaration gets a canonical layout, nested declarations are indented, and imports, options, declarations, fields, enum values and methods are sorted as `sort` says. No comment is lost. - [GraphQL documents](https://apigenie.pl/docs/reference/cli/format/graphql.md): A file with the `.graphql`, `.graphqls` or `.gql` extension is formatted as a GraphQL document, a schema (type system definitions) or operations, with the `graphql` section of `commands.format`. The layout is that of Prettier: a file formatted by Prettier with the same line width and indentation is left unchanged, and nothing is sorted unless `sort` says so. - [apigenie i18n](https://apigenie.pl/docs/reference/cli/i18n.md): Extracts texts for localization from OpenAPI, Swagger 2.0 and AsyncAPI specifications and Protobuf and GraphQL files, checks and updates their translations, and applies them. All subcommands work on all five: `i18n extract` writes the texts as a key-value file, `i18n check` tells whether a translation file is complete, `i18n sync` updates one after the document changed, and `i18n apply` puts the translated values back. - [apigenie init](https://apigenie.pl/docs/reference/cli/init.md): Sets a repository up for API Genie and for coding agents: writes `apigenie.yaml` with the lint rules of the API descriptions it finds, and adds the section that tells coding agents how to check them to `AGENTS.md`. - [apigenie license](https://apigenie.pl/docs/reference/cli/license.md): Prints the license of API Genie, the names of the open-source libraries it is built with, or the license text of one of them. - [apigenie lint](https://apigenie.pl/docs/reference/cli/lint.md): Checks OpenAPI, Swagger 2.0 and AsyncAPI documents, Protobuf files and GraphQL schemas and operations against the rules of a ruleset, reports every issue with its position in the file, and fixes what its rules know how to fix. Each kind of document has a linter of its own, with its own rules, rulesets and configuration. Linter rules lists the rules of all five with what each checks, since which version it exists and the rulesets that turn it on. - [apigenie overlay](https://apigenie.pl/docs/reference/cli/overlay.md): Applies OpenAPI Overlays to an OpenAPI schema, or to any JSON or YAML document. - [apigenie test](https://apigenie.pl/docs/reference/cli/test.md): Runs the requests of `.http` files and requests generated from an OpenAPI or AsyncAPI document, a GraphQL schema or a `.proto` file against a live server, checks their assertions and scripts, and validates every request, response and message against the document or the schema with the checks of the validating proxy. HTTP requests are checked against an OpenAPI document, GraphQL requests against a GraphQL schema, `GRPC` requests against a `.proto` file, and WebSocket and MQTT, Kafka and AMQP requests and the requests of HTTP channels against an AsyncAPI document. - [Request files](https://apigenie.pl/docs/reference/cli/test/requests.md): The request files `apigenie test` runs are written in the httpYac flavour of the `.http` format, which the JetBrains HTTP client and VS Code's REST Client read too. Directories are searched for `.http` and `.rest` files. - [Variables and OAuth 2](https://apigenie.pl/docs/reference/cli/test/variables.md): Where the values of `{{name}}` come from, and how a request gets a token from an OAuth 2 token endpoint. - [Assertions and scripts](https://apigenie.pl/docs/reference/cli/test/assertions.md): What a request checks about its response, and the JavaScript that runs before a request is sent and after its response came. - [Validation](https://apigenie.pl/docs/reference/cli/test/validation.md): With `--spec`, every request, response and message is checked against the document with the checks of the validating proxy: an OpenAPI or Swagger 2.0 document for HTTP requests, a GraphQL schema for GraphQL requests, a `.proto` file for `GRPC` requests, and an AsyncAPI document for WebSocket, MQTT, Kafka and AMQP requests and the requests of its HTTP channels. - [Generated requests](https://apigenie.pl/docs/reference/cli/test/generate.md): `--generate` sends one request per operation of `--spec`, checked as that operation: path parameters, required query, header and cookie parameters, and a body of the first media type (JSON first), each from the document's examples or generated from its schemas (`readOnly` properties left out). An XML media type gets an XML body, written as the schema's `xml` objects describe it. The URL is `--base-url` (or the document's first server) followed by the operation's path. Request files and `--generate` can be combined. - [GraphQL requests](https://apigenie.pl/docs/reference/cli/test/graphql.md): A `GRAPHQL` request has the GraphQL document as its body and, after a blank line, its variables as a JSON object, as in httpYac and the JetBrains HTTP client. It is sent as a `POST` of `{"query", "variables", "operationName"}` with `Content-Type: application/json`; `# @operation` gives the `operationName`. The query can also come from a file (`< ./book.graphql`), without inline variables then. - [WebSocket and MQTT requests](https://apigenie.pl/docs/reference/cli/test/websocket-mqtt.md): A `WS` (or `WEBSOCKET`) region connects to a `ws://` or `wss://` URL, its headers going with the handshake; an `MQTT` region connects to an `mqtt://host:port` broker, or `mqtts://host:port` (also `ssl://`) over TLS (MQTT 5, or 3.1.1 when the broker refuses it). Without a port, `wss://` uses 443, `mqtt://` 1883 and `mqtts://` 8883. Over TLS the certificate is checked as for `https://`: `--ca-cert` and `--insecure` apply. The body is the message to send; lines `===` separate several messages, and `=== wait-for-server` waits for a message of the server before sending the next one, as in httpYac. Then the region waits for the server's messages until it has `# @expect` of them or `# @timeout` (`--message-timeout`, 5000 ms) has passed. The messages received are the response: its body is their JSON array, each message parsed when it is JSON. - [Kafka requests](https://apigenie.pl/docs/reference/cli/test/kafka.md): A `KAFKA` region produces records to a Kafka cluster and reads what comes on its topics (ADR-170). The URL names a broker, `kafka://host:port` (port 9092 by default) or `kafkas://host:port` (9093, over TLS, verified as `https://` with `--ca-cert`, `--insecure` and `--client-cert`); several bootstrap servers are separated by commas. The cluster needs Kafka 2.3 or later. A cluster that creates topics on first use creates the region's topic, as Kafka's producers ask it to. - [AMQP requests](https://apigenie.pl/docs/reference/cli/test/amqp.md): An `AMQP` region publishes to an AMQP 0-9-1 broker and reads what comes to its queues (ADR-171). The URL is `amqp://[user:password@]host[:port][/vhost]` (port 5672, the virtual host percent-encoded: `/%2Fcarpet-express`), or `amqps://` (5671, over TLS, verified as `https://`). - [gRPC requests](https://apigenie.pl/docs/reference/cli/test/grpc.md): `GRPC` requests call the methods of the services of the `.proto` file given as `--spec`: the request line names the method, the headers are the call's metadata, the body is the message as JSON, and the assertions check the status, the response metadata and the response message. A request is written as httpYac writes it: - [Importing collections](https://apigenie.pl/docs/reference/cli/test/import.md): `apigenie test import` reads a Postman Collection Format v2.0 or v2.1 JSON export and writes request files that `apigenie test` can run. It uses an independently implemented reader, not Postman's JavaScript or the `postman-collection` SDK. Collection v1 is not supported: export as v2.1 from Postman. - [httpYac compatibility](https://apigenie.pl/docs/reference/cli/test/httpyac.md): What of the httpYac `.http` format `apigenie test` reads, and what it does with the rest. - [Configuration](https://apigenie.pl/docs/reference/cli/configuration.md): One file, `apigenie.yaml`, holds the settings of `apigenie`, `apigenie-generator`, `apigenie-server` and `apigenie-catalog`: the rules of the linter and the differ, the layout of the formatter, the specifications of the catalog, the options of every code generator and, for `apigenie-server`, the document, the address and the rest of what the server needs. The commands find it in the repository without an option, check it against its JSON Schema before reading it, and run with their defaults without it. - [Formats](https://apigenie.pl/docs/reference/cli/formats.md): API Genie follows the OpenAPI format registry, the list of `format` values the OpenAPI Initiative keeps, with the JSON types each applies to. The same list drives every part of API Genie (docs/adrs/166): - [Specification extensions](https://apigenie.pl/docs/reference/cli/extensions.md): OpenAPI, Swagger 2.0 and AsyncAPI documents keep what the specification has no field for in `x-` fields, the specification extensions. This page lists the extensions API Genie reads: its own, under `x-apigenie`, and those of other tools that its generators, linters, differ and mock server understand. Each entry says where the extension goes, the value it takes and which tools read it; the page of each tool holds the details. - [faker](https://apigenie.pl/docs/reference/cli/faker.md): API Genie makes realistic values (names, emails, addresses, IBANs, dates...) with its own faker library. Its providers are named like those of faker.js (`person.firstName`, `internet.email`) and are used by: - [Compatibility](https://apigenie.pl/docs/reference/cli/compatibility.md): Scripts, CI jobs, Dockerfiles and dashboards call API Genie and read what it writes. This page says what they can rely on from one release to the next. - [apigenie-mcp](https://apigenie.pl/docs/reference/cli/mcp.md): `apigenie-mcp` (since 0.12.0) gives coding agents the checks of the CLI as tools of the Model Context Protocol: lint, breaking changes, changelogs, formatting, bundling and an outline of an API. It is installed next to `apigenie` by every archive and package, npm and Homebrew. `describe` reads the file itself; the other tools run `apigenie --json` for each call. `lint`, `check_breaking_changes`, `changelog` and `format` read the `apigenie.yaml` that the command finds from the directory of the file. - [apigenie-generator](https://apigenie.pl/docs/reference/generator.md): `apigenie-generator` generates code and data from an OpenAPI or AsyncAPI document, servers from a GraphQL schema, gRPC code from a Protobuf file set, documentation sites from OpenAPI, Swagger, AsyncAPI, GraphQL and Protobuf files, and validation schemas from JSON Schemas. It is a separate executable, installed next to `apigenie` by every package, the npm package and the Docker image (run it there with `docker run --entrypoint apigenie-generator mykulyak/apigenie ...`). Before 0.9.0 the generators were the `apigenie generate` command: `apigenie generate client fetch ...` is now `apigenie-generator client fetch ...`, with the same options and configuration. - [Conformance results](https://apigenie.pl/docs/reference/generator/conformance.md): The results of the codegen conformance suite for each target of `apigenie-generator`, on the Carpet Express fixture. A ✗ is a feature or a check that fails today; the manifests' reasons are at the end of the page. - [apigenie-generator docs](https://apigenie.pl/docs/reference/generator/docs.md): Generate a documentation site from OpenAPI, Swagger 2.0, AsyncAPI, GraphQL and Protobuf files, several at once. - [apigenie-generator data](https://apigenie.pl/docs/reference/generator/data.md): Generate example data for a schema of an OpenAPI document. The command is experimental. - [apigenie-generator schema zod](https://apigenie.pl/docs/reference/generator/schema-zod.md): Generate Zod (v4) schemas, with their TypeScript types, from JSON Schemas. - [apigenie-generator client csharp](https://apigenie.pl/docs/reference/generator/client-csharp.md): Generate a C# client of an OpenAPI document, built on `HttpClient` and `System.Text.Json`, for .NET 8 (or 9 and 10). - [apigenie-generator client elixir](https://apigenie.pl/docs/reference/generator/client-elixir.md): Generate an Elixir client on Req from an OpenAPI document. - [apigenie-generator client fetch](https://apigenie.pl/docs/reference/generator/client-fetch.md): Generate a TypeScript client for the Fetch API from an OpenAPI document. - [apigenie-generator client go](https://apigenie.pl/docs/reference/generator/client-go.md): Generate a Go client for the `net/http` package of Go 1.22 from an OpenAPI document. - [apigenie-generator client java](https://apigenie.pl/docs/reference/generator/client-java.md): Generate a Java client of an OpenAPI document: a Maven project using Spring's `RestClient` (the default) or `RestTemplate`, Spring Cloud OpenFeign interfaces, or Spring HTTP interfaces. - [apigenie-generator client python](https://apigenie.pl/docs/reference/generator/client-python.md): Generate a Python client of an OpenAPI document, built on httpx and Pydantic 2. - [apigenie-generator client rust](https://apigenie.pl/docs/reference/generator/client-rust.md): Generate a Rust client crate on reqwest 0.12 and serde from an OpenAPI document: an async method per operation, returning an enum of the documented responses. - [apigenie-generator client swift](https://apigenie.pl/docs/reference/generator/client-swift.md): Generate a Swift package calling the operations of an OpenAPI document, for iOS, macOS, tvOS, watchOS and Linux apps. - [apigenie-generator server aspnet](https://apigenie.pl/docs/reference/generator/server-aspnet.md): Generate an ASP.NET Core server in C#, built on Minimal APIs. - [apigenie-generator server axum](https://apigenie.pl/docs/reference/generator/server-axum.md): Generate a Rust server crate on axum 0.8 from an OpenAPI document: a trait with an async method per operation, and a router that checks, decodes and validates requests before it calls them. - [apigenie-generator server express](https://apigenie.pl/docs/reference/generator/server-express.md): Generate an Express server stub in TypeScript from an OpenAPI document. - [apigenie-generator server fastapi](https://apigenie.pl/docs/reference/generator/server-fastapi.md): Generate a Python FastAPI server from an OpenAPI document. - [apigenie-generator server go](https://apigenie.pl/docs/reference/generator/server-go.md): Generate a Go server for the `net/http` router of Go 1.22 from an OpenAPI document. - [apigenie-generator server hummingbird](https://apigenie.pl/docs/reference/generator/server-hummingbird.md): Generate a Swift server package for Hummingbird 2 from an OpenAPI document. - [apigenie-generator server mcp](https://apigenie.pl/docs/reference/generator/server-mcp.md): Generate a Model Context Protocol server in TypeScript from an OpenAPI document, so that AI agents call the API through typed tools. - [apigenie-generator server orpc](https://apigenie.pl/docs/reference/generator/server-orpc.md): Generate a TypeScript server based on oRPC from an OpenAPI document. - [apigenie-generator server phoenix](https://apigenie.pl/docs/reference/generator/server-phoenix.md): Generate a Phoenix 1.7 application from an OpenAPI document. - [apigenie-generator server spring](https://apigenie.pl/docs/reference/generator/server-spring.md): Generate a Spring Boot server, or Spring Cloud / HTTP interface clients, in Java. - [apigenie-generator server vapor](https://apigenie.pl/docs/reference/generator/server-vapor.md): Generate a Swift server package for Vapor 4 from an OpenAPI document. - [apigenie-generator client csharp (AsyncAPI)](https://apigenie.pl/docs/reference/generator/client-csharp-asyncapi.md): Generate a C# Kafka client library for the Kafka channels of an AsyncAPI document. - [apigenie-generator client elixir (AsyncAPI)](https://apigenie.pl/docs/reference/generator/client-elixir-asyncapi.md): Generate an Elixir client library of the WebSocket and Kafka channels of an AsyncAPI document. - [apigenie-generator client go (AsyncAPI)](https://apigenie.pl/docs/reference/generator/client-go-asyncapi.md): Generate a Go Kafka client package for the Kafka channels of an AsyncAPI document. - [apigenie-generator client java (AsyncAPI)](https://apigenie.pl/docs/reference/generator/client-java-asyncapi.md): Generate a Java Kafka client library for the Kafka channels of an AsyncAPI document. - [apigenie-generator client kafkajs](https://apigenie.pl/docs/reference/generator/client-kafkajs.md): Generate a TypeScript (Node.js) Kafka client of an AsyncAPI document, on KafkaJS. - [apigenie-generator client python (AsyncAPI)](https://apigenie.pl/docs/reference/generator/client-python-asyncapi.md): Generate a Python asyncio Kafka client package for the Kafka channels of an AsyncAPI document. - [apigenie-generator client ws](https://apigenie.pl/docs/reference/generator/client-ws.md): Generate a TypeScript client of the WebSocket channels of an AsyncAPI document. - [apigenie-generator server aspnet (AsyncAPI)](https://apigenie.pl/docs/reference/generator/server-aspnet-asyncapi.md): Generate an ASP.NET Core application of the Kafka channels of an AsyncAPI document. - [apigenie-generator server faststream](https://apigenie.pl/docs/reference/generator/server-faststream.md): Generate a Python FastStream application of the Kafka, AMQP (RabbitMQ) and MQTT channels of an AsyncAPI document. - [apigenie-generator server go (AsyncAPI)](https://apigenie.pl/docs/reference/generator/server-go-asyncapi.md): Generate a Go Kafka application of the Kafka channels of an AsyncAPI document. - [apigenie-generator server kafkajs](https://apigenie.pl/docs/reference/generator/server-kafkajs.md): Generate a TypeScript (Node.js) Kafka application of an AsyncAPI document, on KafkaJS. - [apigenie-generator server phoenix (AsyncAPI)](https://apigenie.pl/docs/reference/generator/server-phoenix-asyncapi.md): Generate a Phoenix application of the WebSocket and Kafka channels of an AsyncAPI document. - [apigenie-generator server spring (AsyncAPI)](https://apigenie.pl/docs/reference/generator/server-spring-asyncapi.md): Generate a Spring Boot application of the Kafka channels of an AsyncAPI document. - [apigenie-generator server ws](https://apigenie.pl/docs/reference/generator/server-ws.md): Generate a TypeScript (Node.js) server of the WebSocket channels of an AsyncAPI document. - [apigenie-generator client elixir (Protobuf)](https://apigenie.pl/docs/reference/generator/client-elixir-protobuf.md): Generate an Elixir gRPC client on elixir-grpc from a `.proto` file and the files it imports. - [apigenie-generator server elixir-grpc](https://apigenie.pl/docs/reference/generator/server-elixir-grpc.md): Generate an Elixir gRPC server on elixir-grpc from a `.proto` file and the files it imports. - [apigenie-generator server absinthe](https://apigenie.pl/docs/reference/generator/server-absinthe.md): Generate an Absinthe server from a GraphQL schema (SDL). - [apigenie-server](https://apigenie.pl/docs/reference/server.md): `apigenie-server` serves an OpenAPI 3.0, 3.1 or 3.2 document (or a Swagger 2.0 one, see Swagger 2.0 documents) as a mock API, the channels of an AsyncAPI 3.x document over WebSocket, HTTP and MQTT, the gRPC services of a `.proto` file, or a GraphQL schema as a GraphQL endpoint with subscriptions. It answers with the document's examples, with stubs, or with data generated from its schemas, validates requests, responses and messages, logs every exchange, and can make the network slow or unreliable on purpose. In front of a real server (`--proxy-to`) it becomes a validating proxy that contract-tests the server's traffic against the OpenAPI or Swagger document, the GraphQL schema, the AsyncAPI document (WebSocket, MQTT and HTTP channels) or the `.proto` file, with coverage and JSON or JUnit reports. It is installed next to `apigenie` by every package (archives, `.deb`, `.rpm`, npm, Homebrew) and has a Docker image of its own. - [Responses](https://apigenie.pl/docs/reference/server/responses.md): How the mock answers a request: where the paths are served, which status, body and headers it picks, how a request asks for a particular answer, and how the network is made slow or unreliable on purpose. How the mock picks a response walks through these rules with a document to try them on. - [Scenarios and extensions](https://apigenie.pl/docs/reference/server/scenarios.md): A scenario is a named set of rules switched on and off together. A rule matches requests (by `operationId`, `method`, `path`, `tag`, headers or query) and sets the status, an example, a literal body, headers, the network simulation, or a probability. Scenarios come from the configuration, from `x-apigenie-mock` in the document, or from the admin API. - [Scripts](https://apigenie.pl/docs/reference/server/scripts.md): A script is an ES module whose default export has any of five hooks: - [Document store](https://apigenie.pl/docs/reference/server/store.md): Scripts keep documents in collections: `ctx.db.`, made the first time a script names it. Writes are kept in memory for the run (see `--db-file`), shared by every script and shown by the admin API's `/__apigenie/db`. - [Several services](https://apigenie.pl/docs/reference/server/services.md): One `apigenie-server` serves several documents at once: an application's backends, a gateway's services, the HTTP and the messaging side of a system. Each document is a **service** with a name and a **mount**, where its clients reach it. Several `SPEC`s on the command line are services named after their files (`pets.openapi.yaml` is `pets`) and mounted at `/`; a `.proto` file gets a port of its own. A single `SPEC` is served as before, without a prefix. The configuration's `services` list says more: - [Validation and security](https://apigenie.pl/docs/reference/server/validation.md): Requests are checked against their operation: path, query, header and cookie parameters in every style, and JSON, XML, form and multipart bodies. A request that doesn't match is answered with 422 and the problems, a body that can't be parsed (JSON, XML, multipart) with 400, an unknown media type with 415. Security requirements are checked for presence (API keys, HTTP basic and bearer, OAuth2 and OpenID Connect tokens; 401 with `WWW-Authenticate`), and against configured credentials in `enforce` mode (403). Responses the mock makes are checked too: problems are logged and counted in `X-Apigenie-Mock-Violations`, or answered with 500 under `--strict`. - [Contract testing (validating proxy)](https://apigenie.pl/docs/reference/server/contract-testing.md): With `--proxy-to`, an OpenAPI document is not mocked: every request goes to the real server, and the mock checks the request and the server's response against the document. (A GraphQL schema and an AsyncAPI document's WebSocket, MQTT and HTTP channels work the same way, with checks of their own: see GraphQL contract testing, WebSocket contract testing, MQTT contract testing and HTTP channels.) Point your tests, your frontend or a load test at the mock instead of the server, and the traffic becomes a contract test. To send the requests yourself, from `.http` files or generated from the document, with the same checks and reports, use `apigenie test`. For the checks and what report and enforce mean, explained with a server to try them on, see What the validating proxy checks. - [Session recording and replay](https://apigenie.pl/docs/reference/server/recording.md): A run of the server, every exchange of every service and protocol, kept as files that a replay reads back as a mock, in a test suite too. - [AsyncAPI](https://apigenie.pl/docs/reference/server/asyncapi.md): For an AsyncAPI 3.x document the mock plays the application the document describes. Servers with the `ws`, `http` and `mqtt` protocols are served (and `wss`, `https` and `mqtts` over TLS with `--tls-cert`, cleartext without). Kafka and AMQP channels aren't served, but are read from a real cluster or broker with `--proxy-to kafka://` (below) and `--proxy-to amqp://` (below); the others are listed as not served. - [Protobuf / gRPC](https://apigenie.pl/docs/reference/server/grpc.md): For a `.proto` file the mock serves its services over gRPC, on the same port as HTTP: clients connect with cleartext HTTP/2 (`-plaintext` in grpcurl, `createInsecure()` in grpc-js, `--http2-prior-knowledge` in buf curl), or over TLS when the mock has `--tls-cert` (grpcurl without `-plaintext`, `createSsl()` in grpc-js; see TLS). Imports are looked up in `--proto-path` directories, then next to the file, then among the embedded standard files: the well-known types, `google/api/annotations.proto`, `google/rpc/status.proto`, `code.proto` and `error_details.proto`. - [GraphQL](https://apigenie.pl/docs/reference/server/graphql.md): A GraphQL schema is served as a GraphQL endpoint, `/graphql` under `--base-path` (`graphql.path` changes it). Every query, mutation and subscription the schema allows is answered, with no resolvers to write. - [Configuration](https://apigenie.pl/docs/reference/server/configuration.md): `apigenie-server` reads `--config`, else `apigenie-server.yaml` (`.yml`, `.json`), then `apigenie-mock.yaml` (`.yml`, `.json`; the name before the rename, still read) or `.apigenie.yaml` in the current directory, else the shared `apigenie.yaml` of the project (in the current directory or a parent, up to the root of the repository; see configuration). In a file of its own the settings are at the top level; in a shared configuration they are under `commands.mock`. The command line wins over the environment variables, which win over the file; `apigenie config --for mock --origin` shows which one set each value. The JSON Schema of a file of its own is `https://apigenie.pl/schemas/apigenie-server-config/latest.json`. - [Dashboard and admin API](https://apigenie.pl/docs/reference/server/dashboard.md): The dashboard shows the server's log and state in a browser; the admin API behind it is what tests and scripts use to switch scenarios, add stubs and read the log. - [TLS](https://apigenie.pl/docs/reference/server/tls.md): `apigenie-server` serves TLS itself, and its proxies reach `https://` and `wss://` servers and `mqtts://` brokers. TLS 1.2 and 1.3 come from Mbed TLS. It's built with what modern servers use: AES-GCM and ChaCha20-Poly1305, ECDHE key exchange on x25519, P-256, P-384 and P-521, and RSA and ECDSA certificates. A server that offers only static RSA or DHE key exchange, or other ciphers, can't be reached. - [apigenie-catalog](https://apigenie.pl/docs/reference/catalog.md): `apigenie-catalog` lists the API specifications of a repository, records their names and owners in the configuration file, and releases them as Git tags. It is installed next to `apigenie` by every archive and package, npm and Homebrew; `apigenie catalog ...` prints the `apigenie-catalog` command to run instead. - [The editor's hosts](https://apigenie.pl/docs/reference/editor/hosts.md): The API Genie editor edits OpenAPI 3.0, OpenAPI 3.1 and AsyncAPI 3.0 files in forms, on three hosts, with the same page in each: - [@mykulyak/apigenie-docs](https://apigenie.pl/docs/reference/doc-components.md): The npm package `@mykulyak/apigenie-docs` holds the doc components: standard custom elements, built with Lit, that document OpenAPI 3.0 and 3.1, Swagger 2.0, AsyncAPI 3.0 and 3.1, Protobuf (proto3) and GraphQL APIs on a page, with Try it out for OpenAPI, Swagger 2.0 and GraphQL. It also holds `apigenie-docs build`, which renders the docs bundle of `apigenie-generator docs` into a static site (apigenie-docs build). - [apg-api-reference and apg-spec](https://apigenie.pl/docs/reference/doc-components/reference-and-spec.md): `` renders a whole reference from one tag: navigation with search, the overview, servers, authentication, the operations with Try it out, and the schemas. For an AsyncAPI document, a Protobuf file or a GraphQL schema it uses the elements of that standard. `` loads a document and shares it with the elements inside it, for a page of your own design. Both carry the settings of Try it out (Try it out). - [OpenAPI elements](https://apigenie.pl/docs/reference/doc-components/openapi.md): The elements of OpenAPI 3.0 and 3.1 documents. ``, ``, ``, ``, `` and `` show Swagger 2.0 documents as well; Swagger 2.0 elements lists the elements of their own. - [Swagger 2.0 elements](https://apigenie.pl/docs/reference/doc-components/swagger.md): Swagger 2.0 documents have their own elements for the overview, the hosts, the security definitions and the operations. `` picks them by itself. ``, ``, ``, ``, `` and `` work with both kinds of document (OpenAPI elements), and the schemas of a Swagger 2.0 document are called definitions. - [AsyncAPI elements](https://apigenie.pl/docs/reference/doc-components/asyncapi.md): The elements of AsyncAPI 3.0 and 3.1 documents. `` picks them by itself, and ``, `` and the building blocks serve AsyncAPI documents as well. - [Protobuf and gRPC elements](https://apigenie.pl/docs/reference/doc-components/protobuf.md): The elements of Protobuf files with gRPC services. `` and `` pick them by themselves. Declarations are named by full name (`acme.library.v1.Book`) or by name relative to the package (`Book.Author`, `LibraryService.GetBook`). - [GraphQL elements](https://apigenie.pl/docs/reference/doc-components/graphql.md): The elements of GraphQL schemas (SDL). Operations, the fields of the root operation types, are named by schema coordinate (`Query.books`), by kind and field (`mutation.borrow`) or by field (`books`); types and directives by name. - [Building blocks](https://apigenie.pl/docs/reference/doc-components/building-blocks.md): The elements the others are built from, for content of your own next to them: descriptions in Markdown, code with a copy button, and the label of a method or an operation's kind. - [Try it out](https://apigenie.pl/docs/reference/doc-components/try-it-out.md): `` and the Try it out of ``, `` and `` send requests from the page with `fetch`, so the API must allow the page's origin (CORS). These settings go on `` or `` and apply to every element inside: - [Theming](https://apigenie.pl/docs/reference/doc-components/theming.md): The elements keep their styles in shadow roots, so page CSS does not leak in or out. Two mechanisms change their look: design tokens and CSS parts. Light and dark palettes follow the page's `color-scheme`; `theme="light"` or `theme="dark"` forces one. - [Server-side rendering](https://apigenie.pl/docs/reference/doc-components/server-side-rendering.md): `@mykulyak/apigenie-docs/ssr` renders the elements in Node with `@lit-labs/ssr` into declarative shadow DOM: the documentation is HTML that search engines index and readers see before any script runs. The `hydrate` entry point then makes it interactive without rendering it again. - [apigenie-docs build](https://apigenie.pl/docs/reference/doc-components/docs-build.md): `apigenie-generator docs` compiles OpenAPI, Swagger 2.0, AsyncAPI, GraphQL and Protobuf files into a docs bundle (`apigenie-docs.json` and, per document and locale, the document or its documentation model, with the git changelog and the example files) and an npm project whose `build` script runs `apigenie-docs build` from this package (apigenie-generator docs). - [Any CI system](https://apigenie.pl/docs/ci.md): `apigenie` runs the same three checks on a pull request whatever system runs the pipeline: `lint` for the issues in the files, `format --check` for the files that are not formatted, and `diff` for the changes that break clients. Each command exits with status 1 when it finds something, which fails the job, and writes a report in a format the system shows next to the pull request. This page has the pieces every system needs: the three commands, the reports each system reads, installing the CLI in a job, the comparison with the base branch, and one script that runs the checks. The pages of GitLab CI, Azure Pipelines, Jenkins, CircleCI and Bitbucket Pipelines put them into one pipeline file each. On GitHub, the GitHub Action installs the CLI, finds the base of the pull request and turns the reports into annotations. - [Azure Pipelines](https://apigenie.pl/docs/ci/azure-pipelines.md): An `azure-pipelines.yml` that lints, checks the formatting of and compares an OpenAPI file in every pull request, as one job with a step per check: each step has its own status in the run, and the lint report feeds the Tests tab. Any CI system explains the pieces: the commands, the reports, the installation and the comparison with the target branch. - [Bitbucket Pipelines](https://apigenie.pl/docs/ci/bitbucket-pipelines.md): A `bitbucket-pipelines.yml` that lints, checks the formatting of and compares an OpenAPI file in every pull request, as three parallel steps: each has its own status on the pipeline, and the lint report feeds the Tests tab. Any CI system explains the pieces: the commands, the reports, the installation and the comparison with the destination branch. - [CircleCI](https://apigenie.pl/docs/ci/circleci.md): A `.circleci/config.yml` that lints, checks the formatting of and compares an OpenAPI file on every push, as one job with a step per check: each has its own status in the job, and the lint report feeds the Tests tab. Any CI system explains the pieces: the commands, the reports, the installation and the comparison with the base branch. - [GitLab CI](https://apigenie.pl/docs/ci/gitlab.md): A `.gitlab-ci.yml` that lints, checks the formatting of and compares an OpenAPI file in every merge request, as three jobs: each has its own status in the merge request, and the lint report feeds the test summary. Any CI system explains the pieces: the commands, the reports, the installation and the comparison with the target branch. - [Jenkins](https://apigenie.pl/docs/ci/jenkins.md): A `Jenkinsfile` that lints, checks the formatting of and compares an OpenAPI file in every pull request of a multibranch pipeline, as one stage per check: each has its own status on the build, and the Warnings plugin shows the lint issues. Any CI system explains the pieces: the commands, the reports, the installation and the comparison with the target branch. - [GitHub Action](https://apigenie.pl/docs/ci/github-action.md): The API Genie GitHub Action installs the CLI on GitHub Actions runners and lints, checks the formatting of, or diffs OpenAPI, Swagger 2.0, AsyncAPI, Protobuf and GraphQL files. Issues and changes are shown as annotations on the files of a pull request, and a report is added to the job summary. The action is published on the GitHub Marketplace as `mykulyak/api-genie-action`; its source and its releases are in mykulyak/api-genie-action. - [The editor's Library](https://apigenie.pl/docs/reference/editor/library.md): The Library is the panel under the file list in the API Genie editor. It holds two kinds of schemas, and you drag schemas between it and the spec: ## Linter rules - [Linter rules](https://apigenie.pl/docs/linter.md): Every rule and ruleset of apigenie lint, for OpenAPI, AsyncAPI, Swagger 2.0, GraphQL and Protobuf. - [OpenAPI linter rules](https://apigenie.pl/docs/linter/openapi.md): The 67 rules and 5 rulesets of apigenie lint for OpenAPI. - [Recommended ruleset (OpenAPI)](https://apigenie.pl/docs/linter/openapi/rulesets/recommended.md): The rules of the Recommended ruleset of apigenie lint for OpenAPI, with their severities. - [Strict ruleset (OpenAPI)](https://apigenie.pl/docs/linter/openapi/rulesets/strict.md): The rules of the Strict ruleset of apigenie lint for OpenAPI, with their severities. - [All ruleset (OpenAPI)](https://apigenie.pl/docs/linter/openapi/rulesets/all.md): The rules of the All ruleset of apigenie lint for OpenAPI, with their severities. - [JsonApi ruleset (OpenAPI)](https://apigenie.pl/docs/linter/openapi/rulesets/json-api.md): The rules of the JsonApi ruleset of apigenie lint for OpenAPI, with their severities. - [Privacy ruleset (OpenAPI)](https://apigenie.pl/docs/linter/openapi/rulesets/privacy.md): The rules of the Privacy ruleset of apigenie lint for OpenAPI, with their severities. - [AsyncAPI linter rules](https://apigenie.pl/docs/linter/asyncapi.md): The 42 rules and 4 rulesets of apigenie lint for AsyncAPI. - [Recommended ruleset (AsyncAPI)](https://apigenie.pl/docs/linter/asyncapi/rulesets/recommended.md): The rules of the Recommended ruleset of apigenie lint for AsyncAPI, with their severities. - [Strict ruleset (AsyncAPI)](https://apigenie.pl/docs/linter/asyncapi/rulesets/strict.md): The rules of the Strict ruleset of apigenie lint for AsyncAPI, with their severities. - [All ruleset (AsyncAPI)](https://apigenie.pl/docs/linter/asyncapi/rulesets/all.md): The rules of the All ruleset of apigenie lint for AsyncAPI, with their severities. - [CloudEvents ruleset (AsyncAPI)](https://apigenie.pl/docs/linter/asyncapi/rulesets/cloudevents.md): The rules of the CloudEvents ruleset of apigenie lint for AsyncAPI, with their severities. - [Swagger 2.0 linter rules](https://apigenie.pl/docs/linter/swagger.md): The 48 rules and 3 rulesets of apigenie lint for Swagger 2.0. - [Recommended ruleset (Swagger 2.0)](https://apigenie.pl/docs/linter/swagger/rulesets/recommended.md): The rules of the Recommended ruleset of apigenie lint for Swagger 2.0, with their severities. - [Strict ruleset (Swagger 2.0)](https://apigenie.pl/docs/linter/swagger/rulesets/strict.md): The rules of the Strict ruleset of apigenie lint for Swagger 2.0, with their severities. - [All ruleset (Swagger 2.0)](https://apigenie.pl/docs/linter/swagger/rulesets/all.md): The rules of the All ruleset of apigenie lint for Swagger 2.0, with their severities. - [GraphQL linter rules](https://apigenie.pl/docs/linter/graphql.md): The 87 rules and 4 rulesets of apigenie lint for GraphQL. - [Recommended ruleset (GraphQL)](https://apigenie.pl/docs/linter/graphql/rulesets/recommended.md): The rules of the Recommended ruleset of apigenie lint for GraphQL, with their severities. - [Strict ruleset (GraphQL)](https://apigenie.pl/docs/linter/graphql/rulesets/strict.md): The rules of the Strict ruleset of apigenie lint for GraphQL, with their severities. - [All ruleset (GraphQL)](https://apigenie.pl/docs/linter/graphql/rulesets/all.md): The rules of the All ruleset of apigenie lint for GraphQL, with their severities. - [Relay ruleset (GraphQL)](https://apigenie.pl/docs/linter/graphql/rulesets/relay.md): The rules of the Relay ruleset of apigenie lint for GraphQL, with their severities. - [Protobuf linter rules](https://apigenie.pl/docs/linter/protobuf.md): The 39 rules and 3 rulesets of apigenie lint for Protobuf. - [Recommended ruleset (Protobuf)](https://apigenie.pl/docs/linter/protobuf/rulesets/recommended.md): The rules of the Recommended ruleset of apigenie lint for Protobuf, with their severities. - [Strict ruleset (Protobuf)](https://apigenie.pl/docs/linter/protobuf/rulesets/strict.md): The rules of the Strict ruleset of apigenie lint for Protobuf, with their severities. - [All ruleset (Protobuf)](https://apigenie.pl/docs/linter/protobuf/rulesets/all.md): The rules of the All ruleset of apigenie lint for Protobuf, with their severities. ## OpenAPI linter rules - [audience-defined](https://apigenie.pl/docs/linter/openapi/rules/audience-defined.md): This rule checks that `info` has an `x-audience` field, and that its value is one of `internal-team`, `internal-company`, `partner` and `public`. - [contact-defined](https://apigenie.pl/docs/linter/openapi/rules/contact-defined.md): This rule checks that `info.contact` is present, with a `name` and a `url` or an `email`. - [id-defined](https://apigenie.pl/docs/linter/openapi/rules/id-defined.md): This rule checks that `info` has an identifier field, `x-id` by default, whose value is a UUID or matches a pattern of your own. - [info-defined](https://apigenie.pl/docs/linter/openapi/rules/info-defined.md): This rule checks that `info` has a non-empty `summary`, `description` and `version`. - [json-api/content-type](https://apigenie.pl/docs/linter/openapi/rules/json-api-content-type.md): This rule checks that every request body and response of the document declares the `application/vnd.api+json` media type. - [json-api/resource-type-unique](https://apigenie.pl/docs/linter/openapi/rules/json-api-resource-type-unique.md): This rule checks that every resource object schema of the JSON:API responses declares its `type` as a `const` or a one-value `enum`, and that no two of them declare the same type. - [json-api/schema-validation](https://apigenie.pl/docs/linter/openapi/rules/json-api-schema-validation.md): This rule checks that the schemas of the JSON:API request bodies and responses describe JSON:API documents: a top-level object with `data`, `errors` or `meta`, and resource objects with `type` and `id`. - [json-schema-validation](https://apigenie.pl/docs/linter/openapi/rules/json-schema-validation.md): This rule validates the document against API Genie's own meta-schema of OpenAPI 3.0 or 3.1 and reports every violation the validator finds. - [license-defined](https://apigenie.pl/docs/linter/openapi/rules/license-defined.md): This rule checks that `info.license` is present, with a `name` and a `url` or an SPDX `identifier`. - [no-content-response-defined](https://apigenie.pl/docs/linter/openapi/rules/no-content-response-defined.md): This rule checks that no `204` response declares `content`. - [openapi-json-schema-validation](https://apigenie.pl/docs/linter/openapi/rules/openapi-json-schema-validation.md): This rule validates the document against the JSON Schema the OpenAPI Initiative publishes for its version: OpenAPI 3.0, 3.1 or 3.2. - [operation-description-defined](https://apigenie.pl/docs/linter/openapi/rules/operation-description-defined.md): This rule checks that every operation has a `description` of at least 10 characters. - [operation-document-not-primitive](https://apigenie.pl/docs/linter/openapi/rules/operation-document-not-primitive.md): This rule checks that every request body and response body is an object or an array, not a string, a number or a boolean. - [operation-id-defined](https://apigenie.pl/docs/linter/openapi/rules/operation-id-defined.md): This rule checks that every operation has a non-empty `operationId`: those of paths, webhooks and the path items under `components`, and those of callbacks. - [operation-id-unique](https://apigenie.pl/docs/linter/openapi/rules/operation-id-unique.md): This rule checks that no two operations share an `operationId`, callback operations included: the specification requires the ID to be unique among all operations of the API. Empty IDs are left to operation-id-defined. - [operation-rate-limiting-defined](https://apigenie.pl/docs/linter/openapi/rules/operation-rate-limiting-defined.md): This rule checks that the responses of every operation declare the rate-limiting headers: `RateLimit-Limit`, `X-RateLimit-Limit` or `X-Rate-Limit-Limit` on every 2xx and 4xx response, and `Retry-After` on the `429` and `503` responses. - [operation-security-defined](https://apigenie.pl/docs/linter/openapi/rules/operation-security-defined.md): This rule checks that every operation has security requirements, its own or the document's. - [operation-success-response](https://apigenie.pl/docs/linter/openapi/rules/operation-success-response.md): This rule checks that every operation declares at least one 2xx or 3xx response, as a status code or as the `2XX` or `3XX` range. - [operation-tags-declared](https://apigenie.pl/docs/linter/openapi/rules/operation-tags-declared.md): This rule checks that every tag an operation uses is declared in the document's `tags`. - [operation-tags-defined](https://apigenie.pl/docs/linter/openapi/rules/operation-tags-defined.md): This rule checks that every operation has at least one tag. - [parameter-description-defined](https://apigenie.pl/docs/linter/openapi/rules/parameter-description-defined.md): This rule checks that every parameter has a description of at least 10 characters that is not a placeholder. - [parameter-naming](https://apigenie.pl/docs/linter/openapi/rules/parameter-naming.md): This rule checks that parameter names follow one naming convention per location: `kebab-case` for query parameters, `Header-Case` for header parameters and `snake_case` for the others, unless configured otherwise. - [parameters-unique](https://apigenie.pl/docs/linter/openapi/rules/parameters-unique.md): This rule checks that no path item or operation declares two parameters with the same name and location. - [patch-request-body-partial](https://apigenie.pl/docs/linter/openapi/rules/patch-request-body-partial.md): This rule checks that `PATCH` request bodies do not require properties. - [path-parameters-defined](https://apigenie.pl/docs/linter/openapi/rules/path-parameters-defined.md): This rule checks that every `{placeholder}` of a path has a parameter with `in: path` and that name, on the path item or on each of its operations. - [path-parameters-on-items](https://apigenie.pl/docs/linter/openapi/rules/path-parameters-on-items.md): This rule checks that path parameters are declared on the path item, not repeated on each of its operations. - [paths-max-count](https://apigenie.pl/docs/linter/openapi/rules/paths-max-count.md): This rule checks that a document declares at most 8 paths, or the number configured. - [paths-max-depth](https://apigenie.pl/docs/linter/openapi/rules/paths-max-depth.md): This rule checks that no path has more than 4 segments, or the number configured. A segment is the text between two slashes; `/users/{userId}/posts` has three. - [paths-sorted](https://apigenie.pl/docs/linter/openapi/rules/paths-sorted.md): This rule checks that the paths of a document are in alphabetical order. - [paths-unique](https://apigenie.pl/docs/linter/openapi/rules/paths-unique.md): This rule checks that no two paths match the same requests. Paths that differ only in the names of their placeholders, `/users/{id}` and `/users/{userId}`, are the same path. - [paths-well-formed](https://apigenie.pl/docs/linter/openapi/rules/paths-well-formed.md): This rule checks that every path starts with one slash, ends without one, has no empty segment (`//`), no empty placeholder (`{}`) and no upper-case letter outside the placeholders. - [privacy/no-credentials-in-url](https://apigenie.pl/docs/linter/openapi/rules/privacy-no-credentials-in-url.md): This rule reports passwords, tokens, API keys and other credentials passed in path or query parameters, and API keys that a security scheme sends in the query string. - [privacy/no-personal-data-in-url](https://apigenie.pl/docs/linter/openapi/rules/privacy-no-personal-data-in-url.md): This rule reports personal data, such as e-mail addresses, names, dates of birth, phone numbers and national identification numbers, passed in path or query parameters. - [ref-no-siblings](https://apigenie.pl/docs/linter/openapi/rules/ref-no-siblings.md): This rule checks that, in an OpenAPI 3.0 document, no property other than an extension sits next to the `$ref` of a Reference Object. - [safe-markdown](https://apigenie.pl/docs/linter/openapi/rules/safe-markdown.md): This rule checks that no description contains a `