HyperDev.Connectors 1.0.1

dotnet add package HyperDev.Connectors --version 1.0.1
                    
NuGet\Install-Package HyperDev.Connectors -Version 1.0.1
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="HyperDev.Connectors" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HyperDev.Connectors" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="HyperDev.Connectors" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add HyperDev.Connectors --version 1.0.1
                    
#r "nuget: HyperDev.Connectors, 1.0.1"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package HyperDev.Connectors@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=HyperDev.Connectors&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=HyperDev.Connectors&version=1.0.1
                    
Install as a Cake Tool

HyperDev.Connectors

Core of the HyperDev connectors: an operation of an external system (a REST API, a SOAP service, a database) is written as a JSON definition, compiled once against an environment that holds the resources (endpoints, connections, variables, secrets) and then executed with JSON input and output.

The kinds of operation are in their own packages:

Package Kind
HyperDev.Connectors.Rest REST / HTTP, import from OpenAPI (JSON or YAML)
HyperDev.Connectors.Soap SOAP / WCF, import from WSDL and XSD
HyperDev.Connectors.Sql SQL queries, procedures and functions (HyperDev.Data providers)

A "type" met in a definition loads HyperDev.Connectors.<Type> by convention, so the host only references the packages it uses.

Definitions

// read, check and write a definition
OperationDefinition definition = OperationDefinition.FromJson(json);

IReadOnlyList<DefinitionIssue> issues = definition.Validate();             // every problem, with its JSON path
IReadOnlyList<DefinitionIssue> all = OperationDefinition.ValidateJson(json); // also unknown properties and wrong values

string saved = definition.ToJson();                                          // read back as the same text

// the contract of the operation (JSON Schema, HyperDev.Text.Json.Schema)
JsonSchema input = definition.GetInputSchema();
JsonSchema output = definition.GetOutputSchema();

// the JSON schema of the definitions of a kind, for an editor
JsonSchema schema = OperationDefinitionSerializer.GetSchema("rest");

A definition names its resources, never their values: the same definition runs in every environment. It also carries fixedValues (fields of the input set by the connector), excluded (optional fields never sent), sensitive (paths masked in captures and diagnostics) and unwrap (Simplify(true): wrappers of the request and of the response hidden from the caller).

Environment and resources

using var environment = new OperationEnvironment()
    .UseResourceSource(JsonResourceSource.Parse("""
    {
      "rest":     { "customers": { "baseAddress": "https://api.example.com", "authentication": { "type": "bearer", "token": "${env:CUSTOMERS_TOKEN}" } } },
      "sql":      { "main":      { "provider": "Microsoft.Data.SqlClient", "connectionString": "...", "userName": "app", "password": "${env:DB_PASSWORD}" } },
      "variable": { "tenant":    { "value": "T01", "secret": false } }
    }
    """))
    .UseSecretProvider(new EnvironmentVariableSecretProvider());
  • Resources are read by kind and name from the sources (IResourceSource, the first that knows the name wins), validated by their kind (ResourceKinds.Get("rest").Validate(settings)) and built at their first use: an invalid resource blocks only the operations that use it.
  • Secrets are references inside any setting (${env:NAME}, Bearer ${secret:token}), resolved by the ISecretProvider of their scheme; the application registers its own (a vault, a database).
  • Variables ({{$var.tenant}}) are resources of kind variable, usable in the templates of the operations and as defaults of the parameters; they are resolved when the operation is compiled.
  • HTTP clients are shared per configuration (TLS, proxy, credentials) and disposed with the environment.
// is every resource used by these definitions there and valid?
IReadOnlyList<ResourceStatus> readiness = environment.CheckResources(definitions);

// try a resource without running an operation (opens a connection, or sends a HEAD request)
ResourceProbe probe = await environment.ProbeResourceAsync("rest", "customers", TimeSpan.FromSeconds(10));

Execution

IOperation operation = definition.Compile(environment);   // once; operations are thread-safe

JToken result = await operation.ExecuteAsync(new JObject { ["id"] = 7 });

// with the context of the call: correlation id, user and headers ({{$correlationId}}, {{$user}})
JToken traced = await operation.ExecuteAsync(input, new OperationCallContext(correlationId, user));

OperationCache keeps the compiled operations and compiles them again when the resources of the environment change (GetResourceRevision):

var cache = new OperationCache(environment, TimeSpan.FromSeconds(30));
IOperation op = cache.Get(key, () => OperationDefinition.FromJson(json));

Timeout, concurrency limit, retries and circuit breaker are options of the definition. A failure is an OperationException with a category (Kind), a stable Reason (OperationErrorReasons, e.g. fault.not_found, backend.unauthorized), the code of the system (Code), IsTransient and, for the input, the path of the value (Target).

Telemetry

Standard .NET API, no dependency: an ActivitySource and a Meter named HyperDev.Connectors (OperationTelemetry.Name) for OpenTelemetry, measured only while someone listens. A report per call is given to OperationCallContext.Observer (OperationCallReport: outcome, attempts, durations, sizes, rows). Input and output values, users and secrets never go into traces and metrics.

Target frameworks: net8.0, net10.0.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 is compatible.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (4)

Showing the top 4 NuGet packages that depend on HyperDev.Connectors:

Package Downloads
HyperDev.Connectors.Sql

HyperDev Fatum Framework

HyperDev.Connectors.Editor

HyperDev Fatum Framework: server side of the connector editor (@wemake4u/connector-editor)

HyperDev.Connectors.Rest

HyperDev Fatum Framework

HyperDev.Connectors.Soap

HyperDev Fatum Framework

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 94 11/25/2026
1.0.0 189 11/20/2026