Kiota · API Governance Rules

Kiota API Rules

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

0 Rules
View Rules File View on GitHub

Spectral Ruleset

kiota-validation-rules.yml Raw ↑
x-generated: '2026-08-06'
x-method: searched
x-source: https://learn.microsoft.com/en-us/openapi/kiota/using#--disable-validation-rules---dvr
description: >-
  Kiota ships an OpenAPI description linter and runs it before every generation.
  This is a genuine, published governance ruleset — it is the set of description
  defects Microsoft considers serious enough to warn about before emitting a
  client, and it is the closest thing in the API tooling ecosystem to an
  opinionated "will this description produce a good SDK?" check. Each rule can be
  suppressed individually with --disable-validation-rules <rule>, or all of them
  (including the rules inherited from OpenAPI.net) with --disable-validation-rules all.
  Per-client suppressions are persisted in the disabledValidationRules array of
  .kiota/workspace.json.
x-docs: https://learn.microsoft.com/en-us/openapi/kiota/using
x-flag: --disable-validation-rules (--dvr)
x-inherits: OpenAPI.net validation rules
x-severity_model: >-
  Every Kiota-specific rule below emits a warning; warnings do not stop
  generation. There are no error-severity Kiota rules.
x-rule_count: 9
rules:
  - id: DivergentResponseSchema
    severity: warning
    description: Returns a warning if an operation defines multiple different successful response schemas (200, 201, 202, 203).
    why: A single operation with divergent success schemas cannot be given one strongly-typed return type.
  - id: GetWithBody
    severity: warning
    description: Returns a warning if a GET request has a body defined.
    why: Request bodies on GET are not portable across HTTP stacks and languages.
  - id: InconsistentTypeFormat
    severity: warning
    description: 'Returns a warning if an inconsistent type/format pair is defined (for example, type: string, format: int32).'
    why: An impossible type/format pair forces the generator to guess a primitive.
  - id: KnownAndNotSupportedFormats
    severity: warning
    description: Returns a warning if a known format isn't supported for generation (for example, email, uri).
    why: The format is recognised but has no target-language type, so it degrades to a plain string.
  - id: MissingDiscriminator
    severity: warning
    description: Returns a warning if an anyOf or oneOf schema is used without a discriminator property name.
    why: Without a discriminator the generated deserializer cannot pick the concrete type at runtime.
  - id: MultipleServerEntries
    severity: warning
    description: Returns a warning if multiple servers are defined.
    why: Kiota generates a single base URL into the client; multiple servers make that choice ambiguous.
  - id: NoContentWithBody
    severity: warning
    description: Returns a warning if a response schema is defined for a 204 response.
    why: A 204 has no body by definition, so the declared schema is unreachable.
  - id: NoServerEntry
    severity: warning
    description: Returns a warning if no servers are defined.
    why: With no server entry the generated client has no base URL and the caller must supply one.
  - id: UrlFormEncodedComplex
    severity: warning
    description: Returns a warning if a URI form encoded response has a schema that contains complex properties.
    why: Form encoding cannot faithfully round-trip nested objects.
x-evidence:
  fetched: '2026-08-06'
  probes:
    - url: https://learn.microsoft.com/en-us/openapi/kiota/using
      status: 200

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/kiota-validation-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.