Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
825fef0
Update Parameters.cs
richfirely Oct 14, 2024
f257ab2
Merge pull request #2912 from FirelyTeam/fix/parameters-get-doc-fix
ewoutkramer Oct 16, 2024
c173712
Remove the Charset from the Accept Header and replace it with the Acc…
whyfate Oct 17, 2024
b4b27c9
update compatibility suppressions file.
whyfate Oct 17, 2024
c75aab7
fix:unittest.
whyfate Oct 17, 2024
37fe281
Merge pull request #2922 from whyfate/improve-restapi-accept-header
ewoutkramer Oct 18, 2024
193d73d
Removed IsResource/IsNestedType.
ewoutkramer Oct 18, 2024
3c7459d
Binary changes.
ewoutkramer Oct 18, 2024
960031e
Removed BackboneTypeAttribute.
ewoutkramer Oct 18, 2024
f2afb0b
changed SSG setting usage
Kasdejong Oct 22, 2024
807d161
this should make the tests run!
Kasdejong Oct 22, 2024
e884814
Changed the behaviour of force-regenerate to be more in line with the…
Kasdejong Oct 22, 2024
5c1468e
Changed the behaviour of force-regenerate to be more in line with the…
Kasdejong Oct 22, 2024
0bb438a
Merge remote-tracking branch 'origin/feature/use-proper-snapshot-gene…
Kasdejong Oct 22, 2024
9522fb3
ForceRegenerate should now ACTUALLY force regeneration. Naturally, th…
Kasdejong Oct 22, 2024
75925ef
Forgot to align this with the Specification SSG
Kasdejong Oct 22, 2024
44237fb
Fixed obsoletes
Kasdejong Oct 22, 2024
193b791
Merge remote-tracking branch 'origin/6.0/2930-remove-isnested-type' i…
Kasdejong Oct 22, 2024
6c19042
Merge branch 'feature/use-proper-snapshot-generation-settings' into 6…
Kasdejong Oct 22, 2024
81aa4a2
made "WithResourceOverrides" a static method. I hope this makes more …
Kasdejong Oct 22, 2024
d478750
Merge branch 'develop-6.0' into 6.0/2930-remove-isnested-type
Kasdejong Oct 22, 2024
8f12cdc
compatibility suppressions
Kasdejong Oct 22, 2024
5479d86
Small fix to unit test, since the name of backbones has changed.
ewoutkramer Oct 22, 2024
ab691a1
Merge branch 'develop-6.0' into 6.0/2930-remove-isnested-type
Kasdejong Oct 23, 2024
be68c7b
updated CompatibilitySuppressions.xml
Kasdejong Oct 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
84 changes: 84 additions & 0 deletions src/Hl7.Fhir.Base/CompatibilitySuppressions.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,13 @@
<Right>lib/net8.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:Hl7.Fhir.Introspection.BackboneTypeAttribute</Target>
<Left>lib/net8.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/net8.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:System.Runtime.CompilerServices.CollectionBuilderAttribute</Target>
Expand All @@ -21,6 +28,13 @@
<Right>lib/netstandard2.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0001</DiagnosticId>
<Target>T:Hl7.Fhir.Introspection.BackboneTypeAttribute</Target>
<Left>lib/netstandard2.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/netstandard2.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.ElementModel.TypedElementExtensions.IsExactlyEqualTo``1(``0,``0,System.Boolean)</Target>
Expand Down Expand Up @@ -98,6 +112,41 @@
<Right>lib/net8.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Introspection.ClassMapping.get_DefinitionPath</Target>
<Left>lib/net8.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/net8.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Introspection.FhirTypeAttribute.get_IsNestedType</Target>
<Left>lib/net8.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/net8.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Introspection.FhirTypeAttribute.get_IsResource</Target>
<Left>lib/net8.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/net8.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Introspection.FhirTypeAttribute.set_IsNestedType(System.Boolean)</Target>
<Left>lib/net8.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/net8.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Introspection.FhirTypeAttribute.set_IsResource(System.Boolean)</Target>
<Left>lib/net8.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/net8.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Model.Parameters.get_Item(System.String)</Target>
Expand Down Expand Up @@ -231,6 +280,41 @@
<Right>lib/netstandard2.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Introspection.ClassMapping.get_DefinitionPath</Target>
<Left>lib/netstandard2.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/netstandard2.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Introspection.FhirTypeAttribute.get_IsNestedType</Target>
<Left>lib/netstandard2.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/netstandard2.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Introspection.FhirTypeAttribute.get_IsResource</Target>
<Left>lib/netstandard2.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/netstandard2.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Introspection.FhirTypeAttribute.set_IsNestedType(System.Boolean)</Target>
<Left>lib/netstandard2.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/netstandard2.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Introspection.FhirTypeAttribute.set_IsResource(System.Boolean)</Target>
<Left>lib/netstandard2.0/Hl7.Fhir.Base.dll</Left>
<Right>lib/netstandard2.0/Hl7.Fhir.Base.dll</Right>
<IsBaselineSuppression>true</IsBaselineSuppression>
</Suppression>
<Suppression>
<DiagnosticId>CP0002</DiagnosticId>
<Target>M:Hl7.Fhir.Model.Parameters.get_Item(System.String)</Target>
Expand Down
35 changes: 0 additions & 35 deletions src/Hl7.Fhir.Base/Introspection/BackboneTypeAttribute.cs

This file was deleted.

14 changes: 2 additions & 12 deletions src/Hl7.Fhir.Base/Introspection/ClassMapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,16 +88,13 @@ public static bool TryCreate(Type type, [NotNullWhen(true)]out ClassMapping? res
// Now continue with the normal algorithm, types adorned with the [FhirTypeAttribute]
if (GetAttribute<FhirTypeAttribute>(type.GetTypeInfo(), release) is not { } typeAttribute) return false;

var backboneAttribute = GetAttribute<BackboneTypeAttribute>(type, release);

result = new ClassMapping(collectTypeName(typeAttribute, type), type, release)
{
IsResource = typeAttribute.IsResource || type.CanBeTreatedAsType(typeof(Resource)),
IsResource = type.CanBeTreatedAsType(typeof(Resource)),
IsCodeOfT = ReflectionHelper.IsClosedGenericType(type) &&
ReflectionHelper.IsConstructedFromGenericTypeDefinition(type, typeof(Code<>)),
IsFhirPrimitive = typeof(PrimitiveType).IsAssignableFrom(type),
IsBackboneType = typeAttribute.IsNestedType || backboneAttribute is not null,
DefinitionPath = backboneAttribute?.DefinitionPath,
IsBackboneType = typeAttribute.IsBackboneType,
IsBindable = GetAttribute<BindableAttribute>(type.GetTypeInfo(), release)?.IsBindable ?? false,
Canonical = typeAttribute.Canonical,
ValidationAttributes = GetAttributes<ValidationAttribute>(type.GetTypeInfo(), release).ToArray(),
Expand Down Expand Up @@ -173,13 +170,6 @@ private ClassMapping(string name, Type nativeType, FhirRelease release)
/// </summary>
public bool IsBackboneType { get; private set; } = false;


/// <summary>
/// If this is a backbone type (<see cref="IsBackboneType"/>), then this contains the path
/// in the StructureDefinition where the backbone was defined first.
/// </summary>
public string? DefinitionPath { get; private set; }

/// <summary>
/// Indicates whether this class can be used for binding.
/// </summary>
Expand Down
19 changes: 6 additions & 13 deletions src/Hl7.Fhir.Base/Introspection/FhirTypeAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ namespace Hl7.Fhir.Introspection
/// <summary>
/// This attribute is applied to classes that represent FHIR datatypes and resources.
/// </summary>
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
public sealed class FhirTypeAttribute : VersionedAttribute
{
public FhirTypeAttribute(string name)
Expand All @@ -57,20 +57,13 @@ public FhirTypeAttribute(string name, string canonical)
public string Name { get; private set; }

/// <summary>
/// Indicates whether this class represents the nested complex type for a (backbone) element.
/// </summary>
public bool IsNestedType { get; set; }

/// <summary>
/// Indicates whether this class represents a Resource
/// The canonical of the StructureDefinition defining this type.
/// </summary>
public bool IsResource { get; set; }
public string? Canonical { get; set; }

/// <summary>
/// The canonical of the StructureDefinition defining this type.
/// Indicates whether this class represents the nested complex type for a (backbone) element.
/// </summary>
public string? Canonical { get; set; }
public bool IsBackboneType { get; set; }
}
}

#nullable restore
}
2 changes: 1 addition & 1 deletion src/Hl7.Fhir.Base/Model/Generated/Binary.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace Hl7.Fhir.Model
/// </remarks>
[Serializable]
[DataContract]
[FhirType("Binary","http://hl7.org/fhir/StructureDefinition/Binary", IsResource=true)]
[FhirType("Binary","http://hl7.org/fhir/StructureDefinition/Binary")]
public partial class Binary : Hl7.Fhir.Model.Resource
{
/// <summary>
Expand Down
27 changes: 11 additions & 16 deletions src/Hl7.Fhir.Base/Model/Generated/Bundle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace Hl7.Fhir.Model
/// </remarks>
[Serializable]
[DataContract]
[FhirType("Bundle","http://hl7.org/fhir/StructureDefinition/Bundle", IsResource=true)]
[FhirType("Bundle","http://hl7.org/fhir/StructureDefinition/Bundle")]
public partial class Bundle : Hl7.Fhir.Model.Resource, IIdentifiable<Identifier>
{
/// <summary>
Expand Down Expand Up @@ -945,14 +945,13 @@ public enum HTTPVerb
/// </remarks>
[Serializable]
[DataContract]
[FhirType("Bundle#Link", IsNestedType=true)]
[BackboneType("Bundle.link")]
[FhirType("Bundle.link", IsBackboneType=true)]
public partial class LinkComponent : Hl7.Fhir.Model.BackboneElement
{
/// <summary>
/// FHIR Type Name
/// </summary>
public override string TypeName { get { return "Bundle#Link"; } }
public override string TypeName { get { return "Bundle.link"; } }

/// <summary>
/// See http://www.iana.org/assignments/link-relations/link-relations.xhtml#link-relations-1
Expand Down Expand Up @@ -1135,14 +1134,13 @@ protected override IEnumerable<KeyValuePair<string, object>> GetElementPairs()
/// </remarks>
[Serializable]
[DataContract]
[FhirType("Bundle#Entry", IsNestedType=true)]
[BackboneType("Bundle.entry")]
[FhirType("Bundle.entry", IsBackboneType=true)]
public partial class EntryComponent : Hl7.Fhir.Model.BackboneElement
{
/// <summary>
/// FHIR Type Name
/// </summary>
public override string TypeName { get { return "Bundle#Entry"; } }
public override string TypeName { get { return "Bundle.entry"; } }

/// <summary>
/// Links related to this entry
Expand Down Expand Up @@ -1407,14 +1405,13 @@ protected override IEnumerable<KeyValuePair<string, object>> GetElementPairs()
/// </remarks>
[Serializable]
[DataContract]
[FhirType("Bundle#Search", IsNestedType=true)]
[BackboneType("Bundle.entry.search")]
[FhirType("Bundle.entry.search", IsBackboneType=true)]
public partial class SearchComponent : Hl7.Fhir.Model.BackboneElement
{
/// <summary>
/// FHIR Type Name
/// </summary>
public override string TypeName { get { return "Bundle#Search"; } }
public override string TypeName { get { return "Bundle.entry.search"; } }

/// <summary>
/// match | include - why this is in the result set
Expand Down Expand Up @@ -1596,14 +1593,13 @@ protected override IEnumerable<KeyValuePair<string, object>> GetElementPairs()
/// </remarks>
[Serializable]
[DataContract]
[FhirType("Bundle#Request", IsNestedType=true)]
[BackboneType("Bundle.entry.request")]
[FhirType("Bundle.entry.request", IsBackboneType=true)]
public partial class RequestComponent : Hl7.Fhir.Model.BackboneElement
{
/// <summary>
/// FHIR Type Name
/// </summary>
public override string TypeName { get { return "Bundle#Request"; } }
public override string TypeName { get { return "Bundle.entry.request"; } }

/// <summary>
/// GET | HEAD | POST | PUT | DELETE | PATCH
Expand Down Expand Up @@ -1959,14 +1955,13 @@ protected override IEnumerable<KeyValuePair<string, object>> GetElementPairs()
/// </remarks>
[Serializable]
[DataContract]
[FhirType("Bundle#Response", IsNestedType=true)]
[BackboneType("Bundle.entry.response")]
[FhirType("Bundle.entry.response", IsBackboneType=true)]
public partial class ResponseComponent : Hl7.Fhir.Model.BackboneElement
{
/// <summary>
/// FHIR Type Name
/// </summary>
public override string TypeName { get { return "Bundle#Response"; } }
public override string TypeName { get { return "Bundle.entry.response"; } }

/// <summary>
/// Status response code (text optional)
Expand Down
2 changes: 1 addition & 1 deletion src/Hl7.Fhir.Base/Model/Generated/DomainResource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace Hl7.Fhir.Model
/// </remarks>
[Serializable]
[DataContract]
[FhirType("DomainResource","http://hl7.org/fhir/StructureDefinition/DomainResource", IsResource=true)]
[FhirType("DomainResource","http://hl7.org/fhir/StructureDefinition/DomainResource")]
public abstract partial class DomainResource : Hl7.Fhir.Model.Resource, Hl7.Fhir.Model.IModifierExtendable
{
/// <summary>
Expand Down
7 changes: 3 additions & 4 deletions src/Hl7.Fhir.Base/Model/Generated/OperationOutcome.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace Hl7.Fhir.Model
/// </remarks>
[Serializable]
[DataContract]
[FhirType("OperationOutcome","http://hl7.org/fhir/StructureDefinition/OperationOutcome", IsResource=true)]
[FhirType("OperationOutcome","http://hl7.org/fhir/StructureDefinition/OperationOutcome")]
public partial class OperationOutcome : Hl7.Fhir.Model.DomainResource
{
/// <summary>
Expand Down Expand Up @@ -316,14 +316,13 @@ public enum IssueType
/// </remarks>
[Serializable]
[DataContract]
[FhirType("OperationOutcome#Issue", IsNestedType=true)]
[BackboneType("OperationOutcome.issue")]
[FhirType("OperationOutcome.issue", IsBackboneType=true)]
public partial class IssueComponent : Hl7.Fhir.Model.BackboneElement
{
/// <summary>
/// FHIR Type Name
/// </summary>
public override string TypeName { get { return "OperationOutcome#Issue"; } }
public override string TypeName { get { return "OperationOutcome.issue"; } }

/// <summary>
/// fatal | error | warning | information | success
Expand Down
7 changes: 3 additions & 4 deletions src/Hl7.Fhir.Base/Model/Generated/Parameters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ namespace Hl7.Fhir.Model
/// </remarks>
[Serializable]
[DataContract]
[FhirType("Parameters","http://hl7.org/fhir/StructureDefinition/Parameters", IsResource=true)]
[FhirType("Parameters","http://hl7.org/fhir/StructureDefinition/Parameters")]
public partial class Parameters : Hl7.Fhir.Model.Resource
{
/// <summary>
Expand All @@ -68,14 +68,13 @@ public partial class Parameters : Hl7.Fhir.Model.Resource
/// </remarks>
[Serializable]
[DataContract]
[FhirType("Parameters#Parameter", IsNestedType=true)]
[BackboneType("Parameters.parameter")]
[FhirType("Parameters.parameter", IsBackboneType=true)]
public partial class ParameterComponent : Hl7.Fhir.Model.BackboneElement
{
/// <summary>
/// FHIR Type Name
/// </summary>
public override string TypeName { get { return "Parameters#Parameter"; } }
public override string TypeName { get { return "Parameters.parameter"; } }

/// <summary>
/// Name from the definition
Expand Down
2 changes: 1 addition & 1 deletion src/Hl7.Fhir.Base/Model/Generated/Resource.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ namespace Hl7.Fhir.Model
/// </remarks>
[Serializable]
[DataContract]
[FhirType("Resource","http://hl7.org/fhir/StructureDefinition/Resource", IsResource=true)]
[FhirType("Resource","http://hl7.org/fhir/StructureDefinition/Resource")]
public abstract partial class Resource : Hl7.Fhir.Model.Base
{
/// <summary>
Expand Down
Loading