RehanSaeed / Schema.NET

Schema.org objects turned into strongly typed C# POCO classes for use in .NET. All classes can be serialized into JSON/JSON-LD and XML, typically used to represent structured data in the head section of html page.
MIT License
640 stars 80 forks source link

WebPageElement is missing cssSelector #638

Closed dewanganlakhan closed 8 months ago

dewanganlakhan commented 11 months ago

Describe the bug

https://schema.org/WebPageElement

cssSelector and xpath is missing from WebPageElement

I can see them on the code but when I am using Nuget package with latest release these properties were missing.

Steps to reproduce

  1. install latest package.
  2. create a new variable for WebPageElement. var webelement = new WebPageElement(); webelement.cssSelector=

Expected behaviour

I can see the source code is having the property but somehow its missing on nuget release.

public partial interface IWebPageElement : ICreativeWork { ///

/// A CSS selector, e.g. of a <a class="localLink" href="http://schema.org/SpeakableSpecification"&gt;SpeakableSpecification&lt;/a&gt; or <a class="localLink" href="http://schema.org/WebPageElement"&gt;WebPageElement&lt;/a&gt;. In the latter case, multiple matches within a page can constitute a single conceptual "Web page element". /// OneOrMany CssSelector { get; set; }

    /// <summary>
    /// An XPath, e.g. of a &lt;a class="localLink" href="http://schema.org/SpeakableSpecification"&gt;SpeakableSpecification&lt;/a&gt; or &lt;a class="localLink" href="http://schema.org/WebPageElement"&gt;WebPageElement&lt;/a&gt;. In the latter case, multiple matches within a page can constitute a single conceptual "Web page element".
    /// </summary>
    OneOrMany<string> Xpath { get; set; }
}

Schema objects

https://schema.org/WebPageElement

Turnerj commented 8 months ago

Hey @dewanganlakhan - missed this issue previously, the reason you're not seeing the properties is that the type for them is marked as "new" or "pending" in schema.org.

image

See how the types are blue?

Basically, you'll need to use Schema.NET.Pending instead of Schema.NET to access those types