postman-cli-completion 1.84.0 → 1.86.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/completions/bash/postman.bash +110 -5
- package/completions/fish/postman.fish +88 -35
- package/completions/zsh/_postman +133 -10
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Bash completion for Postman CLI (postman v1.
|
|
1
|
+
# Bash completion for Postman CLI (postman v1.86.0)
|
|
2
2
|
# Auto-generated by scripts/generate.mjs — DO NOT EDIT
|
|
3
3
|
# Source: spec/commands.json
|
|
4
4
|
# https://github.com/yokawasa/postman-cli-completion
|
|
@@ -1218,13 +1218,14 @@ _postman_mock() {
|
|
|
1218
1218
|
if [[ "$cur" == -* ]]; then
|
|
1219
1219
|
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
1220
1220
|
else
|
|
1221
|
-
COMPREPLY=( $(compgen -W "generate run push deploy get list log delete" -- "$cur") )
|
|
1221
|
+
COMPREPLY=( $(compgen -W "generate run stop push deploy get list log delete" -- "$cur") )
|
|
1222
1222
|
fi
|
|
1223
1223
|
return 0
|
|
1224
1224
|
fi
|
|
1225
1225
|
case "$subcmd" in
|
|
1226
1226
|
generate) _postman_mock_generate ;;
|
|
1227
1227
|
run) _postman_mock_run ;;
|
|
1228
|
+
stop) _postman_mock_stop ;;
|
|
1228
1229
|
push) _postman_mock_push ;;
|
|
1229
1230
|
deploy) _postman_mock_deploy ;;
|
|
1230
1231
|
get) _postman_mock_get ;;
|
|
@@ -1236,7 +1237,7 @@ _postman_mock() {
|
|
|
1236
1237
|
|
|
1237
1238
|
_postman_mock_generate() {
|
|
1238
1239
|
if [[ "$cur" == -* ]]; then
|
|
1239
|
-
COMPREPLY=( $(compgen -W "-o --output -n --name --port --mode --stateful --instructions --spec --collection --dataset --force -u --update -w --workspace --deploy --public -s --slug --timeout --api-key --json -x --suppress-exit-code -h --help" -- "$cur") )
|
|
1240
|
+
COMPREPLY=( $(compgen -W "-o --output -n --name --port --mode --stateful --instructions --strict --spec --collection --dataset --force -u --update -w --workspace --deploy --public -s --slug --timeout --api-key --json -x --suppress-exit-code -h --help" -- "$cur") )
|
|
1240
1241
|
return 0
|
|
1241
1242
|
fi
|
|
1242
1243
|
case "$prev" in
|
|
@@ -1277,6 +1278,16 @@ _postman_mock_run() {
|
|
|
1277
1278
|
_postman_filematch '!*.@(json)' "$cur"
|
|
1278
1279
|
}
|
|
1279
1280
|
|
|
1281
|
+
_postman_mock_stop() {
|
|
1282
|
+
if [[ "$cur" == -* ]]; then
|
|
1283
|
+
COMPREPLY=( $(compgen -W "--timeout --json -h --help" -- "$cur") )
|
|
1284
|
+
return 0
|
|
1285
|
+
fi
|
|
1286
|
+
case "$prev" in
|
|
1287
|
+
esac
|
|
1288
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
1289
|
+
}
|
|
1290
|
+
|
|
1280
1291
|
_postman_mock_push() {
|
|
1281
1292
|
if [[ "$cur" == -* ]]; then
|
|
1282
1293
|
COMPREPLY=( $(compgen -W "-w --workspace --api-key --json -h --help" -- "$cur") )
|
|
@@ -2814,7 +2825,7 @@ _postman_simulation() {
|
|
|
2814
2825
|
if [[ "$cur" == -* ]]; then
|
|
2815
2826
|
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
2816
2827
|
else
|
|
2817
|
-
COMPREPLY=( $(compgen -W "create list get run push deploy update log delete" -- "$cur") )
|
|
2828
|
+
COMPREPLY=( $(compgen -W "create list get run stop push deploy update log delete" -- "$cur") )
|
|
2818
2829
|
fi
|
|
2819
2830
|
return 0
|
|
2820
2831
|
fi
|
|
@@ -2823,6 +2834,7 @@ _postman_simulation() {
|
|
|
2823
2834
|
list) _postman_simulation_list ;;
|
|
2824
2835
|
get) _postman_simulation_get ;;
|
|
2825
2836
|
run) _postman_simulation_run ;;
|
|
2837
|
+
stop) _postman_simulation_stop ;;
|
|
2826
2838
|
push) _postman_simulation_push ;;
|
|
2827
2839
|
deploy) _postman_simulation_deploy ;;
|
|
2828
2840
|
update) _postman_simulation_update ;;
|
|
@@ -2895,6 +2907,15 @@ _postman_simulation_run() {
|
|
|
2895
2907
|
esac
|
|
2896
2908
|
}
|
|
2897
2909
|
|
|
2910
|
+
_postman_simulation_stop() {
|
|
2911
|
+
if [[ "$cur" == -* ]]; then
|
|
2912
|
+
COMPREPLY=( $(compgen -W "--timeout --json -h --help" -- "$cur") )
|
|
2913
|
+
return 0
|
|
2914
|
+
fi
|
|
2915
|
+
case "$prev" in
|
|
2916
|
+
esac
|
|
2917
|
+
}
|
|
2918
|
+
|
|
2898
2919
|
_postman_simulation_push() {
|
|
2899
2920
|
if [[ "$cur" == -* ]]; then
|
|
2900
2921
|
COMPREPLY=( $(compgen -W "-w --workspace --api-key --json -h --help" -- "$cur") )
|
|
@@ -3005,7 +3026,7 @@ _postman_webhook() {
|
|
|
3005
3026
|
if [[ "$cur" == -* ]]; then
|
|
3006
3027
|
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
3007
3028
|
else
|
|
3008
|
-
COMPREPLY=( $(compgen -W "create start pause list delete status requests scripts forward" -- "$cur") )
|
|
3029
|
+
COMPREPLY=( $(compgen -W "create start pause list delete status requests scripts forward environment auth" -- "$cur") )
|
|
3009
3030
|
fi
|
|
3010
3031
|
return 0
|
|
3011
3032
|
fi
|
|
@@ -3019,6 +3040,8 @@ _postman_webhook() {
|
|
|
3019
3040
|
requests) _postman_webhook_requests ;;
|
|
3020
3041
|
scripts) _postman_webhook_scripts ;;
|
|
3021
3042
|
forward) _postman_webhook_forward ;;
|
|
3043
|
+
environment) _postman_webhook_environment ;;
|
|
3044
|
+
auth) _postman_webhook_auth ;;
|
|
3022
3045
|
esac
|
|
3023
3046
|
}
|
|
3024
3047
|
|
|
@@ -3184,4 +3207,86 @@ _postman_webhook_forward() {
|
|
|
3184
3207
|
esac
|
|
3185
3208
|
}
|
|
3186
3209
|
|
|
3210
|
+
_postman_webhook_environment() {
|
|
3211
|
+
if [[ -z "$subcmd" ]]; then
|
|
3212
|
+
if [[ "$cur" == -* ]]; then
|
|
3213
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
3214
|
+
else
|
|
3215
|
+
COMPREPLY=( $(compgen -W "get set" -- "$cur") )
|
|
3216
|
+
fi
|
|
3217
|
+
return 0
|
|
3218
|
+
fi
|
|
3219
|
+
case "$subcmd" in
|
|
3220
|
+
get) _postman_webhook_environment_get ;;
|
|
3221
|
+
set) _postman_webhook_environment_set ;;
|
|
3222
|
+
esac
|
|
3223
|
+
}
|
|
3224
|
+
|
|
3225
|
+
_postman_webhook_environment_get() {
|
|
3226
|
+
if [[ "$cur" == -* ]]; then
|
|
3227
|
+
COMPREPLY=( $(compgen -W "-w --workspace --api-key --timeout --json -h --help" -- "$cur") )
|
|
3228
|
+
return 0
|
|
3229
|
+
fi
|
|
3230
|
+
case "$prev" in
|
|
3231
|
+
--api-key)
|
|
3232
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
3233
|
+
return 0 ;;
|
|
3234
|
+
esac
|
|
3235
|
+
}
|
|
3236
|
+
|
|
3237
|
+
_postman_webhook_environment_set() {
|
|
3238
|
+
if [[ "$cur" == -* ]]; then
|
|
3239
|
+
COMPREPLY=( $(compgen -W "-w --workspace --api-key --timeout --json -h --help" -- "$cur") )
|
|
3240
|
+
return 0
|
|
3241
|
+
fi
|
|
3242
|
+
case "$prev" in
|
|
3243
|
+
--api-key)
|
|
3244
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
3245
|
+
return 0 ;;
|
|
3246
|
+
esac
|
|
3247
|
+
_postman_filematch '!*.@(json)' "$cur"
|
|
3248
|
+
}
|
|
3249
|
+
|
|
3250
|
+
_postman_webhook_auth() {
|
|
3251
|
+
if [[ -z "$subcmd" ]]; then
|
|
3252
|
+
if [[ "$cur" == -* ]]; then
|
|
3253
|
+
COMPREPLY=( $(compgen -W "-h --help" -- "$cur") )
|
|
3254
|
+
else
|
|
3255
|
+
COMPREPLY=( $(compgen -W "get set" -- "$cur") )
|
|
3256
|
+
fi
|
|
3257
|
+
return 0
|
|
3258
|
+
fi
|
|
3259
|
+
case "$subcmd" in
|
|
3260
|
+
get) _postman_webhook_auth_get ;;
|
|
3261
|
+
set) _postman_webhook_auth_set ;;
|
|
3262
|
+
esac
|
|
3263
|
+
}
|
|
3264
|
+
|
|
3265
|
+
_postman_webhook_auth_get() {
|
|
3266
|
+
if [[ "$cur" == -* ]]; then
|
|
3267
|
+
COMPREPLY=( $(compgen -W "-w --workspace --api-key --timeout --json -h --help" -- "$cur") )
|
|
3268
|
+
return 0
|
|
3269
|
+
fi
|
|
3270
|
+
case "$prev" in
|
|
3271
|
+
--api-key)
|
|
3272
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
3273
|
+
return 0 ;;
|
|
3274
|
+
esac
|
|
3275
|
+
}
|
|
3276
|
+
|
|
3277
|
+
_postman_webhook_auth_set() {
|
|
3278
|
+
if [[ "$cur" == -* ]]; then
|
|
3279
|
+
COMPREPLY=( $(compgen -W "--type --username --password --secret --source --key -w --workspace --api-key --timeout --json -h --help" -- "$cur") )
|
|
3280
|
+
return 0
|
|
3281
|
+
fi
|
|
3282
|
+
case "$prev" in
|
|
3283
|
+
--key)
|
|
3284
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
3285
|
+
return 0 ;;
|
|
3286
|
+
--api-key)
|
|
3287
|
+
_postman_filematch '!*.@(pem|crt|key)' "$cur"
|
|
3288
|
+
return 0 ;;
|
|
3289
|
+
esac
|
|
3290
|
+
}
|
|
3291
|
+
|
|
3187
3292
|
complete -F _postman postman
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# Fish completion for Postman CLI (postman v1.
|
|
1
|
+
# Fish completion for Postman CLI (postman v1.86.0)
|
|
2
2
|
# Auto-generated by scripts/generate.mjs — DO NOT EDIT
|
|
3
3
|
# Source: spec/commands.json
|
|
4
4
|
# https://github.com/yokawasa/postman-cli-completion
|
|
@@ -792,31 +792,33 @@ complete -c postman -n '__fish_seen_subcommand_from globals; and __fish_seen_sub
|
|
|
792
792
|
complete -c postman -n '__fish_seen_subcommand_from globals; and __fish_seen_subcommand_from lint' -r -k -a '(__fish_complete_suffix .json)'
|
|
793
793
|
|
|
794
794
|
# ---------- mock ----------
|
|
795
|
-
complete -c postman -n '__postman_using_subcommand mock generate run push deploy get list log delete' -a generate -d 'Generate a mock from a Postman collection, an OpenAPI file or a dataset, or from a built-in sample shopping
|
|
796
|
-
complete -c postman -n '__postman_using_subcommand mock generate run push deploy get list log delete' -a run -d 'Start a mock using its path if it lives in your repository, or its id if it lives in Postman cloud (fetched and run locally).'
|
|
797
|
-
complete -c postman -n '__postman_using_subcommand mock generate run push deploy get list log delete' -a
|
|
798
|
-
complete -c postman -n '__postman_using_subcommand mock generate run push deploy get list log delete' -a
|
|
799
|
-
complete -c postman -n '__postman_using_subcommand mock generate run push deploy get list log delete' -a
|
|
800
|
-
complete -c postman -n '__postman_using_subcommand mock generate run push deploy get list log delete' -a
|
|
801
|
-
complete -c postman -n '__postman_using_subcommand mock generate run push deploy get list log delete' -a
|
|
802
|
-
complete -c postman -n '__postman_using_subcommand mock generate run push deploy get list log delete' -a
|
|
795
|
+
complete -c postman -n '__postman_using_subcommand mock generate run stop push deploy get list log delete' -a generate -d 'Generate a mock from a Postman collection, an OpenAPI file or a dataset, or a static mock from a built-in sample shopping cart (POST /cart/items, GET /cart, POST /checkout). Writes a local mock by default, or a cloud mock with --workspace. Add --deploy to also make it a live mock server.'
|
|
796
|
+
complete -c postman -n '__postman_using_subcommand mock generate run stop push deploy get list log delete' -a run -d 'Start a mock using its path if it lives in your repository, or its id if it lives in Postman cloud (fetched and run locally).'
|
|
797
|
+
complete -c postman -n '__postman_using_subcommand mock generate run stop push deploy get list log delete' -a stop -d 'Stop a mock started with `postman mock run` on this machine, and wait until it has exited and released its port.'
|
|
798
|
+
complete -c postman -n '__postman_using_subcommand mock generate run stop push deploy get list log delete' -a push -d 'Upload a mock from your repository to Postman cloud (creates it the first time, updates it after).'
|
|
799
|
+
complete -c postman -n '__postman_using_subcommand mock generate run stop push deploy get list log delete' -a deploy -d 'Turn a mock in Postman cloud into a live mock server others can call over the internet.'
|
|
800
|
+
complete -c postman -n '__postman_using_subcommand mock generate run stop push deploy get list log delete' -a get -d 'Show a mock\'s details using its path if it lives in your repository, or its id if it lives in Postman cloud.'
|
|
801
|
+
complete -c postman -n '__postman_using_subcommand mock generate run stop push deploy get list log delete' -a list -d 'List the mocks in your repository or Postman cloud workspace'
|
|
802
|
+
complete -c postman -n '__postman_using_subcommand mock generate run stop push deploy get list log delete' -a log -d 'Show the requests a live mock server has received and the responses it sent, using its id.'
|
|
803
|
+
complete -c postman -n '__postman_using_subcommand mock generate run stop push deploy get list log delete' -a delete -d 'Delete a mock using its path if it lives in your repository, or its id if it lives in Postman cloud. Cannot be undone.'
|
|
803
804
|
complete -c postman -n '__fish_seen_subcommand_from mock' -s h -l help -d 'display help for command'
|
|
804
805
|
# ---------- mock generate ----------
|
|
805
806
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s o -l output -d 'Folder to save the mock in. Relative or absolute, e.g. ./postman/mocks/orders. Defaults to postman/mocks/<name>.' -r
|
|
806
|
-
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s n -l name -d 'Name for the mock. Taken from the source when you provide one; required for the sample.' -x
|
|
807
|
-
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l port -d 'Port the mock runs on (e.g. 4010
|
|
807
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s n -l name -d 'Name for the mock. Taken from the source when you provide one; required for the sample. With --update, renames the mock.' -x
|
|
808
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l port -d 'Port the mock runs on (e.g. 4010; default 4500). With --update, changes the mock\'s port.' -x
|
|
808
809
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l mode -d 'How the mock behaves: static (replays examples, the default), stateful (keeps records: create, read, list, update, delete), or ai (stateful, plus realistic data and business rules; generated by Postman, needs `postman login`).' -x
|
|
809
810
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l stateful -d 'Same as --mode stateful. Generated offline for a local file, by Postman with --workspace, --spec, --collection or --dataset (validated, with seed data). Endpoints that are not CRUD-shaped stay static.'
|
|
810
|
-
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l instructions -d 'With --mode ai: guidance for the AI, e.g. "Orders can only be cancelled before they ship".' -x
|
|
811
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l instructions -d 'With --mode ai: guidance for the AI, up to 2000 characters, e.g. "Orders can only be cancelled before they ship". Recorded with the mock, so --update reuses them.' -x
|
|
812
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l strict -d 'With --mode ai: fail instead of falling back. Postman refuses a mock it would build without AI (exit 1, nothing written or saved). A mock whose AI rules reached only some operations, or one an older Postman built without AI anyway, is kept but exits 4.'
|
|
811
813
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l spec -d 'Generate from a spec in Postman (by id) instead of a local file. With --workspace, the mock stays linked to it and is regenerated when it changes.' -x
|
|
812
814
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l collection -d 'Generate from a collection in Postman (by id) instead of a local file. With --workspace, the mock stays linked to it and is regenerated when it changes.' -r
|
|
813
815
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l dataset -d 'Generate from a dataset: its tables become resources and their first 20 rows the records. A dataset in Postman (by id) or a local .dataset.yaml (CSV and JSON sources). Generated by Postman in stateful (the default) or ai mode; AI sees the column names and types, never the rows.' -x
|
|
814
|
-
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l force -d '
|
|
815
|
-
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s u -l update -d 'Regenerate an existing mock in place
|
|
816
|
-
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s w -l workspace -d 'Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with --output, --force, or --update
|
|
816
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l force -d 'Replace the mock\'s files if the target folder already holds a mock. A folder with other files and no mock is never written to.'
|
|
817
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s u -l update -d 'Regenerate an existing mock in place: one in your repository by path (e.g. ./postman/mocks/orders), or one in Postman cloud by id. Without a source or --mode, it uses the ones the mock recorded (and an ai mock\'s instructions). Cannot be used with --output.' -r
|
|
818
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s w -l workspace -d 'Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with --output, --force, or --update <mockPath>; with --deploy it only picks the workspace, and with --update <cloudMockId> it names the workspace the mock is in.' -x
|
|
817
819
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l deploy -d 'After generating, upload the mock to Postman cloud and deploy it to a live mock server (private by default). Uses --workspace, else the workspace linked to this project.'
|
|
818
|
-
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l public -d 'With --deploy, let anyone with the link reach the server (default: callers need an API key)'
|
|
819
|
-
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s s -l slug -d 'With --deploy, the short label used in the server\'s web address' -x
|
|
820
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l public -d 'With --deploy, let anyone with the link reach the server (default: callers need an API key). Requires --deploy.'
|
|
821
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -s s -l slug -d 'With --deploy, the short label used in the server\'s web address. Requires --deploy.' -x
|
|
820
822
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l timeout -d 'How long to wait for Postman to generate the mock, in milliseconds (default 75000).' -x
|
|
821
823
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l api-key -d 'Postman API key for anything Postman generates, saves or deploys (defaults to your `postman login` session)' -r
|
|
822
824
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from generate' -l json -d 'Print the result as machine-readable data instead of a summary: the generated mock, or with --deploy the live server details'
|
|
@@ -834,6 +836,11 @@ complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcom
|
|
|
834
836
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -l dataset -d 'Pass --dataset multiple times to load several .dataset.yaml files (or directories containing them). Each is made available to the mock\'s handlers as pm.datasets(<id>). (default: [])' -r
|
|
835
837
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -s h -l help -d 'display help for command'
|
|
836
838
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from run' -r -k -a '(__fish_complete_suffix .json)'
|
|
839
|
+
# ---------- mock stop ----------
|
|
840
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from stop' -l timeout -d 'Seconds to wait for a graceful shutdown before force-killing the mock (default 15)' -x
|
|
841
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from stop' -l json -d 'Print the result as machine-readable data'
|
|
842
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from stop' -s h -l help -d 'display help for command'
|
|
843
|
+
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from stop' -r -k -a '(__fish_complete_suffix .json)'
|
|
837
844
|
# ---------- mock push ----------
|
|
838
845
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from push' -s w -l workspace -d 'Postman cloud workspace to upload to, by id (defaults to the workspace already linked to this project)' -x
|
|
839
846
|
complete -c postman -n '__fish_seen_subcommand_from mock; and __fish_seen_subcommand_from push' -l api-key -d 'Postman API key (defaults to your `postman login` session)' -r
|
|
@@ -1732,15 +1739,16 @@ complete -c postman -n '__fish_seen_subcommand_from secret; and __fish_seen_subc
|
|
|
1732
1739
|
complete -c postman -n '__fish_seen_subcommand_from secret; and __fish_seen_subcommand_from list' -s h -l help -d 'display help for command'
|
|
1733
1740
|
|
|
1734
1741
|
# ---------- simulation ----------
|
|
1735
|
-
complete -c postman -n '__postman_using_subcommand simulation create list get run push deploy update log delete' -a create -d 'Create a simulation that serves several mocks behind one address. Add --deploy to also make it a live mock server.'
|
|
1736
|
-
complete -c postman -n '__postman_using_subcommand simulation create list get run push deploy update log delete' -a list -d 'List the simulations in your repository or Postman cloud workspace'
|
|
1737
|
-
complete -c postman -n '__postman_using_subcommand simulation create list get run push deploy update log delete' -a get -d 'Show a simulation\'s details using its .sim.yaml path if it lives in your repository, or its id if it lives in Postman cloud.'
|
|
1738
|
-
complete -c postman -n '__postman_using_subcommand simulation create list get run push deploy update log delete' -a run -d 'Serve a simulation\'s mocks on one local port, routing each by its routeKey. Pass a .sim.yaml path (local) or a Postman simulation id (fetched and run locally).'
|
|
1739
|
-
complete -c postman -n '__postman_using_subcommand simulation create list get run push deploy update log delete' -a
|
|
1740
|
-
complete -c postman -n '__postman_using_subcommand simulation create list get run push deploy update log delete' -a
|
|
1741
|
-
complete -c postman -n '__postman_using_subcommand simulation create list get run push deploy update log delete' -a
|
|
1742
|
-
complete -c postman -n '__postman_using_subcommand simulation create list get run push deploy update log delete' -a
|
|
1743
|
-
complete -c postman -n '__postman_using_subcommand simulation create list get run push deploy update log delete' -a
|
|
1742
|
+
complete -c postman -n '__postman_using_subcommand simulation create list get run stop push deploy update log delete' -a create -d 'Create a simulation that serves several mocks behind one address. Add --deploy to also make it a live mock server.'
|
|
1743
|
+
complete -c postman -n '__postman_using_subcommand simulation create list get run stop push deploy update log delete' -a list -d 'List the simulations in your repository or Postman cloud workspace'
|
|
1744
|
+
complete -c postman -n '__postman_using_subcommand simulation create list get run stop push deploy update log delete' -a get -d 'Show a simulation\'s details using its .sim.yaml path if it lives in your repository, or its id if it lives in Postman cloud.'
|
|
1745
|
+
complete -c postman -n '__postman_using_subcommand simulation create list get run stop push deploy update log delete' -a run -d 'Serve a simulation\'s mocks on one local port, routing each by its routeKey. Pass a .sim.yaml path (local) or a Postman simulation id (fetched and run locally).'
|
|
1746
|
+
complete -c postman -n '__postman_using_subcommand simulation create list get run stop push deploy update log delete' -a stop -d 'Stop a simulation started with `postman simulation run` on this machine, and wait until it has exited and released its port.'
|
|
1747
|
+
complete -c postman -n '__postman_using_subcommand simulation create list get run stop push deploy update log delete' -a push -d 'Upload a simulation from your repository to Postman cloud (creates it the first time, updates it after). Its member mocks are pushed too.'
|
|
1748
|
+
complete -c postman -n '__postman_using_subcommand simulation create list get run stop push deploy update log delete' -a deploy -d 'Turn a simulation in Postman cloud into a live mock server others can call over the internet.'
|
|
1749
|
+
complete -c postman -n '__postman_using_subcommand simulation create list get run stop push deploy update log delete' -a update -d 'Change a simulation in place — rename it, switch routing, add mocks, or change a member\'s address. Pass a .sim.yaml path (repository) or a Postman simulation id (cloud).'
|
|
1750
|
+
complete -c postman -n '__postman_using_subcommand simulation create list get run stop push deploy update log delete' -a log -d 'Show the requests a deployed simulation has received and the responses it sent, using its mock server id.'
|
|
1751
|
+
complete -c postman -n '__postman_using_subcommand simulation create list get run stop push deploy update log delete' -a delete -d 'Delete a simulation using its .sim.yaml path if it lives in your repository, or its id if it lives in Postman cloud. Cannot be undone.'
|
|
1744
1752
|
complete -c postman -n '__fish_seen_subcommand_from simulation' -s h -l help -d 'display help for command'
|
|
1745
1753
|
# ---------- simulation create ----------
|
|
1746
1754
|
complete -c postman -n '__fish_seen_subcommand_from simulation; and __fish_seen_subcommand_from create' -s n -l name -d 'Name for the simulation' -x
|
|
@@ -1785,6 +1793,10 @@ complete -c postman -n '__fish_seen_subcommand_from simulation; and __fish_seen_
|
|
|
1785
1793
|
complete -c postman -n '__fish_seen_subcommand_from simulation; and __fish_seen_subcommand_from run' -l doctor -d 'Start the proxy, probe each available HTTP client (fetch/undici/axios/node-fetch) to confirm it honors HTTP_PROXY/HTTPS_PROXY, then exit.'
|
|
1786
1794
|
complete -c postman -n '__fish_seen_subcommand_from simulation; and __fish_seen_subcommand_from run' -l lift -d 'Start this command behind the proxy with HTTP_PROXY, HTTPS_PROXY and NODE_EXTRA_CA_CERTS already set in its environment, instead of printing them for you to export by hand. Runs as a child process, so the variables reach the code making the calls rather than the CLI. The proxy lives exactly as long as the command and exits with its exit code.' -x
|
|
1787
1795
|
complete -c postman -n '__fish_seen_subcommand_from simulation; and __fish_seen_subcommand_from run' -s h -l help -d 'display help for command'
|
|
1796
|
+
# ---------- simulation stop ----------
|
|
1797
|
+
complete -c postman -n '__fish_seen_subcommand_from simulation; and __fish_seen_subcommand_from stop' -l timeout -d 'Seconds to wait for a graceful shutdown before force-killing the simulation (default 15)' -x
|
|
1798
|
+
complete -c postman -n '__fish_seen_subcommand_from simulation; and __fish_seen_subcommand_from stop' -l json -d 'Print the result as machine-readable data'
|
|
1799
|
+
complete -c postman -n '__fish_seen_subcommand_from simulation; and __fish_seen_subcommand_from stop' -s h -l help -d 'display help for command'
|
|
1788
1800
|
# ---------- simulation push ----------
|
|
1789
1801
|
complete -c postman -n '__fish_seen_subcommand_from simulation; and __fish_seen_subcommand_from push' -s w -l workspace -d 'Postman cloud workspace to upload to, by id (defaults to the workspace already linked to this project)' -x
|
|
1790
1802
|
complete -c postman -n '__fish_seen_subcommand_from simulation; and __fish_seen_subcommand_from push' -l api-key -d 'Postman API key (defaults to your `postman login` session)' -r
|
|
@@ -1844,15 +1856,17 @@ complete -c postman -n '__fish_seen_subcommand_from update' -l check -d 'Check w
|
|
|
1844
1856
|
complete -c postman -n '__fish_seen_subcommand_from update' -s h -l help -d 'display help for command'
|
|
1845
1857
|
|
|
1846
1858
|
# ---------- webhook ----------
|
|
1847
|
-
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward' -a create -d 'Create a new webhook and print its public URL.'
|
|
1848
|
-
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward' -a start -d 'Activate a webhook so it can receive requests.'
|
|
1849
|
-
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward' -a pause -d 'Pause a webhook so it no longer accepts requests.'
|
|
1850
|
-
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward' -a list -d 'List all webhooks in a workspace.'
|
|
1851
|
-
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward' -a delete -d 'Permanently delete a webhook.'
|
|
1852
|
-
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward' -a status -d 'Show details for a webhook.'
|
|
1853
|
-
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward' -a requests -d 'List, inspect, and replay requests received by a webhook.'
|
|
1854
|
-
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward' -a scripts -d 'Create or update scripts executed by a webhook.'
|
|
1855
|
-
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward' -a forward -d 'Forward incoming webhook requests to a local port.'
|
|
1859
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a create -d 'Create a new webhook and print its public URL.'
|
|
1860
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a start -d 'Activate a webhook so it can receive requests.'
|
|
1861
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a pause -d 'Pause a webhook so it no longer accepts requests.'
|
|
1862
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a list -d 'List all webhooks in a workspace.'
|
|
1863
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a delete -d 'Permanently delete a webhook.'
|
|
1864
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a status -d 'Show details for a webhook.'
|
|
1865
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a requests -d 'List, inspect, and replay requests received by a webhook.'
|
|
1866
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a scripts -d 'Create or update scripts executed by a webhook.'
|
|
1867
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a forward -d 'Forward incoming webhook requests to a local port.'
|
|
1868
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a environment -d 'Get or set the cloud environment associated with a webhook.'
|
|
1869
|
+
complete -c postman -n '__postman_using_subcommand webhook create start pause list delete status requests scripts forward environment auth' -a auth -d 'Get or set authentication for incoming webhook requests.'
|
|
1856
1870
|
complete -c postman -n '__fish_seen_subcommand_from webhook' -s h -l help -d 'display help for command'
|
|
1857
1871
|
# ---------- webhook create ----------
|
|
1858
1872
|
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from create' -s t -l title -d 'Name for the webhook (default: "CLI Webhook")' -x
|
|
@@ -1910,3 +1924,42 @@ complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_sub
|
|
|
1910
1924
|
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from forward' -s w -l workspace -d 'Postman workspace ID' -x
|
|
1911
1925
|
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from forward' -l api-key -d 'Postman API key' -r
|
|
1912
1926
|
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from forward' -s h -l help -d 'display help for command'
|
|
1927
|
+
# ---------- webhook environment ----------
|
|
1928
|
+
complete -c postman -n '__postman_using_subcommand environment get set' -a get -d 'Print the associated cloud environment ID.'
|
|
1929
|
+
complete -c postman -n '__postman_using_subcommand environment get set' -a set -d 'Associate a cloud environment ID with a webhook; local files are not supported.'
|
|
1930
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment' -s h -l help -d 'display help for command'
|
|
1931
|
+
# ---------- webhook environment get ----------
|
|
1932
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from get' -s w -l workspace -d 'Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)' -x
|
|
1933
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from get' -l api-key -d 'Postman API key for CLI authentication' -r
|
|
1934
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from get' -l timeout -d 'Request timeout in milliseconds (default: 30000)' -x
|
|
1935
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from get' -l json -d 'Print the result as JSON'
|
|
1936
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from get' -s h -l help -d 'display help for command'
|
|
1937
|
+
# ---------- webhook environment set ----------
|
|
1938
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from set' -s w -l workspace -d 'Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)' -x
|
|
1939
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from set' -l api-key -d 'Postman API key for CLI authentication' -r
|
|
1940
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from set' -l timeout -d 'Request timeout in milliseconds (default: 30000)' -x
|
|
1941
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from set' -l json -d 'Print the result as JSON'
|
|
1942
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from set' -s h -l help -d 'display help for command'
|
|
1943
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from environment; and __fish_seen_subcommand_from set' -r -k -a '(__fish_complete_suffix .json)'
|
|
1944
|
+
# ---------- webhook auth ----------
|
|
1945
|
+
complete -c postman -n '__postman_using_subcommand auth get set' -a get -d 'Show webhook authentication details without credential values.'
|
|
1946
|
+
complete -c postman -n '__postman_using_subcommand auth get set' -a set -d 'Set Basic or API key authentication, or disable authentication.'
|
|
1947
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth' -s h -l help -d 'display help for command'
|
|
1948
|
+
# ---------- webhook auth get ----------
|
|
1949
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from get' -s w -l workspace -d 'Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)' -x
|
|
1950
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from get' -l api-key -d 'Postman API key for CLI authentication' -r
|
|
1951
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from get' -l timeout -d 'Request timeout in milliseconds (default: 30000)' -x
|
|
1952
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from get' -l json -d 'Print the result as JSON'
|
|
1953
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from get' -s h -l help -d 'display help for command'
|
|
1954
|
+
# ---------- webhook auth set ----------
|
|
1955
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -l type -d 'Authentication type (choices: "basic", "api-key", "none")' -x
|
|
1956
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -l username -d 'Basic auth username or variable reference' -x
|
|
1957
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -l password -d 'Basic auth password or variable reference' -x
|
|
1958
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -l secret -d 'Webhook API key value or variable reference' -x
|
|
1959
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -l source -d 'Where incoming credentials are read (choices: "headers", "query", default: "headers")' -x
|
|
1960
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -l key -d 'Header or query parameter name (default: Authorization for Basic, x-api-key for API key)' -r
|
|
1961
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -s w -l workspace -d 'Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)' -x
|
|
1962
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -l api-key -d 'Postman API key for CLI authentication' -r
|
|
1963
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -l timeout -d 'Request timeout in milliseconds (default: 30000)' -x
|
|
1964
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -l json -d 'Print the result as JSON'
|
|
1965
|
+
complete -c postman -n '__fish_seen_subcommand_from webhook; and __fish_seen_subcommand_from auth; and __fish_seen_subcommand_from set' -s h -l help -d 'display help for command'
|
package/completions/zsh/_postman
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#compdef postman
|
|
2
2
|
compdef _postman postman
|
|
3
|
-
# Zsh completion for Postman CLI (postman v1.
|
|
3
|
+
# Zsh completion for Postman CLI (postman v1.86.0)
|
|
4
4
|
# Auto-generated by scripts/generate.mjs — DO NOT EDIT
|
|
5
5
|
# Source: spec/commands.json
|
|
6
6
|
# https://github.com/yokawasa/postman-cli-completion
|
|
@@ -1474,6 +1474,7 @@ _postman_mock() {
|
|
|
1474
1474
|
case $words[1] in
|
|
1475
1475
|
generate) _postman_mock_generate ;;
|
|
1476
1476
|
run) _postman_mock_run ;;
|
|
1477
|
+
stop) _postman_mock_stop ;;
|
|
1477
1478
|
push) _postman_mock_push ;;
|
|
1478
1479
|
deploy) _postman_mock_deploy ;;
|
|
1479
1480
|
get) _postman_mock_get ;;
|
|
@@ -1488,8 +1489,9 @@ _postman_mock() {
|
|
|
1488
1489
|
_postman_mock_commands() {
|
|
1489
1490
|
local -a sub
|
|
1490
1491
|
sub=(
|
|
1491
|
-
'generate:Generate a mock from a Postman collection, an OpenAPI file or a dataset, or from a built-in sample shopping
|
|
1492
|
+
'generate:Generate a mock from a Postman collection, an OpenAPI file or a dataset, or a static mock from a built-in sample shopping cart (POST /cart/items, GET /cart, POST /checkout). Writes a local mock by default, or a cloud mock with --workspace. Add --deploy to also make it a live mock server.'
|
|
1492
1493
|
'run:Start a mock using its path if it lives in your repository, or its id if it lives in Postman cloud (fetched and run locally).'
|
|
1494
|
+
'stop:Stop a mock started with `postman mock run` on this machine, and wait until it has exited and released its port.'
|
|
1493
1495
|
'push:Upload a mock from your repository to Postman cloud (creates it the first time, updates it after).'
|
|
1494
1496
|
'deploy:Turn a mock in Postman cloud into a live mock server others can call over the internet.'
|
|
1495
1497
|
'get:Show a mock'\''s details using its path if it lives in your repository, or its id if it lives in Postman cloud.'
|
|
@@ -1503,20 +1505,21 @@ _postman_mock_commands() {
|
|
|
1503
1505
|
_postman_mock_generate() {
|
|
1504
1506
|
_arguments \
|
|
1505
1507
|
'(-o --output)'{-o,--output}'[Folder to save the mock in. Relative or absolute, e.g. ./postman/mocks/orders. Defaults to postman/mocks/<name>.]:dir:_files -g "*.json"' \
|
|
1506
|
-
'(-n --name)'{-n,--name}'[Name for the mock. Taken from the source when you provide one; required for the sample.]:name' \
|
|
1507
|
-
'--port[Port the mock runs on (e.g. 4010
|
|
1508
|
+
'(-n --name)'{-n,--name}'[Name for the mock. Taken from the source when you provide one; required for the sample. With --update, renames the mock.]:name' \
|
|
1509
|
+
'--port[Port the mock runs on (e.g. 4010; default 4500). With --update, changes the mock'\''s port.]:port' \
|
|
1508
1510
|
'--mode[How the mock behaves\: static (replays examples, the default), stateful (keeps records\: create, read, list, update, delete), or ai (stateful, plus realistic data and business rules; generated by Postman, needs `postman login`).]:mode' \
|
|
1509
1511
|
'--stateful[Same as --mode stateful. Generated offline for a local file, by Postman with --workspace, --spec, --collection or --dataset (validated, with seed data). Endpoints that are not CRUD-shaped stay static.]' \
|
|
1510
|
-
'--instructions[With --mode ai\: guidance for the AI, e.g. "Orders can only be cancelled before they ship".]:text' \
|
|
1512
|
+
'--instructions[With --mode ai\: guidance for the AI, up to 2000 characters, e.g. "Orders can only be cancelled before they ship". Recorded with the mock, so --update reuses them.]:text' \
|
|
1513
|
+
'--strict[With --mode ai\: fail instead of falling back. Postman refuses a mock it would build without AI (exit 1, nothing written or saved). A mock whose AI rules reached only some operations, or one an older Postman built without AI anyway, is kept but exits 4.]' \
|
|
1511
1514
|
'--spec[Generate from a spec in Postman (by id) instead of a local file. With --workspace, the mock stays linked to it and is regenerated when it changes.]:specId' \
|
|
1512
1515
|
'--collection[Generate from a collection in Postman (by id) instead of a local file. With --workspace, the mock stays linked to it and is regenerated when it changes.]:collectionId:_files -g "*.json"' \
|
|
1513
1516
|
'--dataset[Generate from a dataset\: its tables become resources and their first 20 rows the records. A dataset in Postman (by id) or a local .dataset.yaml (CSV and JSON sources). Generated by Postman in stateful (the default) or ai mode; AI sees the column names and types, never the rows.]:datasetIdOrPath' \
|
|
1514
|
-
'--force[
|
|
1515
|
-
'(-u --update)'{-u,--update}'[Regenerate an existing mock in place
|
|
1516
|
-
'(-w --workspace)'{-w,--workspace}'[Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with --output, --force, or --update
|
|
1517
|
+
'--force[Replace the mock'\''s files if the target folder already holds a mock. A folder with other files and no mock is never written to.]' \
|
|
1518
|
+
'(-u --update)'{-u,--update}'[Regenerate an existing mock in place\: one in your repository by path (e.g. ./postman/mocks/orders), or one in Postman cloud by id. Without a source or --mode, it uses the ones the mock recorded (and an ai mock'\''s instructions). Cannot be used with --output.]:mockPathOrId:_files -g "*.json"' \
|
|
1519
|
+
'(-w --workspace)'{-w,--workspace}'[Save the mock to this Postman cloud workspace (by id) instead of your repository. Cannot be used with --output, --force, or --update <mockPath>; with --deploy it only picks the workspace, and with --update <cloudMockId> it names the workspace the mock is in.]:id' \
|
|
1517
1520
|
'--deploy[After generating, upload the mock to Postman cloud and deploy it to a live mock server (private by default). Uses --workspace, else the workspace linked to this project.]' \
|
|
1518
|
-
'--public[With --deploy, let anyone with the link reach the server (default\: callers need an API key)]' \
|
|
1519
|
-
'(-s --slug)'{-s,--slug}'[With --deploy, the short label used in the server'\''s web address]:slug' \
|
|
1521
|
+
'--public[With --deploy, let anyone with the link reach the server (default\: callers need an API key). Requires --deploy.]' \
|
|
1522
|
+
'(-s --slug)'{-s,--slug}'[With --deploy, the short label used in the server'\''s web address. Requires --deploy.]:slug' \
|
|
1520
1523
|
'--timeout[How long to wait for Postman to generate the mock, in milliseconds (default 75000).]:ms' \
|
|
1521
1524
|
'--api-key[Postman API key for anything Postman generates, saves or deploys (defaults to your `postman login` session)]:key:_files -g "*.(pem|crt|key)"' \
|
|
1522
1525
|
'--json[Print the result as machine-readable data instead of a summary\: the generated mock, or with --deploy the live server details]' \
|
|
@@ -1540,6 +1543,14 @@ _postman_mock_run() {
|
|
|
1540
1543
|
'*:mockIdOrPath:_files -g "*.json"'
|
|
1541
1544
|
}
|
|
1542
1545
|
|
|
1546
|
+
_postman_mock_stop() {
|
|
1547
|
+
_arguments \
|
|
1548
|
+
'--timeout[Seconds to wait for a graceful shutdown before force-killing the mock (default 15)]:seconds' \
|
|
1549
|
+
'--json[Print the result as machine-readable data]' \
|
|
1550
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
1551
|
+
'*:mockIdOrPath:_files -g "*.json"'
|
|
1552
|
+
}
|
|
1553
|
+
|
|
1543
1554
|
_postman_mock_push() {
|
|
1544
1555
|
_arguments \
|
|
1545
1556
|
'(-w --workspace)'{-w,--workspace}'[Postman cloud workspace to upload to, by id (defaults to the workspace already linked to this project)]:id' \
|
|
@@ -3401,6 +3412,7 @@ _postman_simulation() {
|
|
|
3401
3412
|
list) _postman_simulation_list ;;
|
|
3402
3413
|
get) _postman_simulation_get ;;
|
|
3403
3414
|
run) _postman_simulation_run ;;
|
|
3415
|
+
stop) _postman_simulation_stop ;;
|
|
3404
3416
|
push) _postman_simulation_push ;;
|
|
3405
3417
|
deploy) _postman_simulation_deploy ;;
|
|
3406
3418
|
update) _postman_simulation_update ;;
|
|
@@ -3418,6 +3430,7 @@ _postman_simulation_commands() {
|
|
|
3418
3430
|
'list:List the simulations in your repository or Postman cloud workspace'
|
|
3419
3431
|
'get:Show a simulation'\''s details using its .sim.yaml path if it lives in your repository, or its id if it lives in Postman cloud.'
|
|
3420
3432
|
'run:Serve a simulation'\''s mocks on one local port, routing each by its routeKey. Pass a .sim.yaml path (local) or a Postman simulation id (fetched and run locally).'
|
|
3433
|
+
'stop:Stop a simulation started with `postman simulation run` on this machine, and wait until it has exited and released its port.'
|
|
3421
3434
|
'push:Upload a simulation from your repository to Postman cloud (creates it the first time, updates it after). Its member mocks are pushed too.'
|
|
3422
3435
|
'deploy:Turn a simulation in Postman cloud into a live mock server others can call over the internet.'
|
|
3423
3436
|
'update:Change a simulation in place — rename it, switch routing, add mocks, or change a member'\''s address. Pass a .sim.yaml path (repository) or a Postman simulation id (cloud).'
|
|
@@ -3484,6 +3497,14 @@ _postman_simulation_run() {
|
|
|
3484
3497
|
'*:simIdOrPath:'
|
|
3485
3498
|
}
|
|
3486
3499
|
|
|
3500
|
+
_postman_simulation_stop() {
|
|
3501
|
+
_arguments \
|
|
3502
|
+
'--timeout[Seconds to wait for a graceful shutdown before force-killing the simulation (default 15)]:seconds' \
|
|
3503
|
+
'--json[Print the result as machine-readable data]' \
|
|
3504
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3505
|
+
'*:simIdOrPath:'
|
|
3506
|
+
}
|
|
3507
|
+
|
|
3487
3508
|
_postman_simulation_push() {
|
|
3488
3509
|
_arguments \
|
|
3489
3510
|
'(-w --workspace)'{-w,--workspace}'[Postman cloud workspace to upload to, by id (defaults to the workspace already linked to this project)]:id' \
|
|
@@ -3607,6 +3628,8 @@ _postman_webhook() {
|
|
|
3607
3628
|
requests) _postman_webhook_requests ;;
|
|
3608
3629
|
scripts) _postman_webhook_scripts ;;
|
|
3609
3630
|
forward) _postman_webhook_forward ;;
|
|
3631
|
+
environment) _postman_webhook_environment ;;
|
|
3632
|
+
auth) _postman_webhook_auth ;;
|
|
3610
3633
|
esac
|
|
3611
3634
|
;;
|
|
3612
3635
|
esac
|
|
@@ -3624,6 +3647,8 @@ _postman_webhook_commands() {
|
|
|
3624
3647
|
'requests:List, inspect, and replay requests received by a webhook.'
|
|
3625
3648
|
'scripts:Create or update scripts executed by a webhook.'
|
|
3626
3649
|
'forward:Forward incoming webhook requests to a local port.'
|
|
3650
|
+
'environment:Get or set the cloud environment associated with a webhook.'
|
|
3651
|
+
'auth:Get or set authentication for incoming webhook requests.'
|
|
3627
3652
|
)
|
|
3628
3653
|
_describe -t commands 'webhook command' sub
|
|
3629
3654
|
}
|
|
@@ -3770,6 +3795,104 @@ _postman_webhook_forward() {
|
|
|
3770
3795
|
'*:port:'
|
|
3771
3796
|
}
|
|
3772
3797
|
|
|
3798
|
+
_postman_webhook_environment() {
|
|
3799
|
+
local context state state_descr line
|
|
3800
|
+
typeset -A opt_args
|
|
3801
|
+
_arguments -C \
|
|
3802
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3803
|
+
'1: :_postman_webhook_environment_commands' \
|
|
3804
|
+
'*::arg:->args'
|
|
3805
|
+
case $state in
|
|
3806
|
+
args)
|
|
3807
|
+
case $words[1] in
|
|
3808
|
+
get) _postman_webhook_environment_get ;;
|
|
3809
|
+
set) _postman_webhook_environment_set ;;
|
|
3810
|
+
esac
|
|
3811
|
+
;;
|
|
3812
|
+
esac
|
|
3813
|
+
}
|
|
3814
|
+
|
|
3815
|
+
_postman_webhook_environment_commands() {
|
|
3816
|
+
local -a sub
|
|
3817
|
+
sub=(
|
|
3818
|
+
'get:Print the associated cloud environment ID.'
|
|
3819
|
+
'set:Associate a cloud environment ID with a webhook; local files are not supported.'
|
|
3820
|
+
)
|
|
3821
|
+
_describe -t commands 'environment command' sub
|
|
3822
|
+
}
|
|
3823
|
+
|
|
3824
|
+
_postman_webhook_environment_get() {
|
|
3825
|
+
_arguments \
|
|
3826
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
3827
|
+
'--api-key[Postman API key for CLI authentication]:key:_files -g "*.(pem|crt|key)"' \
|
|
3828
|
+
'--timeout[Request timeout in milliseconds (default\: 30000)]:ms' \
|
|
3829
|
+
'--json[Print the result as JSON]' \
|
|
3830
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3831
|
+
'*:webhookId:'
|
|
3832
|
+
}
|
|
3833
|
+
|
|
3834
|
+
_postman_webhook_environment_set() {
|
|
3835
|
+
_arguments \
|
|
3836
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
3837
|
+
'--api-key[Postman API key for CLI authentication]:key:_files -g "*.(pem|crt|key)"' \
|
|
3838
|
+
'--timeout[Request timeout in milliseconds (default\: 30000)]:ms' \
|
|
3839
|
+
'--json[Print the result as JSON]' \
|
|
3840
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3841
|
+
'*:environmentId:_files -g "*.json"'
|
|
3842
|
+
}
|
|
3843
|
+
|
|
3844
|
+
_postman_webhook_auth() {
|
|
3845
|
+
local context state state_descr line
|
|
3846
|
+
typeset -A opt_args
|
|
3847
|
+
_arguments -C \
|
|
3848
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3849
|
+
'1: :_postman_webhook_auth_commands' \
|
|
3850
|
+
'*::arg:->args'
|
|
3851
|
+
case $state in
|
|
3852
|
+
args)
|
|
3853
|
+
case $words[1] in
|
|
3854
|
+
get) _postman_webhook_auth_get ;;
|
|
3855
|
+
set) _postman_webhook_auth_set ;;
|
|
3856
|
+
esac
|
|
3857
|
+
;;
|
|
3858
|
+
esac
|
|
3859
|
+
}
|
|
3860
|
+
|
|
3861
|
+
_postman_webhook_auth_commands() {
|
|
3862
|
+
local -a sub
|
|
3863
|
+
sub=(
|
|
3864
|
+
'get:Show webhook authentication details without credential values.'
|
|
3865
|
+
'set:Set Basic or API key authentication, or disable authentication.'
|
|
3866
|
+
)
|
|
3867
|
+
_describe -t commands 'auth command' sub
|
|
3868
|
+
}
|
|
3869
|
+
|
|
3870
|
+
_postman_webhook_auth_get() {
|
|
3871
|
+
_arguments \
|
|
3872
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
3873
|
+
'--api-key[Postman API key for CLI authentication]:key:_files -g "*.(pem|crt|key)"' \
|
|
3874
|
+
'--timeout[Request timeout in milliseconds (default\: 30000)]:ms' \
|
|
3875
|
+
'--json[Print the result as JSON]' \
|
|
3876
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3877
|
+
'*:webhookId:'
|
|
3878
|
+
}
|
|
3879
|
+
|
|
3880
|
+
_postman_webhook_auth_set() {
|
|
3881
|
+
_arguments \
|
|
3882
|
+
'--type[Authentication type (choices\: "basic", "api-key", "none")]:type' \
|
|
3883
|
+
'--username[Basic auth username or variable reference]:username' \
|
|
3884
|
+
'--password[Basic auth password or variable reference]:password' \
|
|
3885
|
+
'--secret[Webhook API key value or variable reference]:secret' \
|
|
3886
|
+
'--source[Where incoming credentials are read (choices\: "headers", "query", default\: "headers")]:source' \
|
|
3887
|
+
'--key[Header or query parameter name (default\: Authorization for Basic, x-api-key for API key)]:key:_files -g "*.(pem|crt|key)"' \
|
|
3888
|
+
'(-w --workspace)'{-w,--workspace}'[Postman workspace ID (falls back to .postman/resources.yaml or .postman/config.json)]:workspaceId' \
|
|
3889
|
+
'--api-key[Postman API key for CLI authentication]:key:_files -g "*.(pem|crt|key)"' \
|
|
3890
|
+
'--timeout[Request timeout in milliseconds (default\: 30000)]:ms' \
|
|
3891
|
+
'--json[Print the result as JSON]' \
|
|
3892
|
+
'(-h --help)'{-h,--help}'[display help for command]' \
|
|
3893
|
+
'*:webhookId:'
|
|
3894
|
+
}
|
|
3895
|
+
|
|
3773
3896
|
# When loaded via fpath + compinit, the file body becomes the function body of
|
|
3774
3897
|
# `_postman`. In that case `funcstack[1]` is `_postman` and we must actually
|
|
3775
3898
|
# invoke the completion. When sourced directly, this is a no-op — `_postman`
|