예제 #1
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenApiAppSettingsBase"/> class.
        /// </summary>
        protected OpenApiAppSettingsBase()
            : base()
        {
            var basePath = this.GetBasePath();
            var host     = HostJsonResolver.Resolve(this.Config, basePath);
            var options  = OpenApiConfigurationResolver.Resolve(Assembly.GetExecutingAssembly());

            this.OpenApiInfo    = options.Info;
            this.SwaggerAuthKey = this.Config.GetValue <string>("OpenApi:ApiKey");

            this.HttpSettings = host.GetHttpSettings();
        }
예제 #2
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenApiAppSettingsBase"/> class.
        /// </summary>
        protected OpenApiAppSettingsBase()
            : base()
        {
            var basePath = this.GetBasePath();
            var host     = HostJsonResolver.Resolve(this.Config, basePath);
            var openapi  = OpenApiSettingsJsonResolver.Resolve(this.Config, basePath);

            this.OpenApiInfo    = OpenApiInfoResolver.Resolve(host, openapi, this.Config);
            this.SwaggerAuthKey = this.Config.GetValue <string>("OpenApi:ApiKey");

            this.HttpSettings = host.GetHttpSettings();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenApiHttpTrigger"/> class.
        /// </summary>
        public OpenApiHttpTriggerContext()
        {
            var host = HostJsonResolver.Resolve();

            this.OpenApiInfo  = OpenApiInfoResolver.Resolve(host);
            this.HttpSettings = host.GetHttpSettings();

            var filter = new RouteConstraintFilter();
            var helper = new DocumentHelper(filter);

            this.Document  = new Document(helper);
            this.SwaggerUI = new SwaggerUI();
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenApiHttpTrigger"/> class.
        /// </summary>
        public OpenApiHttpTriggerContext()
        {
            var host = HostJsonResolver.Resolve();

            this.OpenApiConfiguration = OpenApiConfigurationResolver.Resolve(this.GetExecutingAssembly());
            this.HttpSettings         = host.GetHttpSettings();

            var filter   = new RouteConstraintFilter();
            var acceptor = new OpenApiSchemaAcceptor();
            var helper   = new DocumentHelper(filter, acceptor);

            this.Document  = new Document(helper);
            this.SwaggerUI = new SwaggerUI();
        }
예제 #5
0
        /// <summary>
        /// Initializes a new instance of the <see cref="OpenApiTriggerFunctionProvider"/> class.
        /// </summary>
        public OpenApiHttpTriggerContext()
        {
            this.PackageAssembly = this.GetAssembly <ISwaggerUI>();

            var host = HostJsonResolver.Resolve();

            this.HttpSettings = host.GetHttpSettings();

            var filter   = new RouteConstraintFilter();
            var acceptor = new OpenApiSchemaAcceptor();
            var helper   = new DocumentHelper(filter, acceptor);

            this.Document  = new Document(helper);
            this.SwaggerUI = new SwaggerUI();
        }