microsoft / microsoft/typespec

[Optimization] Specify the path to the generated code when `Generate from TypeSpec`

Open
#5,666 1 comment 0 reactions 0 assignees View on GitHub
ide
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

**Description:**

When `Generate from TypeSpec`, users cannot specify the path for code generation in the UI interface, and there is no documentation explaining how to change the code generation path in the `tspconfig.yaml` file.

**Repro steps:**

1. Install the typespec extension.
2. Install @typespec/compiler: `npm install -g @typespec/compiler`.
3. Typing `>TypeSpec: Generate from TypeSpec` and Click the command.
4. Choose a project.
5. Select Emitter Type.
6. Select a language.
7. Select an emitter for code generation.

**Environment:**

- `TypeSpec for VS Code` extension version: 0.64.0
- `TypeSpec compiler/CLI` version: 0.64.0
- OS: Windows, Linux

**Suggestion:**

Choose one of the following two suggestions:
1. After select the emitter type and language, can add a step to interact with the UI interface of `select the path for code generation, the default is the project path`.
2. There is a document explaining how to modify the code generation path in the `tspconfig.yaml` file.

@RodgeFu , @chunyu3 and @msyyc for notification.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.