mswjs / http-middleware

Spawn an HTTP server from your request handlers or apply them to an existing server using a middleware.
https://npm.im/@mswjs/http-middleware
107 stars 13 forks source link

Q. Is there any roadmap for OpenAPI3 documentation? #30

Closed SPONGE-JL closed 10 months ago

SPONGE-JL commented 1 year ago

Thanks for mswjs team and stand-alone service on this http-middleware application. It's amazing and easy usage to make stub application.

On the other hand, if the mocked API has been build up with implementation about real app, there would be needed to documation like OAS3. This has been spawn stand alone express in this module, so like swagger-ui-express and swagger-jsdoc would be used on diffent way maybe.

So is there any roadmap for OAS3?

Thanks for sharing your opinion. Hope you well.

kettanaito commented 1 year ago

Hi! Thanks for your kind words.

To clarify: do you suggest OA3 -> mock handlers or mock handlers -> OA3?

kettanaito commented 10 months ago

Okay, circling back to this with my best understanding of the question.

When will this package support OA3?

It won't. The purpose of this package is to translate MSW request handlers to Express handlers. Nothing else.

How do I add OAS to the mix then?

There is a library in the works that will do the "OAS -> request handlers" generation. It's mostly finished. I hope I will announce more news about it next year.