Class ProtoSpecIdentity
The identity a contract collector records for the document it loaded: the configured source and the SHA-256 hash of the loaded content. The report item that carries it has no coverage verdict, so the report arithmetic ignores it; a cross-run comparison can still tell a changed specification from the same one.
public static class ProtoSpecIdentity
- Inheritance
-
ProtoSpecIdentity
- Inherited Members
Fields
HashMetadataKey
The metadata key of the SHA-256 hash of the loaded content, lowercase hexadecimal.
public const string HashMetadataKey = "spec.hash"
Field Value
ReportIdentifier
The identifier of the aggregate report item that carries the identity.
public const string ReportIdentifier = "spec"
Field Value
SourceMetadataKey
The metadata key of the configured source the specification was loaded from.
public const string SourceMetadataKey = "spec.source"
Field Value
Methods
Hash(string)
The SHA-256 hash of loaded content, lowercase hexadecimal.
public static string Hash(string content)
Parameters
contentstring
Returns
Metadata(string, string)
The identity metadata for a loaded specification. A single absolute URL has its credentials and sensitive query values removed through ProtoUriSanitizer; anything else, including an inline document, is recorded as it is.
public static IReadOnlyDictionary<string, object> Metadata(string source, string content)