/// <summary>Generates the <see cref="SchemaDetail"/>s for the given type and the referenced types.</summary>
        /// <remarks>Note: When generating multiple schemas or schemas for types with dependencies, please use the CreateMany method to create them at the server to avoid dependency problems.</remarks>
        /// <param name="type">The type.</param>
        /// <param name="schemaDetails">The existing schema details.</param>
        /// <param name="generateDependencySchema">Specifies whether to generate dependent schemas.</param>
        /// <param name="cancellationToken">The cancellation token.</param>
        /// <returns>The collection of schema details.</returns>
        public async Task <ICollection <SchemaDetail> > GenerateSchemasAsync(
            Type type,
            IEnumerable <SchemaDetail> schemaDetails = null,
            bool generateDependencySchema            = true,
            CancellationToken cancellationToken      = default(CancellationToken))
        {
            var config = await _infoClient.GetInfoAsync(cancellationToken).ConfigureAwait(false);

            var schemaConverter = new ClassToSchemaConverter(config.LanguageConfiguration.DefaultLanguage);

            return(await schemaConverter.GenerateAsync(type, schemaDetails ?? new List <SchemaDetail>(), generateDependencySchema).ConfigureAwait(false));
        }