Some bug fixes in generation of java files
This commit is contained in:
parent
f415ad92f1
commit
199618cd8e
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* This code is autogenerated by Touch Instinct tools
|
||||
*/
|
||||
package {{ packageName }};
|
||||
package {{ packageName }}.api;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
import android.support.annotation.Nullable;
|
||||
|
|
@ -13,6 +13,7 @@ import com.bluelinelabs.logansquare.annotation.JsonObject;
|
|||
import java.io.IOException;
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
|
|
@ -20,6 +21,8 @@ import java.util.Collections;
|
|||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import ru.touchin.templates.ApiModel;
|
||||
import ru.touchin.roboswag.core.utils.ObjectUtils;
|
||||
import ru.touchin.templates.logansquare.LoganSquareJsonModel;
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/**
|
||||
* This code is autogenerated by Touch Instinct tools
|
||||
*/
|
||||
package {{ packageName }};
|
||||
package {{ packageName }}.api;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
/**
|
||||
* This code is autogenerated by Touch Instinct tools
|
||||
*/
|
||||
package {{ packageName }};
|
||||
package {{ packageName }}.api;
|
||||
|
||||
import android.support.annotation.NonNull;
|
||||
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ new HashMap<>({{ fieldName }})
|
|||
{%- if optional -%}
|
||||
{{ object }}.{{ fieldName }} = new JsonOptional({{- self.formatNullableValueSetter(fieldName, valueType, nullable) -}});
|
||||
{%- elseif nullable -%}
|
||||
{{ object }}.{{ fieldName }} = self.formatNullableValueSetter(fieldName, valueType, nullable);
|
||||
{{ object }}.{{ fieldName }} = {{ self.formatNullableValueSetter(fieldName, valueType, nullable)}};
|
||||
{%- else -%}
|
||||
{{ object }}.{{ fieldName }} = {{ fieldName }};
|
||||
{%- endif -%}
|
||||
|
|
@ -119,7 +119,7 @@ Collections.unmodifiableMap({{ fieldName }})
|
|||
{%- if optional -%}
|
||||
return new JsonOptional({{- self.formatNullableValueGetter(fieldName, valueType, nullable) -}});
|
||||
{%- elseif nullable -%}
|
||||
return self.formatNullableValueGetter(fieldName, valueType, nullable);
|
||||
return {{ self.formatNullableValueGetter(fieldName, valueType, nullable) }};
|
||||
{%- else -%}
|
||||
return this.{{ fieldName }};
|
||||
{%- endif -%}
|
||||
|
|
|
|||
Loading…
Reference in New Issue