File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @redocly/openapi-core " : patch
3+ ---
4+
5+ Resolved an issue where overrides for the severity of configurable rules raised warnings when validating the config.
Original file line number Diff line number Diff line change @@ -392,10 +392,18 @@ const Rules: NodeType = {
392392 properties : { } ,
393393 additionalProperties : ( value : unknown , key : string ) => {
394394 if ( key . startsWith ( 'rule/' ) ) {
395- return 'Assert' ;
395+ if ( typeof value === 'string' ) {
396+ return { enum : [ 'error' , 'warn' , 'off' ] } ;
397+ } else {
398+ return 'Assert' ;
399+ }
396400 } else if ( key . startsWith ( 'assert/' ) ) {
397401 // keep the old assert/ prefix as an alias
398- return 'Assert' ;
402+ if ( typeof value === 'string' ) {
403+ return { enum : [ 'error' , 'warn' , 'off' ] } ;
404+ } else {
405+ return 'Assert' ;
406+ }
399407 } else if ( builtInRules . includes ( key as BuiltInRuleId ) || isCustomRuleId ( key ) ) {
400408 if ( typeof value === 'string' ) {
401409 return { enum : [ 'error' , 'warn' , 'off' ] } ;
You can’t perform that action at this time.
0 commit comments