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 } } } }; }
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"); }
static SchemaSwaggerGenerator() { schemaBodyDescription = SwaggerHelper.LoadDocs("schemabody"); schemaQueryDescription = SwaggerHelper.LoadDocs("schemaquery"); }