diff --git a/.spectral.yml b/.spectral.yml index ab7bbd3..5faaf57 100644 --- a/.spectral.yml +++ b/.spectral.yml @@ -98,16 +98,16 @@ rules: type: string enum: - application/json - # example-exists-in-parameters: - # description: All models MUST have a valid example. - # severity: error - # recommended: true - # formats: - # - oas2 - # message: "{{ property }} MUST have a valid example." - # given: "$..parameters..[?(@.in == 'body')]..[?( !@.example || !@.schema.$ref)]" - # then: - # function: falsy + example-exists-in-parameters: + description: All models MUST have a valid example. + severity: error + recommended: true + formats: + - oas2 + message: "{{ property }} MUST have a valid example." + given: "$..parameters..[?(@.in == 'body' && (@.example || @.schema.$ref))]" + then: + function: truthy # example-exists-in-definitions: # description: All models MUST have a valid example. # severity: error