Exemple #1
0
        public void CreateClass()
        {
            Welcome model = new Welcome();

            model.Namespace = new List <object>();
            ModelHelpers.CreateSettings(ref model);
            ModelHelpers.CreateHeader(ref model,
                                      comment: "Virtual Society - Zorgtoeslag",
                                      title: "Zorgtoeslag",
                                      author: "Sjef van Leeuwen", version: "0.1", description: "API configuratie voor het berekenen van zorgtoeslag");
            ModelHelpers.CreateClass(ref model, "Zorgtoeslag", "Zorgtoeslag");
            ModelHelpers.CreateClassAttribute(ref model, "euro", "Euro");
            ModelHelpers.CreateClassAttribute(ref model, "double", "double");
            ModelHelpers.CreateDataType(ref model, "dataTypeProperty1");
            ModelHelpers.CreateDataType(ref model, "dataTypeProperty3");
            ModelHelpers.CreatePropertyAttribute(ref model, "dataTypeProperty1", "drempelinkomen", "Zorgtoeslag", "euro");
            ModelHelpers.CreatePropertyAttribute(ref model, "dataTypeProperty3", "woonlandfactor", "Zorgtoeslag", "double");


            File.WriteAllText("./create-class.json", model.ToJson());
        }