zally icon indicating copy to clipboard operation
zally copied to clipboard

Zally not validating APIs for Open API 3.1.0.

Open tkrop opened this issue 4 years ago • 8 comments

It seems as if there is a switch preventing the rules to get into action on Open API version 3.1.0, that has been released on Feb 15th, 2021. Checking APIs with openapi: 3.0.3 that show violations show now violations after updating to openapi: 3.1.0 without other changes.

tkrop avatar May 05 '21 07:05 tkrop

@tkrop do you have API example?

vadeg avatar May 29 '21 07:05 vadeg

@vadeg you can take any 3.0.x API you know off and mark it as 3.1.0.

tkrop avatar Jun 08 '21 16:06 tkrop

Swagger parser doesn't support 3.1.0 yet. See swagger-api/swagger-parser#1535.

Basically, the parser ignores any schemas which do not start from 3.0. See this line:

if (value == null || !value.startsWith("3.0")) {			
    return null;			
}

vadeg avatar Jun 09 '21 05:06 vadeg

Updating swagger parser to latest version is also not simple. The maximum we can currently achieve without fixing logic is 2.0.18 as I have tested out. Beyond this version we are stumbling about behavioral changes in of the parser that break rules. I have not verified the logic so far, but I expect that we also may need to updated the swagger/openapi3-schema.json files and add the file for the 3.1 schema.

Remark: Updating the swagger model to the latest version seems to be no problem.

tkrop avatar Jun 09 '21 16:06 tkrop

I have checked the latest swagger parser version. It has the same problem. Swagger parser will be updated together with kotlin and Java in #1254

vadeg avatar Jun 09 '21 17:06 vadeg

Blocked by #1255 and swagger-api/swagger-parser#1535.

vadeg avatar Jun 09 '21 21:06 vadeg

any news there ? @vadeg , @tkrop the issue you mentionned https://github.com/swagger-api/swagger-parser/issues/1535
looks fixed as statement below also here https://github.com/swagger-api/swagger-core/wiki/Swagger-2.X---OpenAPI-3.1

so we should be good here isn't it ?

LasneF avatar Dec 13 '23 09:12 LasneF

@LasneF thank you for the update. I will have a look.

vadeg avatar Jan 14 '24 11:01 vadeg