Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
draig-oag
Advanced tools
Readme
DRAIG is a JS (NodeJS, ExpressJS, KnexJS, Objection.js) DB-backed microservice code generator derived from the excellent openapi-generator for DbC (Design by Contract or Contract Based Development). You provide or design a contract (API definition in YAML) and the generator generates, for you, the DB tables, a fake (seed) initial database and the glue code (side effects) for CRUD operations.
With some more work (i.e. if you provide KnexJS or Objection queries) you can have complex DB interactions exposed as microservices in minutes.
DRAIG works seamlessly with draig-car, a CLI and REPL tool to design the contract and the queries, generate the code test the API and much more without leaving the REPL or using a simple and readline-powered CLI.
Under the hood, draig-car
uses docker
(only in available in some target platforms) to pull, create and manage the database instances required to deploy the API in MySQL (MariaDB), PostgreSQL or Oracle in a transparent fashion. The queries and DB operations are DB independent, so you don't have to worry (although you want it to) about hosts, ports, admin users, etc. You can, however, use SQLite
as the DB provider for testing or production use (if you dare) without the need for a docker
container.
Run
> npm -g install draig-oag`
For development work on draig
itself, clone this repo, cd to draig dir and then run:
> npm -g install
The local working copy of the repository will be then linked with your installation. Use it alone or with draig-car
.
This is a new modified distribution of openapi-generator
. So, once installed, you only have to use it like this:
> openapi-generator generate -g draig <rest of params>
The goal of OpenAPI is to define a standard, language-agnostic interface to REST APIs which allows both humans and computers to discover and understand the capabilities of the service without access to source code, documentation, or through network traffic inspection.
When properly described with OpenAPI, a consumer can understand and interact with the remote service with a minimal amount of implementation logic. Similar to what interfaces have done for lower-level programming, OpenAPI removes the guesswork in calling the service.
Check out OpenAPI-Spec for additional information about the OpenAPI project, including additional libraries with support for other languages and more.
The following additional debug options are available for all codegen targets:
# -DdebugOpenAPI prints the OpenAPI Specification as interpreted by the codegen
# -DdebugModels prints models passed to the template engine
# -DdebugOperations prints operations passed to the template engine
# -DdebugSupportingFiles prints additional data passed to the template engine
FAQs
Distribution of the openapitools openapi-generator with modified cli
The npm package draig-oag receives a total of 1 weekly downloads. As such, draig-oag popularity was classified as not popular.
We found that draig-oag demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.