Exemplo n.º 1
0
 public SwaggerProvider(
     IApiDescriptionGroupCollectionProvider apiDescriptionsProvider,
     ISchemaRegistryFactory schemaRegistryFactory,
     SwaggerProviderOptions options = null)
 {
     _apiDescriptionsProvider = apiDescriptionsProvider;
     _schemaRegistryFactory   = schemaRegistryFactory;
     _options = options ?? new SwaggerProviderOptions();
 }
Exemplo n.º 2
0
 public SwaggerProvider(
     IApiDescriptionGroupCollectionProvider apiDescriptionsProvider,
     ISchemaRegistryFactory schemaRegistryFactory,
     SwaggerProviderOptions options = null)
 {
     _apiDescriptionsProvider = apiDescriptionsProvider;
     _schemaRegistryFactory = schemaRegistryFactory;
     _options = options ?? new SwaggerProviderOptions();
 }
Exemplo n.º 3
0
        private SwaggerProvider Subject(
            Action <FakeApiDescriptionGroupCollectionProvider> setupApis = null,
            Action <SwaggerProviderOptions> configure = null)
        {
            var apiDescriptionsProvider = new FakeApiDescriptionGroupCollectionProvider();

            if (setupApis != null)
            {
                setupApis(apiDescriptionsProvider);
            }

            var options = new SwaggerProviderOptions();

            if (configure != null)
            {
                configure(options);
            }

            return(new SwaggerProvider(
                       apiDescriptionsProvider,
                       new SchemaRegistryFactory(new JsonSerializerSettings(), new SchemaRegistryOptions()),
                       options
                       ));
        }
Exemplo n.º 4
0
        private SwaggerProvider Subject(
            Action<FakeApiDescriptionGroupCollectionProvider> setupApis = null,
            Action<SwaggerProviderOptions> configure = null)
        {
            var apiDescriptionsProvider = new FakeApiDescriptionGroupCollectionProvider();
            if (setupApis != null) setupApis(apiDescriptionsProvider);

            var options = new SwaggerProviderOptions();
            if (configure != null) configure(options);

            return new SwaggerProvider(
                apiDescriptionsProvider,
                new SchemaRegistryFactory(new JsonSerializerSettings(), new SchemaRegistryOptions()),
                options
            );
        }