This is Zally's cli tool: it reads a swagger file locally and lints it by requesting violations check at a given Zally server.
-
Clone Zally repository
git clone [email protected]:zalando-incubator/zally.git zally
-
Switch to
cli
folder:cd zally/cli
-
Build JAR package:
./gradlew clean build
-
Check that
zally
command is working./bin/zally
-
Add
./bin
directory toPATH
-
Download latest zally-cli JAR file from the releases page
-
Create a
zally
start script in your/usr/local/bin
:#!/usr/bin/env bash function zally { java -Done-jar.silent=true -jar /PATH/TO/zally-1.0.0.jar "$@" } zally $@
To launch zally-cli
, run the following command:
zally swagger_definition.yml
By default zally-cli
uses API located at http://localhost:8080/ and no security
token. You can provide alternative settings using either environment variables
ZALLY_URL
and TOKEN
:
export ZALLY_URL="http://zally.example.com/"
export TOKEN="f123-4567-890a-bcde"
zally swagger_definition.yml
or --linter-service
and --token
command-line arguments:
zally swagger_definition.yml --linter-service "http://zally.example.com/" --token "f123-4567-890a-bcde"
To get commands help message, simply type:
zally --help
-
Make sure that the current state of the Git repository is clean:
git stash -a
-
Create a release:
./gradlew clean build -Pversion=1.0.0
-
Unstash the changes:
git stash pop
-
You can find the release JAR file in
releases
folder.