From 5339719e6096ccfca2076f2687db7823296819f3 Mon Sep 17 00:00:00 2001 From: Apollo3zehn Date: Fri, 8 Mar 2024 13:00:59 +0100 Subject: [PATCH] Fix API --- openapi.json | 39 ------------------- src/clients/dotnet-client/NexusClient.g.cs | 38 ------------------ .../python-client/nexus_api/_nexus_api.py | 39 ------------------- 3 files changed, 116 deletions(-) diff --git a/openapi.json b/openapi.json index b6a73501..e0e6a190 100644 --- a/openapi.json +++ b/openapi.json @@ -1156,30 +1156,6 @@ } } }, - "/api/v1/users/authentication-schemes": { - "get": { - "tags": [ - "Users" - ], - "summary": "Returns a list of available authentication schemes.", - "operationId": "Users_GetAuthenticationSchemes", - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AuthenticationSchemeDescription" - } - } - } - } - } - } - } - }, "/api/v1/users/authenticate": { "post": { "tags": [ @@ -2177,21 +2153,6 @@ } } }, - "AuthenticationSchemeDescription": { - "type": "object", - "description": "Describes an OpenID connect provider.", - "additionalProperties": false, - "properties": { - "scheme": { - "type": "string", - "description": "The scheme." - }, - "displayName": { - "type": "string", - "description": "The display name." - } - } - }, "MeResponse": { "type": "object", "description": "A me response.", diff --git a/src/clients/dotnet-client/NexusClient.g.cs b/src/clients/dotnet-client/NexusClient.g.cs index cbdc1f73..684446af 100644 --- a/src/clients/dotnet-client/NexusClient.g.cs +++ b/src/clients/dotnet-client/NexusClient.g.cs @@ -2164,17 +2164,6 @@ public Task SetConfigurationAsync(IReadOnlyDictionary? conf /// public interface IUsersClient { - /// - /// Returns a list of available authentication schemes. - /// - IReadOnlyList GetAuthenticationSchemes(); - - /// - /// Returns a list of available authentication schemes. - /// - /// The token to cancel the current operation. - Task> GetAuthenticationSchemesAsync(CancellationToken cancellationToken = default); - /// /// Authenticates the user. /// @@ -2371,26 +2360,6 @@ internal UsersClient(NexusClient client) ___client = client; } - /// - public IReadOnlyList GetAuthenticationSchemes() - { - var __urlBuilder = new StringBuilder(); - __urlBuilder.Append("/api/v1/users/authentication-schemes"); - - var __url = __urlBuilder.ToString(); - return ___client.Invoke>("GET", __url, "application/json", default, default); - } - - /// - public Task> GetAuthenticationSchemesAsync(CancellationToken cancellationToken = default) - { - var __urlBuilder = new StringBuilder(); - __urlBuilder.Append("/api/v1/users/authentication-schemes"); - - var __url = __urlBuilder.ToString(); - return ___client.InvokeAsync>("GET", __url, "application/json", default, default, cancellationToken); - } - /// public HttpResponseMessage Authenticate(string scheme, string returnUrl) { @@ -3105,13 +3074,6 @@ public record ExtensionDescription(string Type, string Version, string? Descript /// An optional regular expressions pattern to select the catalogs to be visible. By default, all catalogs will be visible. public record DataSourceRegistration(string Type, Uri? ResourceLocator, IReadOnlyDictionary? Configuration, string? InfoUrl, string? ReleasePattern, string? VisibilityPattern); -/// -/// Describes an OpenID connect provider. -/// -/// The scheme. -/// The display name. -public record AuthenticationSchemeDescription(string Scheme, string DisplayName); - /// /// A me response. /// diff --git a/src/clients/python-client/nexus_api/_nexus_api.py b/src/clients/python-client/nexus_api/_nexus_api.py index 29b217bb..19ba6bf4 100644 --- a/src/clients/python-client/nexus_api/_nexus_api.py +++ b/src/clients/python-client/nexus_api/_nexus_api.py @@ -696,23 +696,6 @@ class DataSourceRegistration: """An optional regular expressions pattern to select the catalogs to be visible. By default, all catalogs will be visible.""" -@dataclass(frozen=True) -class AuthenticationSchemeDescription: - """ - Describes an OpenID connect provider. - - Args: - scheme: The scheme. - display_name: The display name. - """ - - scheme: str - """The scheme.""" - - display_name: str - """The display name.""" - - @dataclass(frozen=True) class MeResponse: """ @@ -1339,17 +1322,6 @@ class UsersAsyncClient: def __init__(self, client: NexusAsyncClient): self.___client = client - def get_authentication_schemes(self) -> Awaitable[list[AuthenticationSchemeDescription]]: - """ - Returns a list of available authentication schemes. - - Args: - """ - - __url = "/api/v1/users/authentication-schemes" - - return self.___client._invoke(list[AuthenticationSchemeDescription], "GET", __url, "application/json", None, None) - def authenticate(self, scheme: str, return_url: str) -> Awaitable[Response]: """ Authenticates the user. @@ -2114,17 +2086,6 @@ class UsersClient: def __init__(self, client: NexusClient): self.___client = client - def get_authentication_schemes(self) -> list[AuthenticationSchemeDescription]: - """ - Returns a list of available authentication schemes. - - Args: - """ - - __url = "/api/v1/users/authentication-schemes" - - return self.___client._invoke(list[AuthenticationSchemeDescription], "GET", __url, "application/json", None, None) - def authenticate(self, scheme: str, return_url: str) -> Response: """ Authenticates the user.