UNPKG

@stoplight/spectral-documentation

Version:

Your documentation is only as useful as the quality of the information you've provided, so make sure you're taking full advantage of the features OpenAPI has to offer.

36 lines (32 loc) 538 B
import { DiagnosticSeverity } from "@stoplight/types"; import testRule from "./__helpers__/helper"; testRule("docs-info-contact", [ { name: "valid case", document: { openapi: "3.1.0", info: { contact: { } }, paths: {}, }, errors: [], }, { name: "invalid case", document: { openapi: "3.1.0", info: { }, paths: {}, }, errors: [ { message: '"info.contact" property must be truthy.', path: ["info"], severity: DiagnosticSeverity.Warning, }, ], }, ]);