public static SchemaDto FromSchema(ISchemaEntity schema, Resources controller) { var result = new SchemaDto(); SimpleMapper.Map(schema, result); SimpleMapper.Map(schema.SchemaDef, result); SimpleMapper.Map(schema.SchemaDef.Properties, result.Properties); result.CreateLinks(controller); return(result); }
public static SchemaDto FromSchema(ISchemaEntity schema, ApiController controller, string app) { var result = new SchemaDto(); SimpleMapper.Map(schema, result); SimpleMapper.Map(schema.SchemaDef, result); SimpleMapper.Map(schema.SchemaDef.Properties, result.Properties); result.CreateLinks(controller, app); return(result); }
public static SchemaDto FromSchema(ISchemaEntity schema) { var response = new SchemaDto { Properties = new SchemaPropertiesDto() }; SimpleMapper.Map(schema, response); SimpleMapper.Map(schema.SchemaDef, response); SimpleMapper.Map(schema.SchemaDef.Properties, response.Properties); return(response); }