liveBook · Manning

Severity

As explained in The Design of Web APIs, Second Edition

Severity is a classification indicating the seriousness or urgency of a rule violation or diagnostic finding.

Severity classifies how important a linting problem is or what kind of attention it needs. A useful diagnostic pairs severity with a meaningful message, location, and suggested solution. section 18.7

Use severity to distinguish the practical response:

  • Mark an actual error with error severity; use warn, info, or hint for less urgent findings, improvements, or matters needing investigation. section 18.7.3 section 18.10
  • Split rules when one check would mix severities or produce an unclear message. section 18.7.3
  • Override imported rule severity when an API’s context requires a different priority. section 18.8 section 18.9.1

Search parameter validation

Create search-q-defined with info severity to report a missing q parameter, then search-q-valid with error severity to reject an incorrectly defined schema. This separates presence from correctness and keeps feedback precise. section 18.7.3

Figure 18.19 A helpful API linter lists meaningful problems, their location, their importance or nature, and how to solve them.
figure

Use the diagnostic layout as a checklist: show the problem, its location, its importance or nature, and how to solve it. section 18.7

How The Design of Web APIs, Second Edition covers it

How deep it goes
Explains severity choices, rule splitting, and overrides, but stops short of defining a universal priority policy.
Examples
Uses a camel-case query parameter warning, separated search-parameter rules, and imported rules whose severity is overridden.
What it assumes
Assumes familiarity with OpenAPI documents, linting rules, and basic Spectral ruleset configuration.
What you can do after
Configure Spectral rules with meaningful priorities, precise messages, and context-sensitive overrides.
How it connects
Connects API linting with OpenAPI documents, Spectral rules, rulesets, and diagnostic messages.

Also explained in

Compare how 7 books explain severity →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of The Design of Web APIs, Second Edition. The section links point to the parts of the book it draws on.