Skip to content

Commit

Permalink
Added support for paramref and remarks from XML doc.
Browse files Browse the repository at this point in the history
  • Loading branch information
KSGRelewise committed Aug 13, 2024
1 parent 74cb4c9 commit 4c4308a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
10 changes: 9 additions & 1 deletion Generator/XMLDocsFetcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,15 @@ public static async Task<XmlDocumentation> Get(string package, string version)
{
seeReference.OuterHtml = $"<code>{seeReference.GetAttribute("cref")?.Split(".").Last() ?? seeReference.GetAttribute("langword")?.Split(".").Last() ?? string.Empty}</code>";
}

foreach (var paramReference in document.QuerySelectorAll("paramref"))
{
paramReference.OuterHtml = $"<code>{paramReference.GetAttribute("name")?.Split(".").Last() ?? string.Empty}</code>";
}
foreach (var remarks in document.QuerySelectorAll("remarks"))
{
remarks.OuterHtml = remarks.InnerHtml;
}

foreach (var member in document.GetElementsByTagName("doc")[0].Children[1].Children)
{
foreach (var child in member.Children)
Expand Down
16 changes: 8 additions & 8 deletions src/src/main/java/com/relewise/client/model/ProductQuery.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ public class ProductQuery extends LicensedRequest
public Boolean includeDisabledProducts;
public Boolean includeDisabledVariants;
public Boolean excludeProductsWithNoVariants;
/** The identifier for the <code>ProductQuery</code> paged cursor, to consume results in <code>PageSize</code> batches. Leave as <code>null</code> for retrieving the first page, and set to the value returned in <code>NextPageToken</code> for any subsequent page requests. <remarks>Should a wrong/unexisting token be supplied, a 'Validation' exception shall be returned.</remarks> */
/** The identifier for the <code>ProductQuery</code> paged cursor, to consume results in <code>PageSize</code> batches. Leave as <code>null</code> for retrieving the first page, and set to the value returned in <code>NextPageToken</code> for any subsequent page requests. Should a wrong/unexisting token be supplied, a 'Validation' exception shall be returned. */
public @Nullable UUID nextPageToken;
/** The size of the page requested. <remarks>Maximum allowed value is 1000.</remarks> */
/** The size of the page requested. Maximum allowed value is 1000. */
public @Nullable Integer pageSize;
public static ProductQuery create(@Nullable FilterCollection filters, Boolean excludeProductsWithNoVariants)
{
Expand All @@ -55,7 +55,7 @@ public ProductQuery(@Nullable FilterCollection filters, Boolean excludeProductsW
this.nextPageToken = null;
}
/**
* Initiates a new instance of <code>ProductQuery</code> with support for paging. The initial request needs to set <code>PageSize</code>. Should results span over multiple pages, the response would have token for <paramref name="nextPageToken">.</paramref>
* Initiates a new instance of <code>ProductQuery</code> with support for paging. The initial request needs to set <code>PageSize</code>. Should results span over multiple pages, the response would have token for <code>nextPageToken</code>
* @param filters The filters to be executed to limit results.
* @param excludeProductsWithNoVariants Should products without variants be included.
* @param pageSize The positive number of elements in page should results span over multiple pages.
Expand All @@ -68,7 +68,7 @@ public static ProductQuery create(@Nullable FilterCollection filters, Boolean ex
return new ProductQuery(filters, excludeProductsWithNoVariants, pageSize, language, currency, nextPageToken);
}
/**
* Initiates a new instance of <code>ProductQuery</code> with support for paging. The initial request needs to set <code>PageSize</code>. Should results span over multiple pages, the response would have token for <paramref name="nextPageToken">.</paramref>
* Initiates a new instance of <code>ProductQuery</code> with support for paging. The initial request needs to set <code>PageSize</code>. Should results span over multiple pages, the response would have token for <code>nextPageToken</code>
* @param filters The filters to be executed to limit results.
* @param excludeProductsWithNoVariants Should products without variants be included.
* @param pageSize The positive number of elements in page should results span over multiple pages.
Expand Down Expand Up @@ -131,12 +131,12 @@ public Boolean getExcludeProductsWithNoVariants()
{
return this.excludeProductsWithNoVariants;
}
/** The identifier for the <code>ProductQuery</code> paged cursor, to consume results in <code>PageSize</code> batches. Leave as <code>null</code> for retrieving the first page, and set to the value returned in <code>NextPageToken</code> for any subsequent page requests. <remarks>Should a wrong/unexisting token be supplied, a 'Validation' exception shall be returned.</remarks> */
/** The identifier for the <code>ProductQuery</code> paged cursor, to consume results in <code>PageSize</code> batches. Leave as <code>null</code> for retrieving the first page, and set to the value returned in <code>NextPageToken</code> for any subsequent page requests. Should a wrong/unexisting token be supplied, a 'Validation' exception shall be returned. */
public @Nullable UUID getNextPageToken()
{
return this.nextPageToken;
}
/** The size of the page requested. <remarks>Maximum allowed value is 1000.</remarks> */
/** The size of the page requested. Maximum allowed value is 1000. */
public @Nullable Integer getPageSize()
{
return this.pageSize;
Expand Down Expand Up @@ -188,13 +188,13 @@ public ProductQuery setExcludeProductsWithNoVariants(Boolean excludeProductsWith
this.excludeProductsWithNoVariants = excludeProductsWithNoVariants;
return this;
}
/** The identifier for the <code>ProductQuery</code> paged cursor, to consume results in <code>PageSize</code> batches. Leave as <code>null</code> for retrieving the first page, and set to the value returned in <code>NextPageToken</code> for any subsequent page requests. <remarks>Should a wrong/unexisting token be supplied, a 'Validation' exception shall be returned.</remarks> */
/** The identifier for the <code>ProductQuery</code> paged cursor, to consume results in <code>PageSize</code> batches. Leave as <code>null</code> for retrieving the first page, and set to the value returned in <code>NextPageToken</code> for any subsequent page requests. Should a wrong/unexisting token be supplied, a 'Validation' exception shall be returned. */
public ProductQuery setNextPageToken(@Nullable UUID nextPageToken)
{
this.nextPageToken = nextPageToken;
return this;
}
/** The size of the page requested. <remarks>Maximum allowed value is 1000.</remarks> */
/** The size of the page requested. Maximum allowed value is 1000. */
public ProductQuery setPageSize(@Nullable Integer pageSize)
{
this.pageSize = pageSize;
Expand Down

0 comments on commit 4c4308a

Please sign in to comment.