@@ -142,31 +142,35 @@ <h2>Example usage</h2>
142142 < div class ="icon "> < i class ='bx bx-detail '> </ i > </ div >
143143 < h4 class ="title "> Resource</ h4 >
144144 < pre >
145- < code > public class Article : Identifiable
145+ < code > #nullable enable
146+
147+ public class Article : Identifiable<long>
146148{
147149 [Attr]
148- [Required, MaxLength(30)]
149- public string Title { get; set; }
150+ [MaxLength(30)]
151+ public string Title { get; set; } = null!;
150152
151153 [Attr(Capabilities = AttrCapabilities.AllowFilter)]
152- public string Summary { get; set; }
154+ public string? Summary { get; set; }
153155
154156 [Attr(PublicName = "websiteUrl")]
155- public string Url { get; set; }
157+ public string? Url { get; set; }
158+
159+ [Attr]
160+ [Required]
161+ public int? WordCount { get; set; }
156162
157163 [Attr(Capabilities = AttrCapabilities.AllowView)]
158164 public DateTimeOffset LastModifiedAt { get; set; }
159165
160166 [HasOne]
161- public Person Author { get; set; }
167+ public Person Author { get; set; } = null!;
162168
163- [HasMany ]
164- public ICollection<Revision> Revisions { get; set; }
169+ [HasOne ]
170+ public Person? Reviewer { get; set; }
165171
166- [HasManyThrough(nameof(ArticleTags))]
167- [NotMapped]
168- public ICollection<Tag> Tags { get; set; }
169- public ICollection<ArticleTag> ArticleTags { get; set; }
172+ [HasMany]
173+ public ICollection<Tag> Tags { get; set; } = new HashSet<Tag>();
170174}</ code >
171175 </ pre >
172176 </ div >
@@ -179,7 +183,7 @@ <h4 class="title">Resource</h4>
179183 < h4 class ="title "> Request</ h4 >
180184 < pre >
181185< code >
182- GET /articles?filter=contains(summary,'web')&sort=-lastModifiedAt&fields=title,summary&include=author HTTP/1.1
186+ GET /articles?filter=contains(summary,'web')&sort=-lastModifiedAt&fields[articles] =title,summary&include=author HTTP/1.1
183187</ code >
184188 </ pre >
185189 </ div >
@@ -197,9 +201,9 @@ <h4 class="title">Response</h4>
197201 "totalResources": 1
198202 },
199203 "links": {
200- "self": "/articles?filter=contains(summary,'web')&sort=-lastModifiedAt&fields=title,summary&include=author",
201- "first": "/articles?filter=contains(summary,'web')&sort=-lastModifiedAt&fields=title,summary&include=author",
202- "last": "/articles?filter=contains(summary,'web')&sort=-lastModifiedAt&fields=title,summary&include=author"
204+ "self": "/articles?filter=contains(summary,'web')&sort=-lastModifiedAt&fields%5Barticles%5D =title,summary&include=author",
205+ "first": "/articles?filter=contains(summary,'web')&sort=-lastModifiedAt&fields%5Barticles%5D =title,summary&include=author",
206+ "last": "/articles?filter=contains(summary,'web')&sort=-lastModifiedAt&fields%5Barticles%5D =title,summary&include=author"
203207 },
204208 "data": [
205209 {
0 commit comments