Azure / azure-api-style-guide

Spectral rules to check conformance to Azure API Guidelines
MIT License
45 stars 21 forks source link

Rules az-property-type is outdated #127

Closed LasneF closed 1 year ago

LasneF commented 1 year ago

the rules az-property-type looks has been defined for OAS2

the condition below is now outdated given: $..properties[?(@object() && @.$ref == undefined && @.allOf == undefined)]

since OAS 3 new keywords has been introduced like oneOf and anyOf so the rules need to be amended to

 given: $..properties[?(@object() && @.$ref == undefined && ( @.allOf == undefined  && @.oneOf == undefined && @.anyOf == undefined ))]

thanks for your job @markweitzel

mikekistler commented 1 year ago

Thanks @LasneF for your bug report and suggested fix. I've opened a PR with the fix and also merged this into the "dogfood" branch. Please give it a try and let me know if it works for you.