using System.Collections.Generic;
using Newtonsoft.Json.Schema;
public static void Main()
var jsonSchemaGenerator = new JsonSchemaGenerator();
var myType = typeof(ChangeOfLiabilityDetails);
var schema = jsonSchemaGenerator.Generate(myType);
schema.Title = myType.Name;
Console.WriteLine(schema);
public class ChangeOfLiabilityDetails
public ChangeOfLiabilityDetails()
RulesForLiability = new RulesForLiability();
OccupancyAndAccountDetails = new OccupancyAndAccountDetails();
public int? OriginalOccupancyID { get; set; }
public int OriginalPropertyID { get; set; }
public int? OriginalPropertyValuationRequestID { get; set; }
public RulesForLiability RulesForLiability { get; set; }
public OccupancyAndAccountDetails OccupancyAndAccountDetails { get; set; }
public class RulesForLiability
public bool Confirmed { get; set; }
public string Q_OCCP { get; set; }
public string Q_OTHR { get; set; }
public string Q_RENT { get; set; }
public string Q_HMOC { get; set; }
public string Q_LEAS { get; set; }
public string Q_RFRQ { get; set; }
public string ReasonLiableLK { get; set; }
public string OccupancyStatusLK { get; set; }
public string AccountTypeLK { get; set; }
public class OccupancyAndAccountDetails
public bool Confirmed { get; set; }
public bool HasTheOwnerConfirmedRightOfResidency { get; set; }
public DateTime? NewOccupancyStartDate { get; set; }
public DateTime? NewOccupancyEndDate { get; set; }
public bool CreateNewAccount { get; set; }
public string NewAccountName { get; set; }
public int? ExistingAccountID { get; set; }
public List<PersonOrOrganisationRole> LiableRatepayers { get; set; }
public List<ChangeOfLiabilityPropertyOwner> PropertyOwners { get; set; }
public class PersonOrOrganisationRole
public int PartyID { get; set; }
public int? CustomerRef { get; set; }
public string Name { get; set; }
public string RoleLK { get; set; }
public class ChangeOfLiabilityPropertyOwner
public int PartyID { get; set; }
public int? CustomerRef { get; set; }
public string Name { get; set; }
public string Address { get; set; }
public DateTime StartDate { get; set; }