Beispiel #1
0
        public override void Configure(Funq.Container container)
        {
            ServiceStack.Text.JsConfig.EmitCamelCaseNames = true;

            Plugins.Add(new SwaggerFeature());

            // Disabling Html seems to make it so browsers can't hit the service.
            const Feature DisableFeatures = Feature.Xml | Feature.Jsv | Feature.Csv | Feature.Soap; // | Feature.Html;

            SetConfig(new EndpointHostConfig
            {
                EnableFeatures     = Feature.All.Remove(DisableFeatures),
                DefaultContentType = ContentType.Json
            });

            DtoMapper.Init();
        }