public static IEnumerable <ICSharpType> GenerateTypedRestEndpoints(this OpenApiDocument doc, INamingStrategy naming, bool withInterfaces = true, PatternRegistry?patterns = null, BuilderRegistry?builders = null) { var generator = new EndpointGenerator(naming, builders ?? BuilderRegistry.Default) { WithInterfaces = withInterfaces }; var entryEndpoint = doc.GetTypedRest() ?? doc.MatchTypedRestPatterns(patterns); return(generator.Generate(entryEndpoint)); }