Skip to content

Commit

Permalink
Merge pull request #60 from serverlessworkflow/feat-solution-packages
Browse files Browse the repository at this point in the history
Update all solution packages
  • Loading branch information
cdavernas authored Sep 8, 2024
2 parents f563745 + 0c7aabb commit 0be35b2
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>alpha2.14</VersionSuffix>
<VersionSuffix>alpha2.15</VersionSuffix>
<AssemblyVersion>$(VersionPrefix)</AssemblyVersion>
<FileVersion>$(VersionPrefix)</FileVersion>
<NeutralLanguage>en</NeutralLanguage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>alpha2.14</VersionSuffix>
<VersionSuffix>alpha2.15</VersionSuffix>
<AssemblyVersion>$(VersionPrefix)</AssemblyVersion>
<FileVersion>$(VersionPrefix)</FileVersion>
<NeutralLanguage>en</NeutralLanguage>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,20 @@ public record OAuth2AuthenticationEndpointsDefinition
/// </summary>
[Required]
[DataMember(Name = "authority", Order = 1), JsonPropertyName("authority"), JsonPropertyOrder(1), YamlMember(Alias = "authority", Order = 1)]
public virtual Uri Token { get; set; } = new("/oauth2/token");
public virtual Uri Token { get; set; } = new("/oauth2/token", UriKind.RelativeOrAbsolute);

/// <summary>
/// Gets/sets the relative path to the revocation endpoint. Defaults to `/oauth2/revoke`
/// </summary>
[Required]
[DataMember(Name = "revocation", Order = 2), JsonPropertyName("revocation"), JsonPropertyOrder(2), YamlMember(Alias = "revocation", Order = 2)]
public virtual Uri Revocation { get; set; } = new("/oauth2/revoke");
public virtual Uri Revocation { get; set; } = new("/oauth2/revoke", UriKind.RelativeOrAbsolute);

/// <summary>
/// Gets/sets the relative path to the introspection endpoint. Defaults to `/oauth2/introspect`
/// </summary>
[Required]
[DataMember(Name = "introspection", Order = 3), JsonPropertyName("introspection"), JsonPropertyOrder(3), YamlMember(Alias = "introspection", Order = 3)]
public virtual Uri Introspection { get; set; } = new("/oauth2/introspect");
public virtual Uri Introspection { get; set; } = new("/oauth2/introspect", UriKind.RelativeOrAbsolute);

}
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public virtual RetryPolicyDefinition? Retry
get => this.RetryValue?.T1Value;
set
{
ArgumentNullException.ThrowIfNull(value);
this.RetryValue = value;

Check warning on line 56 in src/ServerlessWorkflow.Sdk/Models/ErrorCatcherDefinition.cs

View workflow job for this annotation

GitHub Actions / publish-packages

Possible null reference argument for parameter 'value' in 'OneOf<RetryPolicyDefinition, string>.implicit operator OneOf<RetryPolicyDefinition, string>(RetryPolicyDefinition value)'.

Check warning on line 56 in src/ServerlessWorkflow.Sdk/Models/ErrorCatcherDefinition.cs

View workflow job for this annotation

GitHub Actions / publish-packages

Possible null reference argument for parameter 'value' in 'OneOf<RetryPolicyDefinition, string>.implicit operator OneOf<RetryPolicyDefinition, string>(RetryPolicyDefinition value)'.
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public class MapEntryYamlConverter(Func<ISerializer> serializerFactory, Func<IDe
public virtual bool Accepts(Type type) => type.IsGenericType && type.GetGenericTypeDefinition() == typeof(MapEntry<,>);

/// <inheritdoc/>
public virtual object? ReadYaml(IParser parser, Type type) => this.CreateGenericConverter(type).ReadYaml(parser, type);
public virtual object? ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) => this.CreateGenericConverter(type).ReadYaml(parser, type, rootDeserializer);

/// <inheritdoc/>
public virtual void WriteYaml(IEmitter emitter, object? value, Type type) => this.CreateGenericConverter(type).WriteYaml(emitter, value, type);
public virtual void WriteYaml(IEmitter emitter, object? value, Type type, ObjectSerializer rootSerializer) => this.CreateGenericConverter(type).WriteYaml(emitter, value, type, rootSerializer);

/// <summary>
/// Creates a new generic <see cref="MapEntryConverter{TKey, TValue}"/>
Expand All @@ -56,7 +56,7 @@ class MapEntryConverter<TKey, TValue> (ISerializer serializer, IDeserializer des
public bool Accepts(Type type) => type == typeof(MapEntry<TKey, TValue>);

/// <inheritdoc/>
public virtual object ReadYaml(IParser parser, Type type)
public virtual object ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer)
{
parser.Consume<MappingStart>();
var key = deserializer.Deserialize<TKey>(parser);
Expand All @@ -66,7 +66,7 @@ public virtual object ReadYaml(IParser parser, Type type)
}

/// <inheritdoc/>
public virtual void WriteYaml(IEmitter emitter, object? value, Type type)
public virtual void WriteYaml(IEmitter emitter, object? value, Type type, ObjectSerializer rootSerializer)
{
if (value == null)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public class OneOfConverter
public virtual bool Accepts(Type type) => type.GetGenericType(typeof(OneOf<,>)) != null;

/// <inheritdoc/>
public virtual object? ReadYaml(IParser parser, Type type) => throw new NotImplementedException();
public virtual object? ReadYaml(IParser parser, Type type, ObjectDeserializer rootDeserializer) => throw new NotImplementedException();

/// <inheritdoc/>
public virtual void WriteYaml(IEmitter emitter, object? value, Type type)
public virtual void WriteYaml(IEmitter emitter, object? value, Type type, ObjectSerializer rootSerializer)
{
if (value == null || value is not IOneOf oneOf)
{
Expand All @@ -47,7 +47,7 @@ public virtual void WriteYaml(IEmitter emitter, object? value, Type type)
return;
}
var jsonNode = JsonSerializer.Default.SerializeToNode(toSerialize);
new JsonNodeTypeConverter().WriteYaml(emitter, jsonNode, toSerialize.GetType());
new JsonNodeTypeConverter().WriteYaml(emitter, jsonNode, toSerialize.GetType(), rootSerializer);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public class OneOfNodeDeserializer(INodeDeserializer inner)
protected INodeDeserializer Inner { get; } = inner;

/// <inheritdoc/>
public virtual bool Deserialize(IParser reader, Type expectedType, Func<IParser, Type, object?> nestedObjectDeserializer, out object? value)
public virtual bool Deserialize(IParser reader, Type expectedType, Func<IParser, Type, object?> nestedObjectDeserializer, out object? value, ObjectDeserializer rootDeserializer)
{
if (!typeof(IOneOf).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value);
if (!this.Inner.Deserialize(reader, typeof(Dictionary<object, object>), nestedObjectDeserializer, out value)) return false;
if (!typeof(IOneOf).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value, rootDeserializer);
if (!this.Inner.Deserialize(reader, typeof(Dictionary<object, object>), nestedObjectDeserializer, out value, rootDeserializer)) return false;
value = JsonSerializer.Default.Deserialize(JsonSerializer.Default.SerializeToText(value!), expectedType);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ public class OneOfScalarDeserializer(INodeDeserializer inner)
protected INodeDeserializer Inner { get; } = inner;

/// <inheritdoc/>
public virtual bool Deserialize(IParser reader, Type expectedType, Func<IParser, Type, object?> nestedObjectDeserializer, out object? value)
public virtual bool Deserialize(IParser reader, Type expectedType, Func<IParser, Type, object?> nestedObjectDeserializer, out object? value, ObjectDeserializer rootDeserializer)
{
if (!typeof(IOneOf).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value);
if (!this.Inner.Deserialize(reader, typeof(object), nestedObjectDeserializer, out value)) return false;
if (!typeof(IOneOf).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value, rootDeserializer);
if (!this.Inner.Deserialize(reader, typeof(object), nestedObjectDeserializer, out value, rootDeserializer)) return false;
value = JsonSerializer.Default.Deserialize(JsonSerializer.Default.SerializeToText(value!), expectedType);
return true;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ public class TaskDefinitionYamlDeserializer(INodeDeserializer inner)
protected INodeDeserializer Inner { get; } = inner;

/// <inheritdoc/>
public virtual bool Deserialize(IParser reader, Type expectedType, Func<IParser, Type, object?> nestedObjectDeserializer, out object? value)
public virtual bool Deserialize(IParser reader, Type expectedType, Func<IParser, Type, object?> nestedObjectDeserializer, out object? value, ObjectDeserializer rootDeserializer)
{
if (!typeof(TaskDefinition).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value);
if (!this.Inner.Deserialize(reader, typeof(Dictionary<object, object>), nestedObjectDeserializer, out value)) return false;
if (!typeof(TaskDefinition).IsAssignableFrom(expectedType)) return this.Inner.Deserialize(reader, expectedType, nestedObjectDeserializer, out value, rootDeserializer);
if (!this.Inner.Deserialize(reader, typeof(Dictionary<object, object>), nestedObjectDeserializer, out value, rootDeserializer)) return false;
value = JsonSerializer.Default.Deserialize<TaskDefinition>(JsonSerializer.Default.SerializeToText(value!));
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions src/ServerlessWorkflow.Sdk/ServerlessWorkflow.Sdk.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<VersionPrefix>1.0.0</VersionPrefix>
<VersionSuffix>alpha2.14</VersionSuffix>
<VersionSuffix>alpha2.15</VersionSuffix>
<AssemblyVersion>$(VersionPrefix)</AssemblyVersion>
<FileVersion>$(VersionPrefix)</FileVersion>
<NeutralLanguage>en</NeutralLanguage>
Expand Down Expand Up @@ -36,7 +36,7 @@
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.2" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Include="Neuroglia.Serialization.YamlDotNet" Version="4.15.3" />
<PackageReference Include="Neuroglia.Serialization.YamlDotNet" Version="4.15.4" />
<PackageReference Include="Semver" Version="2.3.0" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="FluentAssertions" Version="6.12.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.11.1" />
<PackageReference Include="xunit" Version="2.9.0" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.2">
<PrivateAssets>all</PrivateAssets>
Expand Down

0 comments on commit 0be35b2

Please sign in to comment.