Skip to content

Ling.RemoteServices 2.0.0

Latest

Choose a tag to compare

@ling921 ling921 released this 30 Sep 03:20
6f6df44
  • Add endpoint metadata attributes for response/request types and media types, OpenAPI tags and text, endpoint names, host constraints, route order, form limits, and other routing behavior. Attributes can target all operations on a contract or select an HTTP method.
  • Add typed convention builders for every mapped remote endpoint, an individual service, or one HTTP operation. Each scope accepts ASP.NET Core endpoint filters and common native endpoint conventions such as Produces, Accepts, request timeouts, and routing short-circuiting.
  • Inherit endpoint metadata, authorization/policy attributes, XML summaries, and parameter-binding attributes from base service interfaces. Diagnose conflicting HTTP-operation declarations inherited from unrelated interfaces.
  • Diagnose duplicate endpoint names across generated services at compile time.
  • Support duration-based request timeout attributes and per-HTTP-method policy selection.
  • Support ASP.NET Core 10 endpoint validation and cookie-redirect conventions. Using these attributes with .NET 8 or .NET 9 produces a generator diagnostic instead of generated code that cannot compile.
  • Reject invalid endpoint-policy HTTP method selectors rather than silently ignoring them, and restrict configured success response statuses to 200–299.
  • Keep the three public package IDs and target .NET 8, .NET 9, and .NET 10.

Breaking changes

  • RemoteMethodAttribute.SuccessStatusCode is now an int with 0 meaning “use the default”. Nullable types are not valid CLR attribute named-argument types, so the previous int? property could not be set in attribute usage.
  • RemoteServiceMethodConventionBuilder.HttpMethod and RemoteServiceEndpointConventionBuilder<TService>.Operation(method, httpMethod) now return RemoteServiceOperationConventionBuilder so operation-scoped extensions can be called fluently. Rebuild consumers of these public APIs when upgrading.
  • Remove the advanced, undocumented CompositeEndpointConventionBuilder; use the registry returned from MapRemoteServices() for global conventions.