Class BowireMethodInfo
- Namespace
- Kuestenlogik.Bowire.Models
- Assembly
- Kuestenlogik.Bowire.dll
Describes a single method within a service. Originally modeled after gRPC, extended with optional REST/HTTP annotations so the same shape can describe REST endpoints discovered from OpenAPI documents.
public sealed record BowireMethodInfo : IEquatable<BowireMethodInfo>
- Inheritance
-
BowireMethodInfo
- Implements
- Inherited Members
Constructors
BowireMethodInfo(string, string, bool, bool, BowireMessageInfo, BowireMessageInfo, string)
Describes a single method within a service. Originally modeled after gRPC, extended with optional REST/HTTP annotations so the same shape can describe REST endpoints discovered from OpenAPI documents.
public BowireMethodInfo(string Name, string FullName, bool ClientStreaming, bool ServerStreaming, BowireMessageInfo InputType, BowireMessageInfo OutputType, string MethodType)
Parameters
NamestringFullNamestringClientStreamingboolServerStreamingboolInputTypeBowireMessageInfoOutputTypeBowireMessageInfoMethodTypestring
Properties
ClientStreaming
public bool ClientStreaming { get; init; }
Property Value
Deprecated
True if the source schema marks this operation as deprecated.
public bool Deprecated { get; init; }
Property Value
Description
Long-form description, may contain Markdown (REST: OpenAPI Operation.Description). Optional.
public string? Description { get; init; }
Property Value
ErrorTypes
The shapes this method declares for its errors, one per declared error
response (#583). Null when the source declares none — which is the
normal case outside REST: gRPC reports errors as a status plus
runtime-typed details, GraphQL as an untyped errors array, and
neither says in its schema what an error will carry. From OpenAPI it is
every 4xx / 5xx / default response with a JSON schema.
public List<BowireMessageInfo>? ErrorTypes { get; init; }
Property Value
Remarks
An init property rather than a constructor parameter, on purpose:
adding a positional parameter to this record removes the constructor
every plugin compiled against the old one calls, and they fail with
MissingMethodException at load (see the plugin-settings note in
docs/contributing/translations.md).
FullName
public string FullName { get; init; }
Property Value
HttpMethod
HTTP verb for REST methods (GET, POST, PUT, PATCH, DELETE, ...). Null for non-REST protocols.
public string? HttpMethod { get; init; }
Property Value
HttpPath
Path template for REST methods, e.g. "/users/{id}". Null for non-REST protocols.
public string? HttpPath { get; init; }
Property Value
InputType
public BowireMessageInfo InputType { get; init; }
Property Value
MethodType
public string MethodType { get; init; }
Property Value
Name
public string Name { get; init; }
Property Value
OutputType
public BowireMessageInfo OutputType { get; init; }
Property Value
ServerStreaming
public bool ServerStreaming { get; init; }
Property Value
Summary
One-line summary from the source schema (REST: OpenAPI Operation.Summary). Optional.
public string? Summary { get; init; }
Property Value
Methods
Deconstruct(out string, out string, out bool, out bool, out BowireMessageInfo, out BowireMessageInfo, out string)
public void Deconstruct(out string Name, out string FullName, out bool ClientStreaming, out bool ServerStreaming, out BowireMessageInfo InputType, out BowireMessageInfo OutputType, out string MethodType)
Parameters
NamestringFullNamestringClientStreamingboolServerStreamingboolInputTypeBowireMessageInfoOutputTypeBowireMessageInfoMethodTypestring
Equals(BowireMethodInfo?)
public bool Equals(BowireMethodInfo? other)
Parameters
otherBowireMethodInfo
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 ==(BowireMethodInfo?, BowireMethodInfo?)
public static bool operator ==(BowireMethodInfo? left, BowireMethodInfo? right)
Parameters
leftBowireMethodInforightBowireMethodInfo
Returns
operator !=(BowireMethodInfo?, BowireMethodInfo?)
public static bool operator !=(BowireMethodInfo? left, BowireMethodInfo? right)
Parameters
leftBowireMethodInforightBowireMethodInfo