oas-tools / oas-tools

NodeJS module to manage RESTful APIs defined with OpenAPI 3.0 Specs over express servers.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Multiple APIs per Node.js process not possible

robaca opened this issue · comments

We just try to migrate from swagger-tools to oas-tools and encounter one show-stopper limitation.
Our services expose multiple APIs which are all documented separately via different openapi specs (rest / ui / admin). With swagger-tools it was possible to have all these APIs registered against the same Node.js instance.

With oas-tools, only the last registered middleware is working, as the pathsDict which stores mappings between express route and api paths is reset each time.

Please allow multiple specs per server again.

Seems that for this the whole configuration needs to become spec based, for example mapped by spec reference. For backwards compatibility, the default config could just be used as template.