krakenjs/hapi-openapi

OpenAPI v3?

mhamann opened this issue · 13 comments

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

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 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.

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

@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 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

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 ;-)

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

@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!

K3UL commented

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 ?

@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.

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.

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.

this issue can be closed