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

C# generated illegal field name #1950

Closed
IvanJosipovic opened this issue Feb 12, 2019 · 2 comments
Closed

C# generated illegal field name #1950

IvanJosipovic opened this issue Feb 12, 2019 · 2 comments

Comments

@IvanJosipovic
Copy link

When converting the Kubernetes swagger.json to c# client, a field is generated with an illegal name.

Swagger.json
https://raw.githubusercontent.com/kubernetes/kubernetes/master/api/openapi-spec/swagger.json

NSwag toolchain v12.0.13.0 (NJsonSchema v9.13.17.0 (Newtonsoft.Json v11.0.0.0))
Default settings

    /// <summary>JSONSchemaProps is a JSON-Schema following Specification Draft 4 (http://json-schema.org/).</summary>
    [System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "9.13.17.0 (Newtonsoft.Json v11.0.0.0)")]
    public partial class JSONSchemaProps 
    {   
        [Newtonsoft.Json.JsonProperty("$schema", Required = Newtonsoft.Json.Required.Default, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
        public string $schema { get; set; }
    
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