Class RecordingSourceSchema
- Namespace
- Kuestenlogik.Bowire.Mocking
- Assembly
- Kuestenlogik.Bowire.dll
The source-schema document a recording was captured from — carried
on SourceSchema when the live target
advertised one. Lets the mock server serve the original contract back
(REST: GET /openapi.json, AsyncAPI: GET /asyncapi.yaml)
so peer discovery against the mock returns the full declared surface
rather than the slice the recording happens to cover.
public sealed record RecordingSourceSchema : IEquatable<RecordingSourceSchema>
- Inheritance
-
RecordingSourceSchema
- Implements
- Inherited Members
Constructors
RecordingSourceSchema(string, string, string?)
The source-schema document a recording was captured from — carried
on SourceSchema when the live target
advertised one. Lets the mock server serve the original contract back
(REST: GET /openapi.json, AsyncAPI: GET /asyncapi.yaml)
so peer discovery against the mock returns the full declared surface
rather than the slice the recording happens to cover.
public RecordingSourceSchema(string Format, string Content, string? SourceUrl = null)
Parameters
FormatstringSchema format tag —
"openapi-3.0","openapi-2.0","asyncapi-3.0","asyncapi-2.6","graphql-sdl","wsdl-1.1", &c. Mock-host extensions inspect this to decide whether they're the right handler for this recording's schema.ContentstringVerbatim source-schema text (YAML or JSON, depending on
Format). The mock host serves this byte-for-byte under the matching endpoint.SourceUrlstringOptional capture-time URL the schema came from (e.g.
https://api.example.com/openapi.json). Diagnostic only; not used by the mock host. Lets a user pop a recording open and see "this is the contract that lived at <url> when we captured."
Properties
Content
Verbatim source-schema text (YAML or JSON, depending on
Format). The mock host serves this byte-for-byte
under the matching endpoint.
[JsonPropertyName("content")]
public string Content { get; init; }
Property Value
Format
Schema format tag — "openapi-3.0", "openapi-2.0",
"asyncapi-3.0", "asyncapi-2.6", "graphql-sdl",
"wsdl-1.1", &c. Mock-host extensions inspect this to decide
whether they're the right handler for this recording's schema.
[JsonPropertyName("format")]
public string Format { get; init; }
Property Value
SourceUrl
Optional capture-time URL the schema came from (e.g.
https://api.example.com/openapi.json). Diagnostic only; not
used by the mock host. Lets a user pop a recording open and see
"this is the contract that lived at <url> when we captured."
[JsonPropertyName("sourceUrl")]
public string? SourceUrl { get; init; }
Property Value
Methods
Deconstruct(out string, out string, out string?)
public void Deconstruct(out string Format, out string Content, out string? SourceUrl)
Parameters
Equals(RecordingSourceSchema?)
public bool Equals(RecordingSourceSchema? other)
Parameters
otherRecordingSourceSchema
Returns
Equals(object?)
public override bool Equals(object? obj)
Parameters
objobject
Returns
GetHashCode()
public override int GetHashCode()
Returns
ToString()
public override string ToString()
Returns
Operators
operator ==(RecordingSourceSchema?, RecordingSourceSchema?)
public static bool operator ==(RecordingSourceSchema? left, RecordingSourceSchema? right)
Parameters
leftRecordingSourceSchemarightRecordingSourceSchema
Returns
operator !=(RecordingSourceSchema?, RecordingSourceSchema?)
public static bool operator !=(RecordingSourceSchema? left, RecordingSourceSchema? right)
Parameters
leftRecordingSourceSchemarightRecordingSourceSchema