npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

angular-swagger2-client

v0.0.5

Published

A simple and powerful OpenAPI/Swagger Client for Angular, based on promises to connect with endpoint using OpenAPI/Swagger Specification 2.0.

Readme

Angular OpenAPI/Swagger Client

A simple and powerful OpenAPI/Swagger Client for Angular, based on promises to connect with endpoint using OpenAPI/Swagger Specification 2.0.

Features

  • POST, PUT, GET, DELETE, PATCH and CONNECT request are supported.
  • Params in: query, path, formData and header are supported.
  • SecuritySchema with security in API are supported(only type apiKey).
  • By default, PUT and POST request send with content-type: application/x-www-form-urlencoded.
  • Removes all parameters that have not been established in the API definition.
  • Implements a Pre-Validator for params and supported data types, format and required.
  • Global static and dynamic default value based on LocalStorage.
  • Support for uploading files using consume in the API definition and with at least one parameter in formData.

Getting Started

Install via NPM

npm install angular-swagger2-client

Install via Bower

bower install angular-swagger2-client
  • Include the required libraries in your index.html:
<html>
    <head>
        <title>My Angular Application</title>
        <!-- Angular swagger Client -->
        <script src="vendor/angular-swagger2-client/dist/angular-swagger2-client.js"></script>
    </head>
    <body>
        ...
    </body>
</html>

IMPORTANT: Where vendor you need replace for you downaload directory. If you ussing bower replace for bower_components, and if you using npm you need replace for node_modules

  • Inject angular-swagger2-client module
angular.module('myApp', [
	'angular-swagger2-client'
])
  • Prepare you swagger
angular.module('myApp', [
	'angular-swagger2-client'
]).run(function($rootScope, AngularSwagger2Client) {
	$rootScope.api = new AngularSwagger2Client(YouSwaggerJson);
})

Requirements

  • AngularJS 1.4+

API

object AngularSwagger2Client(Object jsonObject[, Object defaultStaticData[, Array defaultDynamicData]])

Params

object jsonObject required

This param is required and expect a json object of swagger.

IMPORTANT: Only accepts the OpenAPI/Swagger Specification version 2.0.

object defaultStaticData optional

This parameter only accepts an object with keys and their respective values that will be used by default in all API's.

IMPORTANT: Parameters that have not been defined in the parameterObject or securityRequirementObject will not be used.

array defaultDynamicData optional

This parameter only accepts an array with the list of localStorage keys. These keys are processed at runtime to ensure current values are obtained.

IMPORTANT: Parameters that have not been defined in the parameterObject or securityRequirementObject will not be used.

Thanks:

This project is based on the angular-swaggerific repository.