Skip to content

[improvement] Use new picocli lib for CLI#91

Merged
ferozco merged 3 commits into
developfrom
fo/new-cli
Oct 22, 2018
Merged

[improvement] Use new picocli lib for CLI#91
ferozco merged 3 commits into
developfrom
fo/new-cli

Conversation

@ferozco
Copy link
Copy Markdown
Contributor

@ferozco ferozco commented Oct 22, 2018

Before this PR

Previously, conjure-java failed on unknown command line arguments and had very poor feedback when used as a CLI.

After this PR

We have migrated to use picocli which gives us a more declarative API for defining command line args, rich usage docs and support for unknown command line options.

ex:

Usage: conjure-java generate [-hV] [--jersey] [--jerseyBinaryAsResponse] [--objects]
                             [--requireNotNullAuthAndBodyParams] [--retrofit] [--retrofitCompletableFutures]
                             [--retrofitListenableFutures] <input> <output>
Generate Java bindings for a Conjure API
      <input>      Path to the input IR file
      <output>     Output directory for generated source
      --jersey     Generate jax-rs annotated interfaces for client or server-usage
      --jerseyBinaryAsResponse
                   Generate jersey interfaces which return Response instead of StreamingOutput
      --objects    Generate POJOs for Conjure type definitions
      --requireNotNullAuthAndBodyParams
                   Generate @NotNull annotations for AuthHeaders and request body params
      --retrofit   Generate retrofit interfaces for streaming/async clients
      --retrofitCompletableFutures
                   Generate retrofit services which return Java8 CompletableFuture instead of OkHttp Call
      --retrofitListenableFutures
                   Generate retrofit services which return Guava ListenableFuture instead of OkHttp Call
  -h, --help       Show this help message and exit.
  -V, --version    Print version information and exit.

@ferozco ferozco merged commit 3327f79 into develop Oct 22, 2018
@ferozco ferozco deleted the fo/new-cli branch October 22, 2018 21:17
carterkozak pushed a commit to carterkozak/conjure-java that referenced this pull request Dec 24, 2018
###### _excavator_ is a bot for automating changes across repositories.

Changes produced by the versions-props/upgrade-all check.

{runtimeCheckDesc}
To enable or disable this check, please contact the maintainers of Excavator.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants