0.0.13 • Published 10 years ago

eat-simple-schema v0.0.13

Weekly downloads
-
License
ISC
Repository
-
Last release
10 years ago

eat-simple-schema

Description

To the extent possible, generate Swagger API schema from Meteor simple schema automatically.

Installation

npm install --save eat-simple-schema

Usage

  • Find the schema file you want to document
  • replace aldeed:meteor/simpleschema with eat-simple-schema
  • create a script that will load your modified SimpleSchema and log the YAML. For example:
import * as OL from 'api/OrderLines/schema';

//Give each schema a 'swag_name' prop that holds the identifier
Object.keys(OL).forEach((key) => {
  OL.swag_name = key;
});

//log the YAML to the console
Object.values(OL).forEach((val) => {
  console.log(val.swag_name)
  console.log(val.toYaml(2));
});
0.0.13

10 years ago

0.0.12

10 years ago

0.0.11

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago