RicoSuter/NSwag

Generated CSharp Client contains weird characters

Open

#935 创建于 2017年9月11日

在 GitHub 查看
 (7 评论) (0 反应) (0 负责人)C# (1,189 fork)batch import
help wantedtype: enhancement

仓库指标

Star
 (6,291 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Reproduction:

Behavior: The resulting code is syntactically wrong. Line 9816 uses french quotation marks for a generic type definition:

public partial class PaginatedResult«Submission» : System.ComponentModel.INotifyPropertyChanged

Expected Behavior:

    public partial class PaginatedResult<Submission> : System.ComponentModel.INotifyPropertyChanged

Same behavior can be reproduced using the API through .net itself:

SwaggerDocument document = await SwaggerDocument.FromUrlAsync("https://ps-reg-demo.chemaxon.com/RegistryCxn/rest/api/doc");
SwaggerToCSharpClientGeneratorSettings settings = new SwaggerToCSharpClientGeneratorSettings();
SwaggerToCSharpClientGenerator generator = new SwaggerToCSharpClientGenerator(document, settings);
string code = generator.GenerateFile();

贡献者指南