示例#1
0
 private SchemaFilterContext FilterContextFor(Type type)
 {
     return(new SchemaFilterContext(
                _apiModelResolver.ResolveApiModelFor(type),
                schemaRepository: null, // NA for test
                schemaGenerator: null   // NA for test
                ));
 }
示例#2
0
        public OpenApiSchema GenerateSchema(Type type, SchemaRepository schemaRepository)
        {
            if (_options.CustomTypeMappings.ContainsKey(type))
            {
                return(_options.CustomTypeMappings[type]());
            }

            var apiModel = _apiModelResolver.ResolveApiModelFor(type);

            return(_chainOfHandlers.GenerateSchema(apiModel, schemaRepository));
        }