Coder Social home page Coder Social logo

koa-oas-router's People

Contributors

dependabot[bot] avatar matzehecht avatar semantic-release-bot avatar

Stargazers

 avatar  avatar

koa-oas-router's Issues

Issue with logger under NodeJS version 12

We get the following issue:

node -v
v12.20.0

yarn start:dev
...
C:\Development\***\node_modules\logger\logger.js:98
    this.write(message + "\n");
         ^
TypeError: this.write is not a function
    at Logger.log (C:\Development\***\node_modules\logger\logger.js:98:10)
    at Logger.<computed> [as info] (C:\Development\***\node_modules\logger\
logger.js:108:21)
    at KoaOasRouter.addRoutesFromSpecification (C:\Development\***\node_mod
ules\koa-oas-router\src\index.ts:58:21)
    at Object.makeApp (C:\Development\***\index.ts:54:12)
    at Object.makeMatthiasAPI (C:\Development\***\index.ts:22:
12)
    at Object.<anonymous> (C:\Development\***\index.ts:16:40)
    at Module._compile (internal/modules/cjs/loader.js:936:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:947:10)
    at Module.load (internal/modules/cjs/loader.js:790:32)
    at Function.Module._load (internal/modules/cjs/loader.js:703:12)
    at Function.Module.runMain (internal/modules/cjs/loader.js:999:10)
    at internal/main/run_main_module.js:17:11
[nodemon] app crashed - waiting for file changes before starting... 

Looks like that logger is no more compatible with NodeJS v12, see: quirkey/node-logger#12

Add ci

There should be at least two pipelines:

  • On new release the ci should push a release to npm
    The documentation should be updated after release
  • On each PR tests should be executed

Problems with koa-router methods

The module should have the @types/koa-router as dependency instead of devDependency

Workaround: If you want to use the koa-router methods while using TypeScript please install @types/koa-router in your project.

Feature: Fallback controller function

Fallback: for naming of the controller function if operationId is not specified:

  • Basic functionality
  • Make this opt-out

As fallback a modified path with the method as prefix can be used.

Feature: Fallback routing

Fallback routing to index.ts as controller if no tag is specified:
ToDo:

  • basic functionality
  • Make this opt-out

Feature: Path-controller

Ability to specify controller by the request path instead of the request tag.
Should be only an option with default on the tag controllers.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.