Git Product home page Git Product logo

simple-api-client-generator's Introduction

simple-api-client-generator

Greenkeeper badge

NPM version Build Status Dependency Status DevDependency Status License

API Client Generator from JSON Hyper Schema.

API Client has generated with Flow types for Request, Response, and Resource. And request parameters is validated with tv4 and power-assert on development phase.

WIP

Installation

npm install --save @moqada/simple-api-client-generator

Usage

Usage: simple-api-client-generator [options] <JSON Schema>

Options:
  -n, --name    API Client class name  [string] [default: "APIClient"]
  -o, --output  output file path  [string]
  -a, --assert  assert library name  [string] [default: "power-assert"]
  -l, --lang    output language  [choices: "javascript", "typescript"] [default: "javascript"]
  --help        Show help  [boolean]
  --version     Show version number  [boolean]

Examples:
  simple-api-client-generator ./shema.json                      Output API Client.
  simple-api-client-generator -n AwesomeAPIClient ./shema.json  Output API Client given name

Output Example is here from Sample JSON Hyper Schema;

Restriction

Depenencies

Generated Client depends on following modules.

JSON Hyper Schema

JSON Hyper Schema must have unique rel value per resources.

simple-api-client-generator's People

Contributors

greenkeeper[bot] avatar greenkeeperio-bot avatar ideyuta avatar moqada avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

simple-api-client-generator's Issues

Assertion error on [email protected]

toString was added to the return value of validate from [email protected].

Ref: geraintluff/tv4@a00bee5

Problem

Current output code

const data = {};
assert.deepEqual(
   tv4.validateMultiple(
    data,
    { "properties": {}, "type": ["object"] }
  ),
  { errors: [], missing: [], valid: true }
);

[email protected]

no error

[email protected]

AssertionError: {
  toString: [Function: toString],
  errors: [],
  missing: [],
  valid: true
} deepEqual { errors: [], missing: [], valid: true }

Solution

  1. Fix tv4 version to 1.2.7 without modify this library.
  2. Modify this library to support tv4 version 1.3.0 or later.

What do you want ?

cc @moqada

An in-range update of npm-run-all is breaking the build 🚨

The devDependency npm-run-all was updated from 4.1.3 to 4.1.4.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

npm-run-all is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 3 commits.

  • a79fbac πŸ”– 4.1.4
  • d97929c remove test in version script temporary
  • 57d72eb πŸ”₯ remove ps-tree

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of chokidar-cli is breaking the build 🚨

Version 1.2.1 of chokidar-cli was just published.

Branch Build failing 🚨
Dependency chokidar-cli
Current Version 1.2.0
Type devDependency

This version is covered by your current version range and after updating it in your project the build failed.

chokidar-cli is a devDependency of this project. It might not break your production code or affect downstream projects, but probably breaks your build or test tools, which may prevent deploying or publishing.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Release Notes 1.2.1
  • Get rid of vulnerable dependencies (npm audit warnings to 0)
    • Remove all unused dependencies (anymatch & shell-quote - and all devDependencies except for mocha)
    • Update all dependencies to latest versions
    • npm audit fix chokidar's transitive dependenies
  • Use exact version numbers for dependencies from now on
  • Upgrade travis configuration to run newer node.js versions
Commits

The new version differs by 11 commits.

  • 7ca8e74 Bump version to 1.2.1
  • 534494e Changes to package-lock.json by npm audit fix
  • d763a42 Remove unused dependencies and update the rest
  • 4a66151 Upgrade node versions used in Travis CI build
  • 3322c9f Add package-lock.json
  • f7329b6 Add .nvmrc for node 8.11.4
  • de6f340 Merge pull request #32 from chyld/dev
  • a499c21 bump chokidar to 1.4.3
  • 89e1310 Merge pull request #22 from htanjo/correct-command
  • a934faf Correct example commands
  • 86935a8 Fix markdown formatting

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of json-schema-ref-parser is breaking the build 🚨

Version 5.1.3 of json-schema-ref-parser was just published.

Branch Build failing 🚨
Dependency json-schema-ref-parser
Current Version 5.1.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

json-schema-ref-parser is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

Commits

The new version differs by 5 commits.

  • 99ec071 release v5.1.3
  • 2096ff8 updated dependencies
  • 1f064c0 Fixed double-encoding of special characters in filesystem paths
  • edd696e Merge pull request #94 from intelliot/patch-1
  • 4198cdb Add missing return in resolvers docs

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of lodash.template is breaking the build 🚨

The dependency lodash.template was updated from 4.4.0 to 4.5.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

lodash.template is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build failed (Details).

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of update-notifier is breaking the build 🚨

The dependency update-notifier was updated from 2.5.0 to 2.6.0.

🚨 View failing branch.

This version is covered by your current version range and after updating it in your project the build failed.

update-notifier is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push: The Travis CI build could not complete due to an error (Details).

Commits

The new version differs by 10 commits.

  • 622ee5f 2.6.0
  • ad8ed1b Suggest yarn when installed with yarn (#132)
  • 5f06620 Exit the update check process if it does not respond after 30s (#156)
  • 79e89ad Fix failing test (#155)
  • c8faa84 Add distTag option (#151)
  • 14632e4 Add failing test for #153 (#154)
  • aafd8a0 Require Node.js 8
  • 0d49f51 Add Tidelift mention in the readme
  • 8df01b3 Fix docs position of shouldNotifyInNpmScript (#143)
  • d371834 Docs: isGlobal option does not default to true (#142)

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

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.