1.0.26 • Published 4 years ago

jsspbuilder v1.0.26

Weekly downloads
1
License
ISC
Repository
-
Last release
4 years ago

K2 TypeScript Broker Generator

This is a CLI which can be used to generate a K2 Broker by providing a Swagger v2.0 or OpenAPI v3.0 definition as input.

Features

  • Generates a TypeScript code file (index.ts) from a Swagger v2.0 or OpenAPI v3.0 definition file (json format)

  • Dynamic flattening of complex objects up to user defined level in describe schema

  • Dynamic flattening of returned data for complex objects

Getting Started

This CLI requires Node.js v12.14.1+ to run.

Usage

  1. Clone the K2 JavaScript broker template into a new directory:
git clone https://github.com/K2Documentation/K2Documentation.Samples.JavascriptBroker.Template.git mynewbroker

cd mynewbroker
  1. Install K2 Broker dependencies:
npm install
  1. Install the JSSPBuilder CLI globally:
npm install jsspbuilder -g
  1. Copy/Save you swagger/openAPI definition file to the project folder
copy [your_definition_file] swagger.json

Note: If you want to integrate with an OData v4.0 service, you can make use of our OData v4.0 to >OpenAPI v3.0 conversion service. The Service can be found at: https://odata4edmtoopenapi3converter.azurewebsites.net/swagger/index.html

  1. Run the JSSPBuilder CLI:

Interactive...

jsspbuilder

or with parameters

jsspbuilder --filename=swagger.json --flatten=2 --outputdir=src

Note: If an index.ts file existed before running jsspbuilder, it will be renamed index.ts_bak1

  1. Follow the instructions to build and publish your broker to a K2 Cloud instance :
    https://www.npmjs.com/package/@k2oss/k2-broker-core
1.0.26

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.1-7.1

4 years ago

1.0.17

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.5

4 years ago

1.0.0

4 years ago