mirror of
https://github.com/HenkKalkwater/harbour-sailfin.git
synced 2025-09-04 01:42:44 +00:00
Make model code compileable
This disables some application level logic, but I'm going to rewrite that using Lager anyway.
This commit is contained in:
parent
0358418926
commit
b9b08ab384
551 changed files with 8943 additions and 8809 deletions
|
@ -72,9 +72,9 @@ string[string] compatAliases;
|
|||
string[string] memberAliases;
|
||||
|
||||
static this() {
|
||||
compatAliases["BaseItemDto"] = "Item";
|
||||
/*compatAliases["BaseItemDto"] = "Item";
|
||||
compatAliases["UserDto"] = "User";
|
||||
compatAliases["UserItemDataDto"] = "UserData";
|
||||
compatAliases["UserItemDataDto"] = "UserData";*/
|
||||
|
||||
memberAliases["id"] = "jellyfinId";
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ void generateFileForSchema(ref string name, ref const Node scheme, Node allSchem
|
|||
writeHeaderPostamble(headerFile, CPP_NAMESPACE_DTO, name);
|
||||
|
||||
writeImplementationPreamble(implementationFile, CPP_NAMESPACE_DTO, name);
|
||||
writeEnumImplementation(implementationFile, name);
|
||||
writeEnumImplementation(implementationFile, name, values[]);
|
||||
writeImplementationPostamble(implementationFile, CPP_NAMESPACE_DTO, name);
|
||||
}
|
||||
if (scheme["type"].as!string == "object" && "properties" in scheme) {
|
||||
|
@ -415,9 +415,16 @@ void writeEnumHeader(File output, string name, string[] values, string doc = "")
|
|||
output.writeln(render!(import("enum_header.hbs"), Controller)(controller));
|
||||
}
|
||||
|
||||
void writeEnumImplementation(File output, string name) {
|
||||
string className = name.applyCasePolicy(OPENAPI_CASING, CPP_CLASS_CASING);
|
||||
output.writefln("%sClass::%sClass() {}", name, name);
|
||||
void writeEnumImplementation(File output, string name, string[] values) {
|
||||
class Controller {
|
||||
string className;
|
||||
string[] values;
|
||||
string supportNamespace = namespaceString!CPP_NAMESPACE_SUPPORT;
|
||||
}
|
||||
Controller controller = new Controller();
|
||||
controller.className = name.applyCasePolicy(OPENAPI_CASING, CPP_CLASS_CASING);
|
||||
controller.values = values;
|
||||
output.writeln(render!(import("enum_implementation.hbs"), Controller)(controller));
|
||||
}
|
||||
|
||||
// Common
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue