info-description
Info "description" must be present and non-empty string.
- Applies to
description- Selects
$- Function
truthy- Specs
- OpenAPI 2.0OpenAPI 3.0OpenAPI 3.1OpenAPI 3.2
Use it
This rule ships with OpenLint in spectral:oas. Extending the ruleset turns it on:
extends: spectral:oas
rules:
info-description: warn # or off, or another severity
Definition
As defined in @openlint/openlint-rulesets. Functions show by name.
info-description:
description: Info "description" must be present and non-empty string.
recommended: true
given: $
then:
field: info.description
function: truthy
About this rule
OpenAPI object info description must be present and non-empty string.
Examples can contain Markdown so you can really go to town with them, implementing getting started information like where to find authentication keys, and how to use them.
Good Example
openapi: 3.0.0
info:
version: "1.0.0"
title: Descriptive API
description: >+
Some description about the general point of this API, and why it exists when another similar but different API also exists.## AuthenticationThis API uses OAuth2 and tokens can be requested from [Dev Portal: Tokens](https://example.org/developers/tokens).