DarkaOnLine / L5-Swagger

OpenApi or Swagger integration to Laravel
https://github.com/DarkaOnLine/L5-Swagger
MIT License
2.64k stars 394 forks source link

[Feature Request] Support for OpenAPI 3.1 #488

Closed ThaDaVos closed 2 years ago

ThaDaVos commented 2 years ago

Description:

According to this page, the latest spec supported seems to be OpenAPI 3.0: https://github.com/DarkaOnLine/L5-Swagger/wiki/Installation-&-Configuration Will there also be support for OpenAPI 3.1? It allows for some usefull extra features regarding $refs and other things

Steps To Reproduce:

No steps as it's a feature request

ThaDaVos commented 2 years ago

See: https://www.openapis.org/blog/2021/02/16/migrating-from-openapi-3-0-to-3-1-0

DarkaOnLine commented 2 years ago

We use https://github.com/zircote/swagger-php under the hood to parse annotations to OpenApi. So this question/suggestion should got to SwaggerPHP.

ThaDaVos commented 2 years ago

I saw that https://github.com/zircote/swagger-php already supports 3.1, but i don't see any way to pass the version to the generator of swagger-php

DarkaOnLine commented 2 years ago

Oh I missed this. Hmm but they only allow to use this with the --version or Generator::setVersion() So we could have new config key and set version here: https://github.com/DarkaOnLine/L5-Swagger/blob/master/src/Generator.php#L207 - this should do the trick.

Would you be wiling to contribute and submit PR for this?

ThaDaVos commented 2 years ago

Yeah something like that would fix it, i know it works as I extended and overrided somethings to test it and it's doable to pass it through

DarkaOnLine commented 2 years ago

Would you be wiling to contribute and submit PR for this? Or should I add this to my todo list :)

dietergeerts commented 1 year ago

Sadly using 3.1 isn't an option as the used swagger-ui doesn't support it yet. Is there a way to use something else than swagger-ui? I know there are others out there that already support 3.1. That said, it does seem that swagger-ui is actively working on 3.1 support. So maybe I should wait a little longer.