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 🙏

© 2024 – Pkg Stats / Ryan Hefner

serverless-wso2-apim-integartion

v0.2.0

Published

Serverless Framework plugin for WSO2 API Manager

Downloads

5

Readme

serverless-wso2-apim

License: MIT

Serverless Framework plugin to manage APIs in WSO2 API Manager.

img

Compatible with

Features

  • Create or Update your API definitions (including backend certificates) seamlessly with one command - sls deploy.
  • Manage your API definitions via sls info and sls remove.
  • Automatically uploads backend certificates (including CAs) to enable HTTP/S based connectivity with backends.
  • Backend certificates can be supplied using file:// (relative to where serverless.yml file is located) or arn:aws:acm:.. (AWS ACM Certificate ARN).
  • Automatically publish / re-publish APIs to WSO2 API Store on every deploy.

Install Plugin

  • Discover it on npmjs.com @ here

  • yarn add -D serverless-wso2-apim
    or
    npm install --save serverless-wso2-apim

  • Then in serverless.yml add following entry to the plugins array:

    plugins:
      - serverless-wso2-apim

Using the Plugin

  • Make sure you have a Serverless project set up as described here.

  • Add configuration options to your Serverless configuration, as below.

    custom:
      wso2apim:
        enabled: true
        host: 'wso2-apimanager.com' # WSO2 API Manager Host
        port: 443 # WSO2 API Manager Port
        versionSlug: 'v0.14'  # WSO2 API Manager's Management API version
        user: 'user@tenant' # Username, with tenant symbol
        pass: 'pass' # Password
        gatewayEnv: 'Production'  # Target Gateway Environment
  • Add one or more API definitions to your Serverless configuration, as below.

    custom:
      wso2apim:
        enabled: true
        apidefs:
          - myAwesomeAPI: # Identifier of your API definition
            name: 'MyAwesomeAPI'  # (CANNOT BE UPDATED LATER) Name of API that shows up in WSO2 API Console
            version: 'v1' # (CANNOT BE UPDATED LATER) Version, which also forms a part of the API URL ultimately 
            rootContext: '/myawesomeapi'  # (CANNOT BE UPDATED LATER) Runtime context of API which will be exposed by WSO2 API Gateway. Must be unique across the Gateway Environment.
            description: 'My Awesome API'
            visibility: 'PUBLIC'  # Accessible from Public Internet, Visible to everyone
            backend: 
              http: # HTTP-based Backends
                baseUrl: 'https://backend:port/123'  # Backend RESTful base URL
                certChain: 'file://certs/backend.cer'  # Optional, certificate chain in PEM (base64) format. 
                                                       # Alternatively, you can also supply AWS ACM Certificate ARN (e.g. arn:aws:acm:...) too.
            maxTps: 100 # Throttling, Transactions per second
            tags:
              - my-awesome-api
              - awesomeness
            swaggerSpec:  # Swagger specification in YML, currently supports 2.0
              swagger: '2.0'
              ...
              info:
                ...
              paths:
                ...
  • Run sls deploy to create-and-publish (or) update-and-republish API definitions (and associated backend certificates, if supplied) in WSO2 API Manager.

  • Run sls info to view the status of API deployment on WSO2 API Manager.

  • Run sls remove to delete API definitions (and associated backend certificates, if exists) when there are no active subscriptions exist on those APIs.

  • ** COMING SOON **
    Run sls remove --force (** USE WITH CAUTION **) to forcefully delete API definitions (and associated backend certificates) despite any active subscriptions that may exist. API definitions will be retired and deprecated before removing it completely from WSO2 API Manager.

Limitations and Backlog items

  • Limited to creation of RESTful APIs using Swagger 2.0 on WSO2 API Manager.
  • Limited to WSO2 API Manager 2.6.0 which uses v0.14 as management API version.
  • For a full list of backlog items, refer to what's coming up?

Need Help?

  • Join us on Slack here

License

MIT