Skip to content

Commit

Permalink
Qowaiv v4.1.0. (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Corniel Nobel committed Nov 3, 2019
1 parent b62dbfe commit 30fa5e3
Show file tree
Hide file tree
Showing 61 changed files with 42 additions and 4,142 deletions.
40 changes: 16 additions & 24 deletions README.md
Expand Up @@ -5,9 +5,9 @@

| version | package |
|------------------------------------------------------------------------------|-----------------------------------------------------------------------------|
|![v](https://img.shields.io/badge/version-4.0.6-blue.svg?cacheSeconds=3600) |[Qowaiv](https://www.nuget.org/packages/Qowaiv/) |
|![v](https://img.shields.io/badge/version-4.0.0-blue.svg?cacheSeconds=3600) |[Qowaiv.Data.SqlCient](https://www.nuget.org/packages/Qowaiv.Data.SqlClient/)|
|![v](https://img.shields.io/badge/version-1.0.3-darkred.svg?cacheSeconds=3600)|[Qowaiv.TestTools](https://www.nuget.org/packages/Qowaiv.TestTools/) |
|![v](https://img.shields.io/badge/version-4.1.0-blue.svg?cacheSeconds=3600) |[Qowaiv](https://www.nuget.org/packages/Qowaiv/) |
|![v](https://img.shields.io/badge/version-4.1.0-blue.svg?cacheSeconds=3600) |[Qowaiv.Data.SqlCient](https://www.nuget.org/packages/Qowaiv.Data.SqlClient/)|
|![v](https://img.shields.io/badge/version-2.0.0-darkblue.svg?cacheSeconds=3600)|[Qowaiv.TestTools](https://www.nuget.org/packages/Qowaiv.TestTools/) |

# Qowaiv

Expand Down Expand Up @@ -297,6 +297,13 @@ and if the data type is nullable, all when applicable.
"format": "date",
"nullabe": false
},
"DateSpan": {
"description": "Date span, specified in years, months and days, for example 1Y+10M+16D.",
"type": "string",
"format": "date-span",
"pattern": "[+-]?[0-9]+Y[+-][0-9]+M[+-][0-9]+D",
"nullabe": false
},
"EmailAddress": {
"description": "Email notation as defined by RFC 5322, for example, svo@qowaiv.org.",
"type": "string",
Expand Down Expand Up @@ -402,6 +409,12 @@ and if the data type is nullable, all when applicable.
"format": "amount",
"nullabe": false
},
"Financial.BankIdentifierCode": {
"description": "Business Identifier Code, as defined by ISO 9362, for example, DEUTDEFF.",
"type": "string",
"format": "bic",
"nullabe": true
},
"Financial.BusinessIdentifierCode": {
"description": "Business Identifier Code, as defined by ISO 9362, for example, DEUTDEFF.",
"type": "string",
Expand Down Expand Up @@ -459,27 +472,6 @@ and if the data type is nullable, all when applicable.
}
}
```
#### Swashbuckle registration
Registration of SVO's with [Swashbuckle](https://www.nuget.org/packages/Swashbuckle.AspNetCore.Swagger/)
could look like this:

``` C#
public static SwaggerGenOptions MapSingleValueObjects(this SwaggerGenOptions options)
{
var attributes = OpenApiDataTypeAttribute.From(typeof(Date).Assembly);
foreach (var attr in attributes)
{
options.MapType(attr.DataType, () => new OpenApiSchema
{
Type = attr.Type,
Format = attr.Format,
Pattern = attr.Pattern,
Nullable = attr.Nullable,
});
}
return options;
}
```
### XML
.NET supports XML Serialization out-of-the-box. All SVO's implement `IXmlSerialization`
Expand Down
23 changes: 17 additions & 6 deletions ReleaseNotes.md
@@ -1,5 +1,22 @@
# Release Notes

### Released 2019-11-03
#### Qowaiv 4.1.0
* Introduction of `DateSpan` (#95)
* Money, Amount, Percentage and SteamSize have `Abs()` method (#96)
* Money, Amount, Percentage and SteamSize have `Round()` method (#96)
* Introduction of `DecimalRound.Round()` and `RoundToMultiple()` (#97)
* `Date.FromJson(DateTime)` ignores time part (#98) fix
* Null message `NotSupportedException_ConverterCanNotConvertFomString` (#100) fix

#### Qowaiv.Data.SqlClient 4.1.0
* Updated package depedency.
* Own internal Guard.

#### Qowaiv.TestTools 2.0.0
* Removed Qowaiv.TestTools.Validation.* (107) breaking
* DebuggerDisplayAssert supports nested classes. (#110) fix

### Released 2019-10-02
#### Qowaiv 4.0.6
* Support OpenAPI (#81)
Expand All @@ -23,12 +40,6 @@
* Added Percent() extension method (#70)

### Released 2019-07-30
#### Qowaiv.Validation.Abstractions 0.0.1
* Initial version
#### Qowaiv.Validation.DataAnnotations 0.0.1
* Initial version
#### Qowaiv.Validation.Fluent 0.0.1
* Initial version
#### Qowaiv.TestTools 1.0.2
* Updated references

Expand Down
6 changes: 3 additions & 3 deletions example/Qowaiv.Text.Json.Serialization/QowaivJsonConverter.cs
Expand Up @@ -11,12 +11,12 @@ namespace Qowaiv.Text.Json.Serialization
public class QowaivJsonConverter : JsonConverterFactory
{
/// <summary>Returns true if the object type is (nullable) IJsonSerializable.</summary>
/// <param name="objectType">
/// <param name="typeToConvert">
/// The object type to convert.
/// </param>
public override bool CanConvert(Type objectType)
public override bool CanConvert(Type typeToConvert)
{
return objectType != null && (QowaivType.IsIJsonSerializable(objectType) || QowaivType.IsNullableIJsonSerializable(objectType));
return typeToConvert != null && (QowaivType.IsIJsonSerializable(typeToConvert) || QowaivType.IsNullableIJsonSerializable(typeToConvert));
}

/// <summary>Creates a converter for a <see cref="IJsonSerializable"/>.</summary>
Expand Down
4 changes: 2 additions & 2 deletions src/Qowaiv.Data.SqlClient/Qowaiv.Data.SqlClient.csproj
Expand Up @@ -5,11 +5,11 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Version>4.0.0</Version>
<Version>4.1.0</Version>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="System.Data.SqlClient" Version="4.7.0" />
<PackageReference Include="System.Data.SqlClient" Version="4.1.0" />
</ItemGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Qowaiv.TestTools/Qowaiv.TestTools.csproj
Expand Up @@ -5,7 +5,7 @@
<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<GenerateDocumentationFile>true</GenerateDocumentationFile>
<Version>1.0.3</Version>
<Version>2.0.0</Version>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 30fa5e3

Please sign in to comment.