swagger-api / swagger-api/swagger-codegen

Update configuration, launcher interface

Open
#6,041 2 comments 0 reactions 1 assignee View on GitHub

Nobody has claimed this yet.

Enhancement: General Feature: OAS 3.0 spec support
Dominant language
Mustache
Stars
17.8k
Forks
6k
PR merge metrics
No merged PRs in 30d

Description

As the codegen model has evolved, we have a challenge with the configuration interface. Specifically with the introduction of the airline toolkit for parsing the CLI options, we've ended up with a bit of an abomination of arguments and system properties, all with the ability to be overridden with a configuration file.

The challenge (and why I pointed out airline) is that different targets will need have different needs for configuration options. There is no package in javascript, for example, but we always have a set of common needs, such as reading the specification from a specific location, etc.

I would like to redo the launcher aspect of codegen to include the following:

  • Removal of the strict, annotation-based airline library
  • Addition of another CLI parsing library that allows for short and extended args (-h and --host, for example)
  • Standardization of some core arguments to parse. These will be constant across all targets
  • A clear extension mechanism for adding new arguments for a specific library with descriptions and helpful information
  • A method to load the arguments from a single JSON or YAML file
  • Removal of all system properties when running the codegen. These are creating issues with CI tools and are just ugly

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.