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

[http-server-csharp] tuple types are not properly generated #5000

Closed
ArcturusZhang opened this issue Nov 7, 2024 · 1 comment · Fixed by #5140
Closed

[http-server-csharp] tuple types are not properly generated #5000

ArcturusZhang opened this issue Nov 7, 2024 · 1 comment · Fixed by #5140
Assignees
Labels

Comments

@ArcturusZhang
Copy link
Member

ArcturusZhang commented Nov 7, 2024

I copied one of our test projects in csharp client generator, it has an auth model:

model AuthFlow {
    type: OAuth2FlowType.clientCredentials;
    tokenUrl: "https://api.example.com/oauth2/token";
    refreshUrl: "https://api.example.com/oauth2/refresh";
    scopes: ["https://api.example.com/.default"];
}

This is generated incorrectly:

    ///<summary>
    /// The auth flow model
    ///</summary>
    public partial class AuthFlow
    {
        public Type { get; set; }

    public string TokenUrl { get; } = "https://api.example.com/oauth2/token";

    public string RefreshUrl { get; } = "https://api.example.com/oauth2/refresh";

    public {
        "https://api.example.com/.default"
      }
Scopes { get; set; }

    
    }

and this piece of code (the Scopes part) cannot compile.

@markcowl
Copy link
Contributor

Needs to use the same treatment for item type properties as singular type properties

@markcowl markcowl added this to the [2024] December milestone Nov 11, 2024
@markcowl markcowl self-assigned this Nov 19, 2024
markcowl added a commit to markcowl/cadl that referenced this issue Nov 20, 2024
markcowl added a commit to markcowl/cadl that referenced this issue Nov 21, 2024
markcowl added a commit to markcowl/cadl that referenced this issue Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants