Socket
Book a DemoInstallSign in
Socket

@go1/apim-cli

Package Overview
Dependencies
Maintainers
3
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@go1/apim-cli

Generate APIM deployment files from your openapi doc

2.0.1
latest
npmnpm
Version published
Weekly downloads
27
-40%
Maintainers
3
Weekly downloads
 
Created
Source

Go1 APIM CLI

Generate the required files to deploy your service to an APIM instance. Just create the OpenApi doc and the CLI will take care of the rest.

⚡️ Installation

First of all, make sure you have node v20 or higher installed. Then install the CLI and run the initialise command with:

npm i @go1/apim-cli -g

@go1/apim-cli init

You can alternatively use npx to install and initialise together

npx @go1/apim-cli init

This will kick off a wizard asking a few configuration questions including where to find the openapi.yml file. Afer the wizard has successfully finished, you should see a new folder called apim with all the required files for your service inside.

  • /apim
    • openapi.yml
    • config.yml
    • auth.policy.xml
    • /policies
      • endpoint_1.xml
      • endpoint_...xml

You're ready to push those files with your next commit and let the CI/CD pipeline handle the rest for you.

📖 Project Wiki

You can find more information about APIM here [Add link here]

⚙️ Commands & Options

init

CLI command for creating a new apim directory

@go1/apim-cli init [OPTION]
OptionDescriptionTypeDefaultRequired?
openapiPass the openapi.yml file, this will try to use configuration from the swagger doc to populate the wizardstringnullNo
namePass the display name of your servicestringnullNo
pathPass the public path for your servicestringnullNo
backendPass the internal path for your servicestringnullNo

update

CLI command for updating an existing apim directory so that you don't need to input the wizard again

@go1/apim-cli update

validate

CLI command for validating an open api doc follows the standard schema, you can also optionally pass a --master flag to validate against a source api to check if any breaking changes have been added. Input OpenAPI files can be either JSON or YAML format. There is also a --skip flag to still show breaking changes but don't throw an error in the console.

@go1/apim-cli validate <openapi.yml> [OPTION]

@go1/apim-cli validate openapi.yml --master=source.json --skip=true
OptionDescriptionTypeDefaultRequired?
openapiPass the incoming openapi.yml file that you want to validatestringnullYes
masterPass the source openapi.yml file to compare the incoming changes withstringnullNo
skipWhether you want to skip any breaking changes from throwing an errorbooleanfalseNo

merge

CLI command for merging two openapi docs into a single file. This is useful for merging individual services into a master open api doc.

@go1/apim-cli merge changes.yml source.yml output.json

Local Development

Clone this repo and run the following commands to setup and test locally

npm install
npm run build

chmod +x ./build
./build/cli.js init
npm run test

⚠️ License

Go1 APIM CLI is free and open-source software licensed under the Apache 2.0 License.

Keywords

@go1/apim-cli

FAQs

Package last updated on 29 May 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.