/// <summary>
        /// Gets optional <see cref="IObjectSchema"/> from <see cref="IHasSchema"/> metadata.
        /// </summary>
        /// <param name="propertyContainer">Source property container.</param>
        /// <returns>Optional <see cref="IMutableObjectSchema"/>.</returns>
        public static IObjectSchema?GetSchema(this IPropertyContainer propertyContainer, bool autoCreateByProperties = false)
        {
            propertyContainer.AssertArgumentNotNull(nameof(propertyContainer));

            if (propertyContainer.GetHasSchema() is { Schema : { } schema })