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]: The generated C# service code should not contain 'Copyright (c) Microsoft Corporation' #5490

Open
4 tasks done
lirenhe opened this issue Jan 6, 2025 · 0 comments
Open
4 tasks done
Assignees

Comments

@lirenhe
Copy link
Member

lirenhe commented Jan 6, 2025

Describe the bug

I found we are adding the following line in both of the generated code and server stub code

https://github.com/allenjzhang/typespec-e2e-demo/blob/a666c27152e2b9fe65250161c80b444467b090e4/todoApp/servers/aspnet/generated/lib/ArrayConstraintAttribute.cs#L1

I don't think we shall add the following line as they are targeting for 3rd party usage.

// Copyright (c) Microsoft Corporation. All rights reserved.

Reproduction

  1. Use the following config in tspconfig.yaml

emit:

  • "@typespec/http-server-csharp"
    options:
    "@typespec/http-server-csharp":
    emitter-output-dir: "{project-root}/../servers/aspnet/generated"
  1. Run tsp compile to generate the c# service code

Expected: The generated code should not contain Microsoft related copy right.
Actual: It shows the code above.

Checklist

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants