Socket
Socket
Sign inDemoInstall

mesh-model-generator

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mesh-model-generator

Generate model interfaces from Gentics Mesh RAML declarations


Version published
Weekly downloads
3
decreased by-78.57%
Maintainers
1
Weekly downloads
 
Created
Source

Generator to render model interfaces from Gentics Mesh RAML

npm version

NOTE

This package is work in progress and not ready for production use. It requires Gentics Mesh 0.8.x+

Render the server interfaces returned by Mesh as type definitions which can be used in TypeScript. Designed for use with TypeScript, but can be extended for other languages.

Usage as a module

npm install mesh-model-generator
import { readFileSync, writeFileSync } from 'fs';
import { parseAndGenerate } from 'mesh-model-generator';

const inputFile = readFileSync('./my-api.raml', 'utf-8');
parseAndGenerate(inputFile)
    .then(generatedModels => {
        writeFileSync('./my-models.ts', generatedModels, 'utf-8');
    })
    .catch(err => console.error(err));

Generating from the CLI

npm install -g mesh-model-generator
mesh-model-generator my-api.raml > model-declarations.ts

License

MIT

Keywords

FAQs

Package last updated on 03 May 2017

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc