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

Code not generated when SubProperty and/or Enum #4858

Open
Kris-I opened this issue Apr 15, 2024 · 0 comments
Open

Code not generated when SubProperty and/or Enum #4858

Kris-I opened this issue Apr 15, 2024 · 0 comments

Comments

@Kris-I
Copy link

Kris-I commented Apr 15, 2024

Hello,

I have these classes :

public class PagingDto
{
    public int Skip { get; set; }
    public int Take { get; set; }
    List<SortDescriptorDto> Sorts { get; set; } = new();
}
public class SortDescriptorDto
{
    public string Property { get; set; }
    public SortOrderDto? SortOrder { get; set; }
}
public enum SortOrderDto
{
    Ascending,
    Descending
}

In the générated code there are only the properties Skip and Take from PagingDto I get only this :

[System.CodeDom.Compiler.GeneratedCode("NJsonSchema", "14.0.7.0 (NJsonSchema v11.0.0.0 (Newtonsoft.Json v13.0.0.0))")]
public partial class PagingDto
{
        [Newtonsoft.Json.JsonProperty("skip", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
        public int Skip { get; set; } = default!;

        [Newtonsoft.Json.JsonProperty("take", Required = Newtonsoft.Json.Required.DisallowNull, NullValueHandling = Newtonsoft.Json.NullValueHandling.Ignore)]
        public int Take { get; set; } = default!;

    }

SortOrder and SortDescriptorDto are not generated.

Thanks,

@Kris-I Kris-I changed the title Code not generated when SuvProperty and/or Enum Code not generated when SubProperty and/or Enum Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant