This repository has been archived by the owner on Nov 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 280
New dredd init & config & CLI #1101
Labels
Epic: configuration
Command line options, dredd init, dredd.yml
Comments
honzajavorek
added
the
Epic: configuration
Command line options, dredd init, dredd.yml
label
Aug 6, 2018
|
|
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
This is a proposal on how to tackle the dredd init + dredd.yml epic.
Parts of Dredd affected
Requirements
dredd init
dredd init
#320dredd init
--names
--names requires server address #563Solutions
New CLI
Clearly distinguish commands, arguments, and options. Notes:
dredd init
,--config
indicates where to save the file,--init
doesn't exist, remove-i
dredd names <api description filename - or - url> <api description filename - or - url> ...
(formerly--names
)dredd <api description filename - or - url> <server url>
dredd <api description filename - or - url - or apiary subdomain/url> <server url>
overrides thedredd.yml
valuesdredd --api-description=...
overrides thedredd.yml
value--api-description=...
is instead of--path
dredd --server-url=...
overrides thedredd.yml
valuedredd --version
=dredd version
(alias)dredd --help
is command-specific, e.g.dredd names --help
dredd --hookfiles=
changes todredd --hooks=
--language
is not required if it can be detected from--hooks=
files extensions, otherwise there should be aliases (python = python-dredd-hooks binary etc.) or it is treated as a custom hooks handler (works now, but not documented)--language
is resolved asnodejs
orjavascript
orjs
, otherwise it should fail--server-wait
without--server
--details, -d
does and whether anyone uses itDownloading API description from Apiary
-j/--custom
with custom configuration andapiaryApiName
withapiaryApiKey
properties, whereapiaryApiName
is a unique identifier of the API project in Apiary--custom
completely to user-specific stuff and pass it on to hooks (see 7bffde7#r29826481) - Access Custom options in Hooks #215Dredd could accept the identifier instead of the API description file name or URL:this is dangerous and non-deterministic and we would hate ourselves for such design decisiondredd myapi http://localhost:4000
--apiary-api-name
--apiary-api-key
option instead ofapiaryApiKey
and acceptAPIARY_API_KEY=
env var as well (to work together with the Apiary CLI)$ dredd init --apiary-api-name=myapi --apiary-api-key=9a5.... --reporter=apiary
The text was updated successfully, but these errors were encountered: