@mojaloop/api-snippets
Mojaloop API specification reusable snippets
Last updated 2 days ago by l1pcircleci .
Apache-2.0 · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @mojaloop/api-snippets 
SYNC missed versions from official npm registry.

api-snippets

Swagger UI Api Preview

https://docs.mojaloop.io/api-snippets/

Usage

Install the snippet library

  npm install @mojaloop/api-snippets --save-dev

Install the reference resolving library

  npm install swagger-cli --save-dev

Modify swagger file to reference api-snippets.

ex.

Money:
  $ref: /path/to/node_modules/@mojaloop/api-snippets/v1.0/openapi3/schemas/Money.yaml

Render and resolve the references.

  swagger-cli bundle -t yaml -o api_render.yaml api.yaml

Validate the result file.

  swagger-cli validate api_render.yaml

Quick Demonstration

demonstration

Swagger-UI

The snippets specification is previewable using swagger-ui. Swagger-UI files are found in docs/dist/. Github pages uses the master branch docs/ folder to build the page found at https://docs.mojaloop.io/api-snippets/

Dev Tools

To create snippets the tool found at https://www.npmjs.com/package/evrythng-openapi-tools was used to break up large specification files. Some manual edits to the paths are needed to format the files.

TODO: Add more detailed instructions for this workflow.

  • npm i -g evrythng-openapi-tools
  • evrythng-openapi-tools split /path/to/my-large-specifcation-file.yaml /path/to/output-directory/

Questions

  1. Are paths in the Mojaloop Specification considered "snippets"? Are they re-used widely across services?
  2. Do we need to support both Swagger 2.0 and Open Api 3?
  3. Does it make sense to have a common folder between versions for specification snippets that never change to cut down on files?

Current Tags

  • 11.0.19                                ...           latest (2 days ago)

22 Versions

  • 11.0.19                                ...           2 days ago
  • 11.0.18                                ...           13 days ago
  • 11.0.17                                ...           14 days ago
  • 11.0.16                                ...           22 days ago
  • 11.0.15                                ...           a month ago
  • 11.0.14                                ...           a month ago
  • 11.0.13                                ...           a month ago
  • 11.0.12                                ...           a month ago
  • 11.0.11                                ...           a month ago
  • 11.0.10                                ...           a month ago
  • 11.0.9                                ...           a month ago
  • 11.0.8                                ...           a month ago
  • 11.0.7                                ...           a month ago
  • 11.0.6                                ...           a month ago
  • 11.0.5                                ...           a month ago
  • 11.0.4                                ...           a month ago
  • 11.0.3                                ...           a month ago
  • 11.0.2                                ...           2 months ago
  • 11.0.1                                ...           2 months ago
  • 11.0.0                                ...           2 months ago
  • 2.0.0                                ...           3 months ago
  • 1.0.0                                ...           4 months ago
Downloads
Today 0
This Week 10
This Month 34
Last Day 1
Last Week 0
Last Month 151
Dependencies (3)
Dev Dependencies (7)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |