Files
alfresco-community-repo/packaging/tests/tas-restapi/src/main/resources/rest-model.ftl
Tom Page 5dc3424fe2 ACS-3280 Move assertThat() and and() to defaults in interface. (#232)
* ACS-3280 Move assertThat() and and() to defaults in interface.

Update ftl so that any future generated models will use the defaults too.

* ACS-3280 Revert changes to collections.

They have a different hierarchy and so need a different refactor.

* ACS-3280 Make RestCompanyModel work the same as all the other models.
2022-08-15 15:01:03 +01:00

56 lines
1.1 KiB
Plaintext

package org.alfresco.rest.model;
import java.util.List;
import org.alfresco.rest.core.IRestModel;
import org.alfresco.utility.model.TestModel;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* Generated by '${author}' on '${date}' from '${yamlTitle}' swagger file
* Generated from '${yamlTitle}' swagger file
* Base Path {@linkplain ${yamlBasePath}}
*/
public class ${name} extends TestModel implements IRestModel<${name}>
{
@JsonProperty(value = "entry")
${name} model;
@Override
public ${name} onModel()
{
return model;
}
<#if properties??>
<#list properties as p>
<#if p.getDescription()??>
/**
${p.getDescription()}
*/
</#if>
<#if p.isRequired()==true>
@JsonProperty(required = true)
</#if>
private ${p.getType()} ${p.getName()};
</#list>
</#if>
<#if properties??>
<#list properties as p>
public ${p.getType()} get${p.getNameCapitalized()}()
{
return this.${p.getName()};
}
public void set${p.getNameCapitalized()}(${p.getType()} ${p.getName()})
{
this.${p.getName()} = ${p.getName()};
}
</#list>
</#if>
}