Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

autodesk-forks-swagger-node-runner

autodesk-forks695MIT0.9.0

Forked Swagger loader and middleware utilities

swagger, api, apis, swagger-connect, swagger-express, swagger-restify, swagger-hapi, swagger-sails

readme

autodesk-forks-swagger-node-runner

This package is a fork of apigee-127/swagger-node-runner. The purpose of this fork is to update dependencies and continue to maintain the original package.

Would you like to contribute? Read our contribution guidelines.

License: MIT NodeJS with Gulp semver npm version contributors

:book: Resources

Getting started

You can install this fork via npm:

npm i autodesk-forks-swagger-node-runner

Sample usage with express server:

const SwaggerRunner = require("swagger-node-runner");
const request = require("supertest");
const express = require('express')();
const axios = require('axios');

SwaggerRunner.create({
    appRoot: './test/assets/project'
}, async (err, runner) => {
    if (err) console.error(err);

    runner.expressMiddleware().register(express);

    const {statusCode: goodRequest} = await request(express)
        .put('/expect_integer')
        .query({
            name: 123123,
        });
    console.log(goodRequest); // will output 200

    const {statusCode: badRequest} = await request(express)
        .put('/expect_integer')
        .query({
            name: 'string',
        });
    console.log(badRequest); // will output 400
})

changelog

Change Log

All notable changes to this project will be documented in this file per each release.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

[Unreleased] - yyyy-mm-dd

Here we write upgrading notes for brands. It's a team effort to make them as straightforward as possible.

Added

Changed

Fixed

[0.9.0] - 2023-09-13

Changed

[0.8.1] - 2023-05-11

Changed

[0.8.0] - 2023-05-11

Breaking

Changed