GithubHelp home page GithubHelp logo

djcard / cbletterdrop Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14 KB

A tool to create a postman collection from a Coldbox Router and and combine it with existing examples and tests already in a postman collection.

ColdFusion 100.00%

cbletterdrop's Introduction

cbLetterDrop

CBLetterdrop is a CommandBox module which is designed to read a Coldbox router and export the routes to use in a Postman Collection. It can also read an existing Postman export to preserve example data, scripts and other settings which are already existing in the collection. It defaults to, but does not require, using /resources/postman as an export folder which roughly follow a convention started by CBMigrations. Uses the Collection v2.1. Always backup your collection before overwriting it!

Installation

From CommandBox type box install commandbox-cbLetterDrop

Usage

  1. Configure a project.
  2. Export the existing collection from Postman.
  3. Use the lade command to create the .json file to import into Postman.
  4. Import the new file into postman to see and use the collection.

Configuring a project

Command

From CommandBox ( usually, but not required, in the root folder of a site ) letterDrop Configure ....

Properties

collectionName - The name of the collection in Postman. For an existing collection, this should match the existing name in order to prevent an "are you sure" prompt.

entryPoint - Any part of the URL used to call an endpoint which is inherited by the module. For example, if the module is "v1" but the actual endpoint path is "api/v1", the entry point would be "api".

moduleList - Optional. A list of modules from the router to use.

siteURL - The value to use as the domain. This can be a literal domain name (i.e. http://mysite.com) or a variable ( i.e. {{API_URL}} ) which would be set in the collection or global scope of Postman. See https://learning.postman.com/docs/sending-requests/variables/variables/ for more information.

modulePath - Optional but recommended. This is the folder where modules are stored in your all. For example, if the majority of your modules are in /modules_app/api/modules_app, use that as your module folder and be sure to set "api" as your entry point.

scanModulePath - If this is set to true, when creating an export, this will scan the modulePath folder for modules and use that list to get the routes to export.

Creating an export

Command

From CommandBox ( usually, but not required, in the root folder of a site ) letterDrop lade ....

Properties

project - The name of the project configured using letterDrop configure

postmanExportFile - Optional. The name of a portman export file ( .json ) to use. This can be an absolute filepath or, if relative, will default to lookingin the /resources/postman folder relative to the current folder.

outputPath - Optional. Will default to /resources/postman relative to the current folder.

Import to Postman

Check https://learning.postman.com/docs/getting-started/importing-and-exporting/importing-and-exporting-overview/ for the latest information about importing and exporting data from Postman.

cbletterdrop's People

Contributors

djcard avatar

Watchers

 avatar

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.