Created
April 3, 2018 17:20
-
-
Save dangoosby/46f543bd10e6f364beacadc1e6db2713 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "rules" : [ | |
| { | |
| "name": "parameter-description", | |
| "object": "parameter", | |
| "enabled": true, | |
| "description": "parameter objects should have a description", | |
| "truthy": "description" | |
| }, | |
| { | |
| "name": "parameter-name-regex", | |
| "object": "parameter", | |
| "enabled": false, | |
| "description": "parameter names should match RFC6570", | |
| "pattern": { "property": "name", "value": "" } | |
| }, | |
| { | |
| "name": "operation-operationId", | |
| "object": "operation", | |
| "enabled": true, | |
| "description": "operation should have an operationId", | |
| "truthy": "operationId" | |
| }, | |
| { | |
| "name": "operation-summary-or-description", | |
| "object": "operation", | |
| "enabled": true, | |
| "description": "operation should have summary or description", | |
| "or": ["summary", "description"] | |
| }, | |
| { | |
| "name": "operation-tags", | |
| "object": "operation", | |
| "enabled": true, | |
| "description": "operation should have non-empty tags array", | |
| "truthy": "tags", | |
| "skip": "isCallback" | |
| }, | |
| { | |
| "name": "path-keys-no-trailing-slash", | |
| "object": "pathInfo<--This doesnt exist so this whole rule is broke", | |
| "enabled": false, | |
| "description": "path item keys should not end with a slash", | |
| "notEndWith": { "property": "$key", "value": "/" } | |
| }, | |
| { | |
| "name":"server-trailing-slash", | |
| "object": "server", | |
| "enabled": true, | |
| "description": "server url should not have a trailing slash", | |
| "notEndWith": { "property": "url", "value": "/" } | |
| }, | |
| { | |
| "name": "openapi-tags", | |
| "object": "openapi", | |
| "enabled": true, | |
| "description": "openapi object should have non-empty tags array", | |
| "truthy": "tags" | |
| }, | |
| { | |
| "name": "openapi-tags-alphabetical", | |
| "object": "openapi", | |
| "enabled": true, | |
| "description": "openapi object should have alphabetical tags", | |
| "alphabetical": { | |
| "properties": "tags", | |
| "keyedBy": "name" | |
| } | |
| }, | |
| { | |
| "name": "reference-no-other-properties", | |
| "object": "reference", | |
| "enabled": true, | |
| "description": "reference objects should only have a $ref property", | |
| "truthy": "$ref", | |
| "properties": 1 | |
| }, | |
| { | |
| "name": "pathItem-summary-or-description", | |
| "object": "pathItem", | |
| "enabled": false, | |
| "description": "pathItem should have summary or description", | |
| "or": ["summary", "description"] | |
| }, | |
| { | |
| "name": "example-value-or-externalValue", | |
| "object": "example", | |
| "enabled": true, | |
| "description": "example should have either value or externalValue", | |
| "xor": ["value", "externalValue"] | |
| }, | |
| { | |
| "name": "reference-components-regex", | |
| "object": "reference", | |
| "enabled": true, | |
| "description": "reference components should all match spec. regex", | |
| "pattern": { "property": "$ref", "omit": "#", "split": "/", "value": "^[a-zA-Z0-9\\.\\-_]+$" } | |
| }, | |
| { | |
| "name":"no-script-tags-in-markdown", | |
| "object": "*", | |
| "enabled": true, | |
| "description": "markdown descriptions should not contain <script> tags", | |
| "notContain": { "properties": [ "description" ], "value": "<script" } | |
| }, | |
| { | |
| "name":"info-contact", | |
| "object": "info", | |
| "enabled": true, | |
| "description": "info object should contain contact object", | |
| "truthy": "contact" | |
| }, | |
| { | |
| "name":"license-apimatic-bug", | |
| "object": "license", | |
| "enabled": true, | |
| "description": "license url should not point at gruntjs", | |
| "notContain": { "properties": [ "url" ], "value": "gruntjs" } | |
| }, | |
| { | |
| "name":"no-eval-in-descriptions", | |
| "object": "*", | |
| "enabled": true, | |
| "description": "markdown descriptions should not contain 'eval('", | |
| "notContain": { "properties": [ "description","title" ], "value": "eval(" } | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment