Skip to content

CLI help for export-api-def command does not show --json option #12

@crandmck

Description

@crandmck

Bug or feature request

  • Bug
  • Feature request

Description

CLI help lists --json option in an example, but not in list of Options. It should be added to the Options as well.

lb export-api-def -h
Usage:
  lb export-api-def [options]

Options:
  -h,   --help          # Print the generator's options and usage
        --skip-cache    # Do not remember prompt answers             Default: false
        --skip-install  # Do not automatically install dependencies  Default: false
  -o,   --output        # Name/Full path to the output file.

Description:
  Generate Swagger API definitions for LoopBack applications.

Example:

  lb export-api-def [--json]

  This will output the api definitions to stdout.
  Use option --json to display in JSON format, otherwise it defaults to YAML.

  lb export-api-def [--o outputFile]

  This will output the api definitions to the specified location. Based on the
  file extension, it will print to yaml or json format.

Suggested fix:

Add the following to the Options section:

--json           # Generate API definitions in JSON format instead of YAML

While we're at it, can we please fix these spelling mistakes / inconsistencies:

This will output the api definitions to stdout.
  Use option --json to display in JSON format, otherwise it defaults to YAML.

Should be

This will output the API definitions to stdout.
  Use option --json to display in JSON format, otherwise it defaults to YAML.

And

This will output the api definitions to the specified location. Based on the
  file extension, it will print to yaml or json format.

Should be

This will output the API definitions to the specified location. Based on the
  file extension, it will print to YAML or JSON format.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions