1.1.2 • Published 5 years ago

iot-swagger v1.1.2

Weekly downloads
-
License
ISC
Repository
bitbucket
Last release
5 years ago

iot-logger

npm version install size

base logger clinet for sunrise. It uses new relic and sentry.

Table of Contents

Features

  • create swagger base json object to swaggerUi.setup
  • help with creating of the swagger structure by helper methods in utils part

Installing

Using npm:

$ npm install iot-swagger

Example

import swagger from 'iot-swagger';

const baseProps = swagger.utils.createBaseProp('acl');

const config = {
    description: "my swagger api implementation",
    host: "localhost:30000",
    title: "my title",
};

const data = {
    modules: [
        {
            name: 'module',
            description: 'description'
        }
    ],
    parameters: {
        company: {
            name: 'company',
            in: 'query',
            description: 'company - division',
            required: true,
            schema: {
                type: 'string',
                enum: ['division_1', 'division_2'],
            },
        },
    },
    schemas: {},
    paths: {
        '/acl': {
            get: {
                ...baseProps('get'),
                summary: 'whole acl setting',
                description: 'return whole acl settings for the forntend application',
                parameters: [
                    {
                        $ref: '#/components/parameters/company',
                    },
                ],
            },
        },
    }
};

const swaggerBaseJsonObject = swagger.createBaseDefinition(config, data);

console.log(swaggerBaseJsonObject);
1.1.2

5 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.0

5 years ago