Nonflavored Prescription Medicine

    This package has been deprecated

    Author message:

    Please, use openapi-preset-effector. Now it is named semantically correct

    effector-openapi-preset

    0.3.3 • Public • Published

    effector-openapi-preset

    Usage

    Install openapi and preset

    yarn add -D openapi@^1.0.0 effector-openapi-preset

    Create config

    // openapi.config.js
    module.exports = {
      file: 'path to local or remote swagger v2 or v3 spec',
      outputDir: 'relative path to generated api directory',
      presets: ['effector-openapi-preset'],
    };

    Options

    // openapi.config.js
    module.exports = {
      file: 'path to local or remote swagger v2 or v3 spec',
      outputDir: 'relative path to generated api directory',
      presets: [
        [
          'effector-openapi-preset',
          {
            effectorImport: 'effector-root',
            requestName: 'fetchFx',
            requestPath: '../lib/fetch',
          },
        ],
      ],
    };
    • effectorImport (default "effector") — what instance of the effector should be used
    • requestName (default "requestFx") — change base effect for the each request
    • requestPath (default "./request") — whether to import base request from

    Run generation

    yarn openapi
    # or
    npx openapi

    Review generated files

    ls -la ./path-to-generated-api

    Install

    npm i effector-openapi-preset

    DownloadsWeekly Downloads

    7

    Version

    0.3.3

    License

    MIT

    Unpacked Size

    34.6 kB

    Total Files

    11

    Last publish

    Collaborators

    • sergeysova