예제 #1
0
        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);
        }
예제 #2
0
        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);
        }
예제 #3
0
        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);
        }