Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: New emitter options in init template doesn't work well with the config one #5714

Open
4 tasks done
timotheeguerin opened this issue Jan 23, 2025 · 0 comments
Open
4 tasks done
Labels
bug Something isn't working needs-area

Comments

@timotheeguerin
Copy link
Member

timotheeguerin commented Jan 23, 2025

Describe the bug

The config always override the emitters option, I think they should merge in some way.

Reproduction

tsp init https://gist.githubusercontent.com/timotheeguerin/addfb7e137bd41abaf0b80d42ad82e64/raw/5b7f59e12a4c046705e50d4fa7f1e6fef14cbebe/scafold.json

Template

{
  "rest": {
    "title": "Generic REST API",
    "description": "Create a project representing a generic REST API",
    "compilerVersion": "0.64.0",
    "config": {
      "emit": [
        "@typespec/openapi3"
      ]
    },
    "emitters": {
      "@typespec/openapi3": {
        "selected": true,
        "options": {
          "emitter-output-dir": "{output-dir}/schema"
        }
      },
      "@typespec/http-client-csharp": {
        "options": {
          "emitter-output-dir": "{output-dir}/clients/csharp"
        }
      }
    }
  }
}

Checklist

@timotheeguerin timotheeguerin added the bug Something isn't working label Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-area
Projects
None yet
Development

No branches or pull requests

1 participant