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
<PackageReference Include="HyperDev.Connectors.Rest" Version="1.0.0" />
<PackageVersion Include="HyperDev.Connectors.Rest" Version="1.0.0" />
<PackageReference Include="HyperDev.Connectors.Rest" />
paket add HyperDev.Connectors.Rest --version 1.0.0
#r "nuget: HyperDev.Connectors.Rest, 1.0.0"
#:package HyperDev.Connectors.Rest@1.0.0
#addin nuget:?package=HyperDev.Connectors.Rest&version=1.0.0
#tool nuget:?package=HyperDev.Connectors.Rest&version=1.0.0
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 | Versions 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. |
-
net10.0
- HyperDev.Connectors (>= 1.0.0)
- Microsoft.OpenApi (>= 1.6.31)
- Microsoft.OpenApi.Readers (>= 1.6.31)
-
net8.0
- HyperDev.Connectors (>= 1.0.0)
- Microsoft.OpenApi (>= 1.6.31)
- Microsoft.OpenApi.Readers (>= 1.6.31)
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 |