HyperDev.Connectors.Rest 1.0.0

dotnet add package HyperDev.Connectors.Rest --version 1.0.0
                    
NuGet\Install-Package HyperDev.Connectors.Rest -Version 1.0.0
                    
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.Rest" Version="1.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="HyperDev.Connectors.Rest" Version="1.0.0" />
                    
Directory.Packages.props
<PackageReference Include="HyperDev.Connectors.Rest" />
                    
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.Rest --version 1.0.0
                    
#r "nuget: HyperDev.Connectors.Rest, 1.0.0"
                    
#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.Rest@1.0.0
                    
#: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.Rest&version=1.0.0
                    
Install as a Cake Addin
#tool nuget:?package=HyperDev.Connectors.Rest&version=1.0.0
                    
Install as a Cake Tool

HyperDev.Connectors.Rest

REST / HTTP operations for HyperDev.Connectors: execution, authentication and import from OpenAPI (OpenAPI 3.0 or Swagger 2.0, JSON or YAML).

A definition written by hand

var definition = new RestOperationDefinition
{
    Name = "getCustomer",
    Endpoint = "customers",                 // a rest resource of the environment
    Method = "GET",
    Path = "/customers/{{id}}",
    Query = new Dictionary<string, string> { ["fields"] = "{{fields}}" },
    Headers = new Dictionary<string, string> { ["X-Api-Version"] = "2" },
    Parameters =
    {
        new ParameterDefinition { Name = "id", Type = ParameterType.Integer, Required = true },
        new ParameterDefinition { Name = "fields", Type = ParameterType.String }
    }
};

JToken customer = await definition.Compile(environment).ExecuteAsync(new JObject { ["id"] = 7 });

Templates ({{name}}) are allowed in path, query, headers and JSON body; {{$var.name}} reads a variable of the environment, {{$user}} and {{$correlationId}} the context of the call. A query value or a header made only of a null parameter is not sent.

Import from OpenAPI

RestDescription description = await RestDescription.LoadAsync(new Uri("https://api.example.com/openapi.yaml"), httpClient);

foreach (RestOperationDescription operation in description.Operations)
    Console.WriteLine($"{operation.Name}: {operation}");

RestOperationDescription getCustomer = description.GetOperation("getCustomer");

JsonSchema input = getCustomer.InputSchema;       // parameters and body
JsonSchema output = getCustomer.OutputSchema;     // the success response

RestOperationDefinition imported = getCustomer.CreateDefinition("customers");

A document with external references is loaded from a DocumentSet (files or a zip) or from a stream with its base location; external documents are read only when allowed (DocumentImportOptions).

The resource

{
  "rest": {
    "customers": {
      "baseAddress": "https://api.example.com",
      "headers": { "X-Tenant": "{{$var.tenant}}" },
      "authentication": { "type": "clientCredentials", "tokenUrl": "https://login.example.com/token", "clientId": "app", "clientSecret": "${env:CLIENT_SECRET}" }
    }
  }
}

Authentication: none, basic, bearer, apiKeyHeader, apiKeyQuery, windows, clientCredentials (OAuth 2, also with a signed client assertion) and jwt (a token written by the connector: RS256, ES256, HS256 or unsigned). TLS (trusted certificates, client certificate) and proxy are settings of the resource too.

Responses (response of the definition): select takes a part of the body, notFound: null turns a 404 into null, includeStatus returns status and chosen headers with the body; errors are OperationException with a stable Reason (fault.not_found, backend.unauthorized, backend.throttled…).

Target frameworks: net8.0, net10.0. Depends on Microsoft.OpenApi and Microsoft.OpenApi.Readers 1.6.

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 (1)

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

Package Downloads
HyperDev.Connectors.Editor

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

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0 126 11/20/2026