Exemplo n.º 1
0
        void ConfigureGenerators()
        {
            _commandDocumentGenerator.Configure(
                new Info
            {
                Title = "Commands",
            },
                "/api/Dolittle/Debugging/Swagger/Commands",
                "POST",
                new Dictionary <string, Response>
            {
                {
                    "200",
                    new Response
                    {
                        Description = "Result of command handling"
                    }
                },
            },
                _ => true);

            _eventDocumentGenerator.Configure(
                new Info
            {
                Title = "Events",
            },
                "/api/Dolittle/Debugging/Swagger/Events",
                "POST",
                new Dictionary <string, Response>
            {
                {
                    "200",
                    new Response
                    {
                        Description = "Event was successfully injected into the Event Store"
                    }
                },
            },
                _ => true,
                CreateFormParameterWithNameAndType("EventSourceId", "formData", typeof(EventSourceId)));

            _queryDocumentGenerator.Configure(
                new Info
            {
                Title = "Queries",
            },
                "/api/Dolittle/Debugging/Swagger/Queries",
                "GET",
                new Dictionary <string, Response>
            {
                {
                    "200",
                    new Response
                    {
                        Description = "Result of query execution"
                    }
                },
            },
                _ => !_.Name.Equals("Query", StringComparison.InvariantCulture));
        }