Skip to content

Emitter usage

  1. Via the command line
Terminal window
tsp compile . --emit=@typespec/http-client-java
  1. Via the config
emit:
- "@typespec/http-client-java"

The config can be extended with options as follows:

emit:
- "@typespec/http-client-java"
options:
"@typespec/http-client-java":
option: value

Type: absolutePath

Defines the emitter output directory. Defaults to {output-dir}/@typespec/http-client-java See Configuring output directory for more info

Type: object { name, company, link, header, description }

License information for the generated client code.

Properties:

NameTypeDefaultDescription
namestringLicense name. The config is required. Predefined license are: MIT License, Apache License 2.0, BSD 3-Clause License, MPL 2.0, GPL-3.0, LGPL-3.0. For other license, you need to configure all the other license config manually.
companystringLicense company name. It will be used in copyright sentences.
linkstringLicense link.
headerstringLicense header. It will be used in the header comment of generated client code.
descriptionstringLicense description. The full license text.

Type: object { generate-code-model, debug, loglevel, java-temp-dir, profile }

Developer options for http-client-java emitter.

Properties:

NameTypeDefaultDescription
generate-code-modelbooleanGenerate intermittent ‘code-model.yaml’ file in output directory.
debugbooleanEnable Java remote debug on port 5005.
loglevel"off" | "debug" | "info" | "warn" | "error"Log level for Java logging. Default is ‘warn’.
java-temp-dirstringTemporary working directory for Java code generator.
profilebooleanEnable performance profiling.