コード例 #1
0
        static SchemaSwaggerGenerator()
        {
            SchemaBodyDescription  = SwaggerHelper.LoadDocs("schemabody");
            SchemaQueryDescription = SwaggerHelper.LoadDocs("schemaquery");

            ReaderSecurity = new List <SwaggerSecurityRequirement>
            {
                new SwaggerSecurityRequirement
                {
                    {
                        Constants.SecurityDefinition, new[] { SquidexRoles.AppReader }
                    }
                }
            };

            EditorSecurity = new List <SwaggerSecurityRequirement>
            {
                new SwaggerSecurityRequirement
                {
                    {
                        Constants.SecurityDefinition, new[] { SquidexRoles.AppEditor }
                    }
                }
            };
        }
コード例 #2
0
        public SchemasSwaggerGenerator(IHttpContextAccessor context, SwaggerOwinSettings swaggerSettings, IOptions <MyUrlsOptions> urlOptions)
        {
            this.context = context.HttpContext;

            this.urlOptions = urlOptions.Value;

            schemaGenerator = new SwaggerJsonSchemaGenerator(swaggerSettings);
            schemaResolver  = new SwaggerSchemaResolver(document, swaggerSettings);

            swaggerGenerator = new SwaggerGenerator(schemaGenerator, swaggerSettings, schemaResolver);

            schemaBodyDescription  = SwaggerHelper.LoadDocs("schemabody");
            schemaQueryDescription = SwaggerHelper.LoadDocs("schemaquery");
        }
コード例 #3
0
 static SchemaSwaggerGenerator()
 {
     schemaBodyDescription  = SwaggerHelper.LoadDocs("schemabody");
     schemaQueryDescription = SwaggerHelper.LoadDocs("schemaquery");
 }