You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
User story.
As a user of Spectral it would be much flexible for me to have an opportunity to exclude certain paths from the given paths without overcomplicating JSONPaths or without defining a custom function for this purpose.
Describe the solution you'd like
In the following example the rule checks all description or title properties, but excluding examples objects because same-called properties are not part of the OpenAPI documents definition itself, but rather the example of the actual content payload which have their own constrains and requirements/guidelines:
'no-script-tags-in-markdown': {description: 'Markdown descriptions must not have "<script>" tags.',recommended: true,given: '$..[description,title]',exclude: '$..examples',// <--- easy way to exclude `title` and `description` inside these objectsthen: {function: pattern,functionOptions: {notMatch: '<script',},},},
The text was updated successfully, but these errors were encountered:
pavelkornev
changed the title
Proposal: Exclude JSONPath option for the rules
Proposal: Option to exclude JSONPaths for the rules definitions
Feb 28, 2023
pavelkornev
changed the title
Proposal: Option to exclude JSONPaths for the rules definitions
Proposal: Option to exclude JSONPaths for the rules definition
Feb 28, 2023
User story.
As a user of Spectral it would be much flexible for me to have an opportunity to exclude certain paths from the
given
paths without overcomplicating JSONPaths or without defining a custom function for this purpose.Describe the solution you'd like
In the following example the rule checks all
description
ortitle
properties, but excludingexamples
objects because same-called properties are not part of the OpenAPI documents definition itself, but rather the example of the actual content payload which have their own constrains and requirements/guidelines:The text was updated successfully, but these errors were encountered: