diff --git a/tools/spectral/ipa/rulesets/IPA-125.yaml b/tools/spectral/ipa/rulesets/IPA-125.yaml index e48c385311..6c87d7fecf 100644 --- a/tools/spectral/ipa/rulesets/IPA-125.yaml +++ b/tools/spectral/ipa/rulesets/IPA-125.yaml @@ -36,7 +36,7 @@ rules: This is valid because there are exactly 2 mappings for 2 oneOf references, and all values match. message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-125-oneOf-must-have-discriminator' - severity: error + severity: warn given: '$.components.schemas[*]' then: function: 'IPA125OneOfMustHaveDiscriminator' @@ -84,7 +84,7 @@ rules: ``` message: '{{error}} https://mdb.link/mongodb-atlas-openapi-validation#xgen-IPA-125-oneOf-no-base-types' - severity: error + severity: warn given: '$.components.schemas[*]' then: function: 'IPA125OneOfNoBaseTypes' diff --git a/tools/spectral/ipa/rulesets/README.md b/tools/spectral/ipa/rulesets/README.md index 11cfca9038..aa711c6dc5 100644 --- a/tools/spectral/ipa/rulesets/README.md +++ b/tools/spectral/ipa/rulesets/README.md @@ -508,7 +508,7 @@ Rules are based on [http://go/ipa/IPA-125](http://go/ipa/IPA-125). #### xgen-IPA-125-oneOf-must-have-discriminator - ![error](https://img.shields.io/badge/error-red) + ![warn](https://img.shields.io/badge/warning-yellow) Each oneOf property must include a discriminator property to define the exact type. ##### Implementation details @@ -538,7 +538,7 @@ Rule checks for the following conditions: #### xgen-IPA-125-oneOf-no-base-types - ![error](https://img.shields.io/badge/error-red) + ![warn](https://img.shields.io/badge/warning-yellow) API producers should not use oneOf with base types like integer, string, boolean, or number. ##### Implementation details