info-defined
Since 0.0.1 · In the rulesets: Recommended at error, Strict at error, All at error
This rule checks that info has a non-empty summary, description and version.
Rule details
The info object is the first thing a reader of the document or of the generated documentation
sees: the summary says what the API is in a line, the description says what it does and for whom,
and the version says which contract the reader holds. The OpenAPI specification requires only
title and version.
The rule reports Info summary is missing or empty, Info description is missing or empty and
Info version is empty.
Examples
Good. All three fields are present and say something.
openapi: 3.1.0
info:
title: Orders
summary: Orders of the web shop
description: Creates, lists and cancels the orders placed in the web shop.
version: 2.1.0
paths: {}
Bad. Only what the specification requires.
openapi: 3.1.0
info:
title: Orders
version: 2.1.0
paths: {}
Turn it off or change its severity
In apigenie.yaml, off turns the rule off and warning or error sets its severity; a rule with options takes the severity and the options as a pair, [warning, options]. lint.rules has the details.
commands:
lint:
rules:
info-defined: off