Skip to content

Commit 4f655a5

Browse files
committed
update changelog
1 parent 5c3e284 commit 4f655a5

File tree

1 file changed

+4
-125
lines changed

1 file changed

+4
-125
lines changed

Src/Library/changelog.md

Lines changed: 4 additions & 125 deletions
Original file line numberDiff line numberDiff line change
@@ -1,135 +1,14 @@
1-
---
2-
3-
## ✨ Looking For Sponsors ✨
4-
5-
FastEndpoints needs sponsorship to [sustain the project](https://github.com/FastEndpoints/FastEndpoints/issues/449). Please help out if you can.
6-
7-
---
8-
91
[//]: # (<details><summary>title text</summary></details>)
102

11-
## New 🎉
12-
13-
<details><summary>Model binding collections of 'IFormFile' from incoming form data</summary>
14-
15-
The following types of properties can now be automatically model bound from `file` form data fields.
16-
17-
```csharp
18-
class Request
19-
{
20-
public IEnumerable<IFormFile> Cars { get; set; }
21-
public List<IFormFile> Boats { get; set; }
22-
public IFormFileCollection Jets { get; set; }
23-
}
24-
```
25-
26-
When submitting collections of form files, the incoming field names can be one of the following 3 formats:
27-
28-
| | Format One | Format Two | Format Three |
29-
|-----|------------|------------|--------------|
30-
| # 1 | Cars | Boats[1] | Jets[] |
31-
| # 2 | Cars | Boats[2] | Jets[] |
32-
33-
</details>
34-
35-
<details><summary>Multiple request examples for Swagger</summary>
36-
37-
Multiple examples for the request DTO can be specified by either setting the `ExampleRequest` property of the Summary class multiple times or adding to
38-
the `RequestExamples` collection like so:
39-
40-
```csharp
41-
Summary(s =>
42-
{
43-
s.ExampleRequest = new MyRequest {...};
44-
s.ExampleRequest = new MyRequest {...};
45-
s.RequestExamples.Add(new MyRequest {...});
46-
});
47-
```
48-
49-
</details>
50-
51-
<details><summary>Anti-forgery token validation middleware</summary>
52-
53-
Please see the [documentation page](https://fast-endpoints.com/docs/security#csrf-protection-for-form-submissions-antiforgery-tokens) for details of this feature.
54-
55-
Thank you Wàn Yǎhǔ for the [contribution](https://github.com/FastEndpoints/FastEndpoints/pull/509).
56-
57-
</details>
58-
59-
<details><summary>Support for simple validation with 'DataAnnotations'</summary>
60-
61-
```csharp
62-
//enable the feature at startup.
63-
64-
app.UseFastEndpoints(c.Validation.EnableDataAnnotationsSupport = true;)
65-
66-
//decorate properties with DataAnnotations attributes
3+
[//]: # (## New 🎉)
674

68-
sealed class Request
69-
{
70-
[Required, StringLength(10, MinimumLength = 2)]
71-
public string Name { get; set; }
72-
}
73-
74-
//can be used together with `FluentValidations` rules
75-
76-
sealed class MyValidator : Validator<Request>
77-
{
78-
public MyValidator()
79-
{
80-
RuleFor(x => x.Id).InclusiveBetween(10, 100);
81-
}
82-
}
83-
```
84-
85-
Note: there's no swagger integration for data annotations.
86-
87-
Thank you Wàn Yǎhǔ for the [contribution](https://github.com/FastEndpoints/FastEndpoints/pull/500).
88-
89-
</details>
90-
91-
## Improvements 🚀
92-
93-
<details><summary>Prevent swallowing of STJ exceptions in edge cases</summary>
94-
95-
If STJ throws internally after it has started writing to the response stream, those exceptions will no longer be swallowed.
96-
This can happen in rare cases such as when the DTO being serialized has an infinite recursion depth issue.
97-
98-
</details>
99-
100-
<details><summary>Deep nested collection property name serialization support with 'AddError(expression, ...)' method</summary>
101-
102-
When doing a manual add error call like this:
103-
104-
```csharp
105-
AddError(r => r.ObjectArray[i].Test, "Some error message");
106-
```
107-
108-
Previous output was:
109-
110-
![](https://github.com/FastEndpoints/FastEndpoints/assets/10120072/99b866ff-30bb-4ec7-bf19-7957ecc1b882)
111-
112-
New output:
113-
114-
![](https://github.com/FastEndpoints/FastEndpoints/assets/10120072/b4d14887-bb99-4654-9e75-6fa31741f27e)
115-
116-
Thank you Mattis Bratland for the [contribution](https://github.com/FastEndpoints/FastEndpoints/pull/506)
117-
118-
</details>
119-
120-
<details><summary>Misc. improvements</summary>
121-
122-
- Upgrade dependencies to latest
123-
- Minor internal code refactors/optimizations
124-
125-
</details>
5+
[//]: # (## Improvements 🚀)
1266

1277
## Fixes 🪲
1288

129-
<details><summary>Response DTO property description not being detected</summary>
9+
<details><summary>Auto binding collections of form files fails after first request</summary>
13010

131-
When the response DTO property description was provided by a lambda expression and the respective DTO property is also decorated with `[JsonPropertyName]` attribute,
132-
the Swagger operation processor was not correctly setting the property description in generated Swagger spec. See #511 for more details.
11+
An object disposed error was being thrown in subsequent requests for file collection submissions due to a flaw in the model binding logic, which has now been corrected.
13312

13413
</details>
13514

0 commit comments

Comments
 (0)