asyncapi-info-contact
Info object must have "contact" object.
- Applies to
contact- Selects
$- Function
truthy- Specs
- AsyncAPI 2.xAsyncAPI 3.x
Use it
This rule ships with OpenLint in spectral:asyncapi. Extending the ruleset turns it on:
extends: spectral:asyncapi
rules:
asyncapi-info-contact: warn # or off, or another severity
Definition
As defined in @openlint/openlint-rulesets. Functions show by name.
asyncapi-info-contact:
description: Info object must have "contact" object.
recommended: true
formats:
- AsyncAPI 2.x
- AsyncAPI 3.x
given: $
then:
field: info.contact
function: truthy
About this rule
Info object should contain contact object.
Hopefully, your API description document is so good that nobody ever needs to contact you with questions, but that is rarely the case. The contact object has a few different options for contact details.
Good Example
asyncapi: "2.0.0"
info:
title: Awesome API
version: "1.0"
contact:
name: A-Team
email: a-team@goarmy.com