HyperDev.Connectors.Editor 1.0.1

dotnet add package HyperDev.Connectors.Editor --version 1.0.1
                    
NuGet\Install-Package HyperDev.Connectors.Editor -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.Editor" 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.Editor" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="HyperDev.Connectors.Editor" />
                    
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.Editor --version 1.0.1
                    
#r "nuget: HyperDev.Connectors.Editor, 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.Editor@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.Editor&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=HyperDev.Connectors.Editor&version=1.0.1
                    
Install as a Cake Tool

HyperDev.Connectors.Editor

Server side of the connector editor (@wemake4u/connector-editor): one method for each handler of the editor that needs the connectors library. Stateless, without a transport and without knowledge of the application that hosts it: the host exposes ConnectorEditorService with its own endpoints or remote objects and its own permissions.

var editor = new ConnectorEditorService(new ConnectorEditorOptions
{
    // optional: reading a source by address, only from the hosts allowed (see SourceDownloaderOptions)
    Downloader = new SourceDownloader(new SourceDownloaderOptions { AllowedHosts = { "*.esempio.it" } })
});

// the operations of a WSDL with its XSD, an OpenAPI document, or a zip with them
SourceCatalog catalog = await editor.ReadSourceAsync(new SourceRequest
{
    Files = { new SourceFile { Path = "servizio.wsdl", Content = bytes } }
});

// the chosen operations described, each with the definition to add to the connector
DescribeResult described = await editor.DescribeOperationsAsync(new DescribeRequest
{
    Source = source,
    Resource = "anagrafe",
    Operations = { new OperationChoice("getCliente", "cliente") }
});

// what a new version of the source changes for the definitions of a connector
SourceRefreshResult refresh = await editor.RefreshAsync(new RefreshRequest { Source = v2, Definitions = definitions });

// every problem of a connector document, with operation and path
IReadOnlyList<EditorIssue> issues = editor.Validate(document);

// the JSON schema of the definitions of a kind, for the JSON view
JObject schema = editor.GetDefinitionSchema("rest");

// the test of an operation as it is in the editor: a simulation, a sample from the output schema,
// or a real call in an environment of the host, with the report of what was sent and received
OperationTestResult test = await editor.TestAsync(new OperationTestRequest
{
    Definition = definition,
    Input = new JObject { ["id"] = 7 },
    Answer = TestAnswer.Live,
    Environment = "Collaudo"
});

A SQL connector is written against a database, read by levels and described only when chosen:

var database = new DatabaseConnection { Environment = "Collaudo", Resource = "anagrafe" };

DatabaseSummary summary = await editor.ReadDatabaseAsync(database);            // objects per schema
DatabaseObjects routines = await editor.FindDatabaseObjectsAsync(new DatabaseObjectsRequest
{
    Connection = database, Group = DatabaseObjectGroup.Routines, Search = "clienti"
});
IReadOnlyList<DatabaseTable> tables = await editor.GetDatabaseColumnsAsync(new DatabaseColumnsRequest
{
    Connection = database, Objects = { "dbo.Clienti" }
});
DescribedOperation procedure = await editor.DescribeRoutineAsync(new DescribeRoutineRequest
{
    Connection = database, Id = "procedure:dbo.CercaClienti"
});
DescribedOperation query = await editor.DescribeQueryAsync(new DescribeQueryRequest
{
    Connection = database, Name = "clientiDi", CommandText = "SELECT Id, Nome FROM dbo.Clienti WHERE Provincia = @provincia"
});

The database is a sql resource of an environment of the host, or (AcceptConnectionSettings) the settings typed in the editor, for the guided creation before the resource exists. Only the system views are read, never the data; queries must be readings (ReadOnlyProblem). The providers are the HyperDev.Data providers the host registers (GetDatabaseProviders).

Real calls happen only in the environments the host gives (ConnectorEditorOptions.Environments, e.g. new EditorEnvironments().Add("Collaudo", environment)), within the time the editor waits (TimeoutMs) and never beyond MaxTestDuration; without environments only simulations and samples are offered. The input is checked against the input schema, the output against the output schema; the output and the capture have the sensitive data masked.

The types of the contract (ConnectorDocument, SourceRequest, SourceCatalog, DescribeResult, SourceRefreshResult, EditorIssue) are the JSON of the editor: serialize them with EditorJson.Settings (camelCase, enums by name, definitions kept as written). A request that cannot be answered throws ConnectorEditorException with a stable Code (ConnectorEditorErrors): the host returns it to the editor as a message, not as a failure of the server.

The web endpoints for an ASP.NET Core host are in HyperDev.Connectors.Editor.AspNetCore (AddConnectorEditor, MapConnectorEditor).

SourceDownloader reads a source by address with safe rules (http and https only, allowed hosts, no credentials, redirects checked one by one, size and time limits) and downloads the documents it refers to before loading, so the loader never goes to the network by itself.

Not yet: mapping of the host types.

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

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.1 80 11/22/2026
1.0.0 91 11/20/2026