hapi-openapi icon indicating copy to clipboard operation
hapi-openapi copied to clipboard

OpenAPI v3?

Open mhamann opened this issue 6 years ago • 13 comments

The readme indicates that OpenAPI v3 support is coming soon. Is that getting close? Or is it still a ways out?

mhamann avatar Nov 05 '18 19:11 mhamann

I was waiting on @jamesmessinger to update https://github.com/APIDevTools/swagger-parser which he did!

I'll be revisiting this soon. Would also love help!

tlivings avatar Nov 11 '18 14:11 tlivings

@tlivings do you have tasks broken out at all? I may be able to find some some time to contribute if given a little bit of direction.

JVanAartsen avatar Nov 28 '18 20:11 JVanAartsen

@tlivings Hi, I can also manage to find some time to contribute. OpenAPI V3 support is a must have for several of my projects.

gdelpu avatar Jan 15 '19 11:01 gdelpu

@JVanAartsen , @gdelpu thanks for your offers.

I haven't created a task list but I imagine first up is just going to be figuring out what the breaking changes between 2 and 3 (https://swagger.io/blog/news/whats-new-in-openapi-3-0/), upgrading to the latest swagger-parser, and getting any issues in parameter validation sorted.

As far as I can tell from glancing at it is it is going to be practically a rewrite of how this module currently crawls the schema.

tlivings avatar Jan 21 '19 03:01 tlivings

@tlivings Hi Trevor, I started digging into the code and the parser does not look like the major issue. Adapting the validator package could be the most time-consuming task, mainly if we want to keep backward compatibility with Swagger 2.0. I'll spend a couple hours on the topic within the week and update you

gdelpu avatar Jan 21 '19 15:01 gdelpu

I would think that the current validator logic could remain mostly the same and just rewrite / port it to a new implementation for OAI 3.0. Since the OAI doc should specify the version, it should be fairly straightforward to pick the right one.

Actually writing the validator would be the hard part, of course ;-)

mhamann avatar Jan 21 '19 18:01 mhamann

@tlivings Hi guys, hope everyone is well. I would like to know if there has been any progress on the OpenAPI v3 issue?

rmothilal avatar Mar 06 '19 09:03 rmothilal

@tlivings Hi everyone! I just wanted to ask if there is any progress on the support for OpenApi v3? That would be awesome! Thanks a lot guys!

hollain avatar Aug 01 '19 19:08 hollain

Hi,

As many I would love to see OpenAPI v3 supported ; for now I am stuck with Express since v3 is a requirement of mine.

Is there any work being done on this at the moment ? Or is it just too big of a task for now ?

K3UL avatar Dec 31 '19 19:12 K3UL

@tlivings I am planning to work on this, as I'd really like to utilize it. Do you have particular direction you would like to see this go?

If not, I have an idea how I would like to do this. It will be a fairly intrusive change, although I doubt that can be avoided regardless of approach.

tpburch avatar Apr 03 '20 20:04 tpburch

FYI, fastify has this (or relatively similar) in the form of fastify-openapi-glue. It may be helpful for the work that needs to be done here.

mhamann avatar Apr 05 '20 05:04 mhamann

I haven’t broken down the work required but newer versions of swagger-parser already support 3.0.

However, there are schema breaking changes they will need to be sorted out and most of these are in the change log for open api 3.0.

It’s been difficult to find the time to work on this in my current job because we do not use 3.0 and it’s not been a big priority as a result.

I will review any PR to address this support, with much appreciation.

tlivings avatar Apr 05 '20 15:04 tlivings

this issue can be closed

dcharbonnier avatar May 27 '21 08:05 dcharbonnier