
java.nested_class.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-kotlin-schema-codegen Show documentation
Show all versions of json-kotlin-schema-codegen Show documentation
Code generation from JSON Schema to Kotlin or Java
{{#schema}}{{#description}} /**
* {{&safeDescription}}
*/
{{/description}}{{/schema}}{{#isObject}} public static class {{&className}} {
{{#properties}} private final {{>type}} {{&javaName}};
{{#last}}
{{/last}}{{/properties}}{{#numberOfProperties}} public {{&className}}(
{{#properties}} {{>type}} {{&javaName}}{{^last}},{{/last}}
{{/properties}} ) {
{{#properties}}{{^isPrimitive}}{{^nullable}} if ({{&javaName}} == null)
{{>tniae}}("Must not be null - {{&javaName}}");
{{/nullable}}{{/isPrimitive}}{{>validations}} this.{{&javaName}} = {{&javaName}};
{{/properties}} }
{{/numberOfProperties}}{{>getters}}{{>equals}}
{{>hashcode}}
}
{{/isObject}}{{#isString}} public enum {{&className}} {
{{#enumValues}} {{&.}}{{^last}},{{/last}}
{{/enumValues}} }
{{/isString}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy