{ "rules": { "info-title": { "description": "The API must have a title.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"title","function":"truthy"} } , "info-title-max-length": { "description": "The title of the API must not be more than 50 characters.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"title","function":"length","functionOptions":{"max":50}} } , "info-title-word-check": { "description": "The title of the API must not contain specific words, including REST, Public, and Developer.", "given": "$.info.title", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"function":"pattern","functionOptions":{"notMatch":"\\b(REST|Public|Developer)\\b"}} } , "info-title-in-kebab-case": { "given": "$.info.title", "then": {"function":"pattern","functionOptions":{"match":"^[a-z][a-z0-9\\-]*$"}}, "type": "style", "recommended": true, "formats": ["oas2","oas3"], "message": "Error in the format of the api title", "description": "The title of the API must be in kebab case.", "severity": "error" } , "info-summary": { "description": "The API must have a summary applied.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"summary","function":"truthy"} } , "info-summary-max-length": { "description": "The summary for the API should not be more than 50 characters in length.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"summary","function":"length","functionOptions":{"max":50}} } , "info-summary-word-check": { "description": "The API summary not contain specific words, including REST, Public, and Developer.", "given": "$.info.summary", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"function":"pattern","functionOptions":{"notMatch":"\\b(REST|Public|Developer)\\b"}} } , "info-description": { "description": "API must have a description available.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"description","function":"truthy"} } , "info-description-max-length": { "description": "The description of the API must not be greater than 250 characters.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"description","function":"length","functionOptions":{"max":250}} } , "info-description-word-check": { "description": "The API description must not contain specific words, including REST, Public, and Developer.", "given": "$.info.description", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"function":"pattern","functionOptions":{"notMatch":"\\b(REST|Public|Developer)\\b"}} } , "info-contact": { "description": "API must have a contact information available.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"contact","function":"truthy"} } , "info-contact-name": { "description": "API must have a contact name available.", "given": "$.info.contact", "severity": "error", "then": {"field":"name","function":"truthy"} } , "info-contact-email": { "description": "API must have a contact email available.", "given": "$.info.contact", "severity": "error", "then": {"field":"email","function":"truthy"} } , "info-contact-url": { "description": "API must have a contact url available.", "given": "$.info.contact", "severity": "error", "then": {"field":"url","function":"truthy"} } , "info-license": { "description": "API must have a license applied.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"license","function":"truthy"} } , "info-license-name": { "description": "API must have a license name applied.", "given": "$.info.license", "severity": "error", "then": {"field":"name","function":"truthy"} } , "info-license-url": { "description": "API must have a license url applied.", "given": "$.info.license", "severity": "error", "then": {"field":"url","function":"truthy"} } , "info-license-url-apache": { "description": "API must have an Apache license applied.", "given": "$.info.license.url", "severity": "error", "then": {"function":"pattern","functionOptions":{"match":"apache.org"}} } , "info-license-url-mit": { "description": "API must have a MIT license applied.", "given": "$.info.license.url", "severity": "error", "then": {"function":"pattern","functionOptions":{"match":"mit.edu"}} } , "info-terms-of-service": { "description": "The API must have a terms of service applied.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"termsOfService","function":"truthy"} } , "info-version": { "description": "The API must have version information applied.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"version","function":"truthy"} } , "info-x-api-id": { "message": "API must have an unique identifier in x-api-id in #/info/x-api-id.", "description": "The `#/info/x-api-id` field can be used to associate an identifier to an API. This is useful to track an API even when its `#/info/title` changes.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "then": {"field":"x-api-id","function":"truthy"} } , "info-x-audience": { "message": "Missing info.x-audience.", "description": "MUST contain API meta information [218]", "documentationUrl": "https://opensource.zalando.com/restful-api-guidelines/#218", "severity": "error", "given": "$.info", "then": {"field":"x-audience","function":"truthy"} } , "info-x-summary": { "message": "API MUST have an one-liner #/info/x-summary field containing a brief description.", "description": "The `#/info/x-summary` can be used to specify a brief, one-liner description of your API: this is very useful for catalog purposes (eg. this can be shown as your API subtitle in catalogs and developer portals). In OAS3.1 you can use the standard `#/info/summary` field.", "given": "$.info", "severity": "error", "recommended": true, "type": "style", "formats": ["oas3"], "then": {"field":"x-summary","function":"truthy"} } }}