Remove unused check-version api (#3045)
This commit is contained in:
@@ -1,73 +0,0 @@
|
|||||||
// This file is part of MinIO Console Server
|
|
||||||
// Copyright (c) 2022 MinIO, Inc.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
package integration
|
|
||||||
|
|
||||||
import (
|
|
||||||
"fmt"
|
|
||||||
"log"
|
|
||||||
"net/http"
|
|
||||||
"testing"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
"github.com/stretchr/testify/assert"
|
|
||||||
)
|
|
||||||
|
|
||||||
func Test_VersionAPI(t *testing.T) {
|
|
||||||
assert := assert.New(t)
|
|
||||||
|
|
||||||
type args struct {
|
|
||||||
api string
|
|
||||||
}
|
|
||||||
tests := []struct {
|
|
||||||
name string
|
|
||||||
args args
|
|
||||||
expectedStatus int
|
|
||||||
expectedError error
|
|
||||||
}{
|
|
||||||
{
|
|
||||||
name: "Check Version",
|
|
||||||
args: args{
|
|
||||||
api: "/check-version",
|
|
||||||
},
|
|
||||||
expectedStatus: 200,
|
|
||||||
expectedError: nil,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
for _, tt := range tests {
|
|
||||||
t.Run(tt.name, func(t *testing.T) {
|
|
||||||
client := &http.Client{
|
|
||||||
Timeout: 3 * time.Second,
|
|
||||||
}
|
|
||||||
request, err := http.NewRequest(
|
|
||||||
"GET", fmt.Sprintf("http://localhost:9090/api/v1%s", tt.args.api), nil)
|
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
request.Header.Add("Content-Type", "application/json")
|
|
||||||
response, err := client.Do(request)
|
|
||||||
if err != nil {
|
|
||||||
log.Println(err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
if response != nil {
|
|
||||||
assert.Equal(tt.expectedStatus, response.StatusCode, "Status Code is incorrect")
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
|
||||||
// Copyright (c) 2023 MinIO, Inc.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
package models
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/go-openapi/strfmt"
|
|
||||||
"github.com/go-openapi/swag"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CheckVersionResponse check version response
|
|
||||||
//
|
|
||||||
// swagger:model checkVersionResponse
|
|
||||||
type CheckVersionResponse struct {
|
|
||||||
|
|
||||||
// current version
|
|
||||||
CurrentVersion string `json:"current_version,omitempty"`
|
|
||||||
|
|
||||||
// latest version
|
|
||||||
LatestVersion string `json:"latest_version,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// Validate validates this check version response
|
|
||||||
func (m *CheckVersionResponse) Validate(formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// ContextValidate validates this check version response based on context it is used
|
|
||||||
func (m *CheckVersionResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// MarshalBinary interface implementation
|
|
||||||
func (m *CheckVersionResponse) MarshalBinary() ([]byte, error) {
|
|
||||||
if m == nil {
|
|
||||||
return nil, nil
|
|
||||||
}
|
|
||||||
return swag.WriteJSON(m)
|
|
||||||
}
|
|
||||||
|
|
||||||
// UnmarshalBinary interface implementation
|
|
||||||
func (m *CheckVersionResponse) UnmarshalBinary(b []byte) error {
|
|
||||||
var res CheckVersionResponse
|
|
||||||
if err := swag.ReadJSON(b, &res); err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
*m = res
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
// This file is part of MinIO Console Server
|
|
||||||
// Copyright (c) 2022 MinIO, Inc.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
package utils
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"fmt"
|
|
||||||
"io"
|
|
||||||
"regexp"
|
|
||||||
|
|
||||||
"github.com/minio/console/pkg/http"
|
|
||||||
)
|
|
||||||
|
|
||||||
var ErrCantDetermineMinIOImage = errors.New("can't determine MinIO Image")
|
|
||||||
|
|
||||||
// getLatestMinIOImage returns the latest docker image for MinIO if found on the internet
|
|
||||||
func GetLatestMinIOImage(client http.ClientI) (*string, error) {
|
|
||||||
resp, err := client.Get("https://dl.min.io/server/minio/release/linux-amd64/")
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
defer resp.Body.Close()
|
|
||||||
|
|
||||||
body, err := io.ReadAll(resp.Body)
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
re := regexp.MustCompile(`minio\.(RELEASE.*?Z)"`)
|
|
||||||
// look for a single match
|
|
||||||
matches := re.FindAllStringSubmatch(string(body), 1)
|
|
||||||
for i := range matches {
|
|
||||||
release := matches[i][1]
|
|
||||||
dockerImage := fmt.Sprintf("minio/minio:%s", release)
|
|
||||||
return &dockerImage, nil
|
|
||||||
}
|
|
||||||
return nil, ErrCantDetermineMinIOImage
|
|
||||||
}
|
|
||||||
@@ -1228,11 +1228,6 @@ export interface SubnetOrganization {
|
|||||||
shortName?: string;
|
shortName?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CheckVersionResponse {
|
|
||||||
current_version?: string;
|
|
||||||
latest_version?: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface PermissionResource {
|
export interface PermissionResource {
|
||||||
resource?: string;
|
resource?: string;
|
||||||
conditionOperator?: string;
|
conditionOperator?: string;
|
||||||
@@ -1852,23 +1847,6 @@ export class Api<
|
|||||||
...params,
|
...params,
|
||||||
}),
|
}),
|
||||||
};
|
};
|
||||||
checkVersion = {
|
|
||||||
/**
|
|
||||||
* No description
|
|
||||||
*
|
|
||||||
* @tags System
|
|
||||||
* @name CheckMinIoVersion
|
|
||||||
* @summary Checks the current MinIO version against the latest
|
|
||||||
* @request GET:/check-version
|
|
||||||
*/
|
|
||||||
checkMinIoVersion: (params: RequestParams = {}) =>
|
|
||||||
this.request<CheckVersionResponse, ApiError>({
|
|
||||||
path: `/check-version`,
|
|
||||||
method: "GET",
|
|
||||||
format: "json",
|
|
||||||
...params,
|
|
||||||
}),
|
|
||||||
};
|
|
||||||
account = {
|
account = {
|
||||||
/**
|
/**
|
||||||
* No description
|
* No description
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { loginStrategyType } from "./login.types";
|
|||||||
import MainError from "../Console/Common/MainError/MainError";
|
import MainError from "../Console/Common/MainError/MainError";
|
||||||
import { AppState, useAppDispatch } from "../../store";
|
import { AppState, useAppDispatch } from "../../store";
|
||||||
import { useSelector } from "react-redux";
|
import { useSelector } from "react-redux";
|
||||||
import { getFetchConfigurationAsync, getVersionAsync } from "./loginThunks";
|
import { getFetchConfigurationAsync } from "./loginThunks";
|
||||||
import { resetForm } from "./loginSlice";
|
import { resetForm } from "./loginSlice";
|
||||||
import StrategyForm from "./StrategyForm";
|
import StrategyForm from "./StrategyForm";
|
||||||
import { getLogoVar } from "../../config";
|
import { getLogoVar } from "../../config";
|
||||||
@@ -57,9 +57,6 @@ const Login = () => {
|
|||||||
const loadingFetchConfiguration = useSelector(
|
const loadingFetchConfiguration = useSelector(
|
||||||
(state: AppState) => state.login.loadingFetchConfiguration,
|
(state: AppState) => state.login.loadingFetchConfiguration,
|
||||||
);
|
);
|
||||||
const loadingVersion = useSelector(
|
|
||||||
(state: AppState) => state.login.loadingVersion,
|
|
||||||
);
|
|
||||||
const navigateTo = useSelector((state: AppState) => state.login.navigateTo);
|
const navigateTo = useSelector((state: AppState) => state.login.navigateTo);
|
||||||
|
|
||||||
const isK8S = useSelector((state: AppState) => state.login.isK8S);
|
const isK8S = useSelector((state: AppState) => state.login.isK8S);
|
||||||
@@ -81,12 +78,6 @@ const Login = () => {
|
|||||||
}
|
}
|
||||||
}, [loadingFetchConfiguration, dispatch]);
|
}, [loadingFetchConfiguration, dispatch]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (loadingVersion) {
|
|
||||||
dispatch(getVersionAsync());
|
|
||||||
}
|
|
||||||
}, [dispatch, loadingVersion]);
|
|
||||||
|
|
||||||
let loginComponent;
|
let loginComponent;
|
||||||
|
|
||||||
switch (loginStrategy.loginStrategy) {
|
switch (loginStrategy.loginStrategy) {
|
||||||
|
|||||||
@@ -16,11 +16,7 @@
|
|||||||
|
|
||||||
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
import { createSlice, PayloadAction } from "@reduxjs/toolkit";
|
||||||
import { LoginDetails } from "api/consoleApi";
|
import { LoginDetails } from "api/consoleApi";
|
||||||
import {
|
import { doLoginAsync, getFetchConfigurationAsync } from "./loginThunks";
|
||||||
doLoginAsync,
|
|
||||||
getFetchConfigurationAsync,
|
|
||||||
getVersionAsync,
|
|
||||||
} from "./loginThunks";
|
|
||||||
|
|
||||||
export interface LoginState {
|
export interface LoginState {
|
||||||
accessKey: string;
|
accessKey: string;
|
||||||
@@ -31,8 +27,6 @@ export interface LoginState {
|
|||||||
loginStrategy: LoginDetails;
|
loginStrategy: LoginDetails;
|
||||||
loginSending: boolean;
|
loginSending: boolean;
|
||||||
loadingFetchConfiguration: boolean;
|
loadingFetchConfiguration: boolean;
|
||||||
latestMinIOVersion: string;
|
|
||||||
loadingVersion: boolean;
|
|
||||||
isK8S: boolean;
|
isK8S: boolean;
|
||||||
navigateTo: string;
|
navigateTo: string;
|
||||||
ssoEmbeddedIDPDisplay: boolean;
|
ssoEmbeddedIDPDisplay: boolean;
|
||||||
@@ -49,8 +43,6 @@ const initialState: LoginState = {
|
|||||||
},
|
},
|
||||||
loginSending: false,
|
loginSending: false,
|
||||||
loadingFetchConfiguration: true,
|
loadingFetchConfiguration: true,
|
||||||
latestMinIOVersion: "",
|
|
||||||
loadingVersion: true,
|
|
||||||
isK8S: false,
|
isK8S: false,
|
||||||
backgroundAnimation: false,
|
backgroundAnimation: false,
|
||||||
navigateTo: "",
|
navigateTo: "",
|
||||||
@@ -83,18 +75,6 @@ export const loginSlice = createSlice({
|
|||||||
},
|
},
|
||||||
extraReducers: (builder) => {
|
extraReducers: (builder) => {
|
||||||
builder
|
builder
|
||||||
.addCase(getVersionAsync.pending, (state, action) => {
|
|
||||||
state.loadingVersion = true;
|
|
||||||
})
|
|
||||||
.addCase(getVersionAsync.rejected, (state, action) => {
|
|
||||||
state.loadingVersion = false;
|
|
||||||
})
|
|
||||||
.addCase(getVersionAsync.fulfilled, (state, action) => {
|
|
||||||
state.loadingVersion = false;
|
|
||||||
if (action.payload) {
|
|
||||||
state.latestMinIOVersion = action.payload;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.addCase(getFetchConfigurationAsync.pending, (state, action) => {
|
.addCase(getFetchConfigurationAsync.pending, (state, action) => {
|
||||||
state.loadingFetchConfiguration = true;
|
state.loadingFetchConfiguration = true;
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -76,21 +76,3 @@ export const getFetchConfigurationAsync = createAsyncThunk(
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
export const getVersionAsync = createAsyncThunk(
|
|
||||||
"login/getVersionAsync",
|
|
||||||
async (_, { getState, rejectWithValue, dispatch }) => {
|
|
||||||
return api.checkVersion
|
|
||||||
.checkMinIoVersion()
|
|
||||||
.then((res) => {
|
|
||||||
if (res.data !== undefined) {
|
|
||||||
return res.data.latest_version;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
.catch(async (res) => {
|
|
||||||
const err = (await res.json()) as ApiError;
|
|
||||||
dispatch(setErrorSnackMessage(errorToHandler(err)));
|
|
||||||
return rejectWithValue(false);
|
|
||||||
});
|
|
||||||
},
|
|
||||||
);
|
|
||||||
|
|||||||
@@ -127,8 +127,6 @@ func configureAPI(api *operations.ConsoleAPI) http.Handler {
|
|||||||
registerServiceHandlers(api)
|
registerServiceHandlers(api)
|
||||||
// Register session handlers
|
// Register session handlers
|
||||||
registerSessionHandlers(api)
|
registerSessionHandlers(api)
|
||||||
// Register version handlers
|
|
||||||
registerVersionHandlers(api)
|
|
||||||
// Register admin info handlers
|
// Register admin info handlers
|
||||||
registerAdminInfoHandlers(api)
|
registerAdminInfoHandlers(api)
|
||||||
// Register admin arns handlers
|
// Register admin arns handlers
|
||||||
|
|||||||
@@ -2561,30 +2561,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/check-version": {
|
|
||||||
"get": {
|
|
||||||
"security": [],
|
|
||||||
"tags": [
|
|
||||||
"System"
|
|
||||||
],
|
|
||||||
"summary": "Checks the current MinIO version against the latest",
|
|
||||||
"operationId": "CheckMinIOVersion",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "A successful response.",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/checkVersionResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"default": {
|
|
||||||
"description": "Generic error response.",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ApiError"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/configs": {
|
"/configs": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -6096,17 +6072,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"checkVersionResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"current_version": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"latest_version": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"configDescription": {
|
"configDescription": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
@@ -11637,30 +11602,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"/check-version": {
|
|
||||||
"get": {
|
|
||||||
"security": [],
|
|
||||||
"tags": [
|
|
||||||
"System"
|
|
||||||
],
|
|
||||||
"summary": "Checks the current MinIO version against the latest",
|
|
||||||
"operationId": "CheckMinIOVersion",
|
|
||||||
"responses": {
|
|
||||||
"200": {
|
|
||||||
"description": "A successful response.",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/checkVersionResponse"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"default": {
|
|
||||||
"description": "Generic error response.",
|
|
||||||
"schema": {
|
|
||||||
"$ref": "#/definitions/ApiError"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"/configs": {
|
"/configs": {
|
||||||
"get": {
|
"get": {
|
||||||
"tags": [
|
"tags": [
|
||||||
@@ -15321,17 +15262,6 @@ func init() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"checkVersionResponse": {
|
|
||||||
"type": "object",
|
|
||||||
"properties": {
|
|
||||||
"current_version": {
|
|
||||||
"type": "string"
|
|
||||||
},
|
|
||||||
"latest_version": {
|
|
||||||
"type": "string"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"configDescription": {
|
"configDescription": {
|
||||||
"type": "object",
|
"type": "object",
|
||||||
"properties": {
|
"properties": {
|
||||||
|
|||||||
@@ -133,9 +133,6 @@ func NewConsoleAPI(spec *loads.Document) *ConsoleAPI {
|
|||||||
AccountChangeUserPasswordHandler: account.ChangeUserPasswordHandlerFunc(func(params account.ChangeUserPasswordParams, principal *models.Principal) middleware.Responder {
|
AccountChangeUserPasswordHandler: account.ChangeUserPasswordHandlerFunc(func(params account.ChangeUserPasswordParams, principal *models.Principal) middleware.Responder {
|
||||||
return middleware.NotImplemented("operation account.ChangeUserPassword has not yet been implemented")
|
return middleware.NotImplemented("operation account.ChangeUserPassword has not yet been implemented")
|
||||||
}),
|
}),
|
||||||
SystemCheckMinIOVersionHandler: system.CheckMinIOVersionHandlerFunc(func(params system.CheckMinIOVersionParams) middleware.Responder {
|
|
||||||
return middleware.NotImplemented("operation system.CheckMinIOVersion has not yet been implemented")
|
|
||||||
}),
|
|
||||||
UserCheckUserServiceAccountsHandler: user.CheckUserServiceAccountsHandlerFunc(func(params user.CheckUserServiceAccountsParams, principal *models.Principal) middleware.Responder {
|
UserCheckUserServiceAccountsHandler: user.CheckUserServiceAccountsHandlerFunc(func(params user.CheckUserServiceAccountsParams, principal *models.Principal) middleware.Responder {
|
||||||
return middleware.NotImplemented("operation user.CheckUserServiceAccounts has not yet been implemented")
|
return middleware.NotImplemented("operation user.CheckUserServiceAccounts has not yet been implemented")
|
||||||
}),
|
}),
|
||||||
@@ -652,8 +649,6 @@ type ConsoleAPI struct {
|
|||||||
UserBulkUpdateUsersGroupsHandler user.BulkUpdateUsersGroupsHandler
|
UserBulkUpdateUsersGroupsHandler user.BulkUpdateUsersGroupsHandler
|
||||||
// AccountChangeUserPasswordHandler sets the operation handler for the change user password operation
|
// AccountChangeUserPasswordHandler sets the operation handler for the change user password operation
|
||||||
AccountChangeUserPasswordHandler account.ChangeUserPasswordHandler
|
AccountChangeUserPasswordHandler account.ChangeUserPasswordHandler
|
||||||
// SystemCheckMinIOVersionHandler sets the operation handler for the check min i o version operation
|
|
||||||
SystemCheckMinIOVersionHandler system.CheckMinIOVersionHandler
|
|
||||||
// UserCheckUserServiceAccountsHandler sets the operation handler for the check user service accounts operation
|
// UserCheckUserServiceAccountsHandler sets the operation handler for the check user service accounts operation
|
||||||
UserCheckUserServiceAccountsHandler user.CheckUserServiceAccountsHandler
|
UserCheckUserServiceAccountsHandler user.CheckUserServiceAccountsHandler
|
||||||
// ConfigurationConfigInfoHandler sets the operation handler for the config info operation
|
// ConfigurationConfigInfoHandler sets the operation handler for the config info operation
|
||||||
@@ -1072,9 +1067,6 @@ func (o *ConsoleAPI) Validate() error {
|
|||||||
if o.AccountChangeUserPasswordHandler == nil {
|
if o.AccountChangeUserPasswordHandler == nil {
|
||||||
unregistered = append(unregistered, "account.ChangeUserPasswordHandler")
|
unregistered = append(unregistered, "account.ChangeUserPasswordHandler")
|
||||||
}
|
}
|
||||||
if o.SystemCheckMinIOVersionHandler == nil {
|
|
||||||
unregistered = append(unregistered, "system.CheckMinIOVersionHandler")
|
|
||||||
}
|
|
||||||
if o.UserCheckUserServiceAccountsHandler == nil {
|
if o.UserCheckUserServiceAccountsHandler == nil {
|
||||||
unregistered = append(unregistered, "user.CheckUserServiceAccountsHandler")
|
unregistered = append(unregistered, "user.CheckUserServiceAccountsHandler")
|
||||||
}
|
}
|
||||||
@@ -1665,10 +1657,6 @@ func (o *ConsoleAPI) initHandlerCache() {
|
|||||||
o.handlers["POST"] = make(map[string]http.Handler)
|
o.handlers["POST"] = make(map[string]http.Handler)
|
||||||
}
|
}
|
||||||
o.handlers["POST"]["/account/change-user-password"] = account.NewChangeUserPassword(o.context, o.AccountChangeUserPasswordHandler)
|
o.handlers["POST"]["/account/change-user-password"] = account.NewChangeUserPassword(o.context, o.AccountChangeUserPasswordHandler)
|
||||||
if o.handlers["GET"] == nil {
|
|
||||||
o.handlers["GET"] = make(map[string]http.Handler)
|
|
||||||
}
|
|
||||||
o.handlers["GET"]["/check-version"] = system.NewCheckMinIOVersion(o.context, o.SystemCheckMinIOVersionHandler)
|
|
||||||
if o.handlers["POST"] == nil {
|
if o.handlers["POST"] == nil {
|
||||||
o.handlers["POST"] = make(map[string]http.Handler)
|
o.handlers["POST"] = make(map[string]http.Handler)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,73 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
|
||||||
// Copyright (c) 2023 MinIO, Inc.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
package system
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CheckMinIOVersionHandlerFunc turns a function with the right signature into a check min i o version handler
|
|
||||||
type CheckMinIOVersionHandlerFunc func(CheckMinIOVersionParams) middleware.Responder
|
|
||||||
|
|
||||||
// Handle executing the request and returning a response
|
|
||||||
func (fn CheckMinIOVersionHandlerFunc) Handle(params CheckMinIOVersionParams) middleware.Responder {
|
|
||||||
return fn(params)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CheckMinIOVersionHandler interface for that can handle valid check min i o version params
|
|
||||||
type CheckMinIOVersionHandler interface {
|
|
||||||
Handle(CheckMinIOVersionParams) middleware.Responder
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewCheckMinIOVersion creates a new http.Handler for the check min i o version operation
|
|
||||||
func NewCheckMinIOVersion(ctx *middleware.Context, handler CheckMinIOVersionHandler) *CheckMinIOVersion {
|
|
||||||
return &CheckMinIOVersion{Context: ctx, Handler: handler}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
CheckMinIOVersion swagger:route GET /check-version System checkMinIOVersion
|
|
||||||
|
|
||||||
Checks the current MinIO version against the latest
|
|
||||||
*/
|
|
||||||
type CheckMinIOVersion struct {
|
|
||||||
Context *middleware.Context
|
|
||||||
Handler CheckMinIOVersionHandler
|
|
||||||
}
|
|
||||||
|
|
||||||
func (o *CheckMinIOVersion) ServeHTTP(rw http.ResponseWriter, r *http.Request) {
|
|
||||||
route, rCtx, _ := o.Context.RouteInfo(r)
|
|
||||||
if rCtx != nil {
|
|
||||||
*r = *rCtx
|
|
||||||
}
|
|
||||||
var Params = NewCheckMinIOVersionParams()
|
|
||||||
if err := o.Context.BindValidRequest(r, route, &Params); err != nil { // bind params
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, err)
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
res := o.Handler.Handle(Params) // actually handle the request
|
|
||||||
o.Context.Respond(rw, r, route.Produces, route, res)
|
|
||||||
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
|
||||||
// Copyright (c) 2023 MinIO, Inc.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
package system
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/errors"
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
)
|
|
||||||
|
|
||||||
// NewCheckMinIOVersionParams creates a new CheckMinIOVersionParams object
|
|
||||||
//
|
|
||||||
// There are no default values defined in the spec.
|
|
||||||
func NewCheckMinIOVersionParams() CheckMinIOVersionParams {
|
|
||||||
|
|
||||||
return CheckMinIOVersionParams{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// CheckMinIOVersionParams contains all the bound params for the check min i o version operation
|
|
||||||
// typically these are obtained from a http.Request
|
|
||||||
//
|
|
||||||
// swagger:parameters CheckMinIOVersion
|
|
||||||
type CheckMinIOVersionParams struct {
|
|
||||||
|
|
||||||
// HTTP Request Object
|
|
||||||
HTTPRequest *http.Request `json:"-"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// BindRequest both binds and validates a request, it assumes that complex things implement a Validatable(strfmt.Registry) error interface
|
|
||||||
// for simple values it will use straight method calls.
|
|
||||||
//
|
|
||||||
// To ensure default values, the struct must have been initialized with NewCheckMinIOVersionParams() beforehand.
|
|
||||||
func (o *CheckMinIOVersionParams) BindRequest(r *http.Request, route *middleware.MatchedRoute) error {
|
|
||||||
var res []error
|
|
||||||
|
|
||||||
o.HTTPRequest = r
|
|
||||||
|
|
||||||
if len(res) > 0 {
|
|
||||||
return errors.CompositeValidationError(res...)
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
@@ -1,135 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
|
||||||
// Copyright (c) 2023 MinIO, Inc.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
package system
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the swagger generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"net/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime"
|
|
||||||
|
|
||||||
"github.com/minio/console/models"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CheckMinIOVersionOKCode is the HTTP code returned for type CheckMinIOVersionOK
|
|
||||||
const CheckMinIOVersionOKCode int = 200
|
|
||||||
|
|
||||||
/*
|
|
||||||
CheckMinIOVersionOK A successful response.
|
|
||||||
|
|
||||||
swagger:response checkMinIOVersionOK
|
|
||||||
*/
|
|
||||||
type CheckMinIOVersionOK struct {
|
|
||||||
|
|
||||||
/*
|
|
||||||
In: Body
|
|
||||||
*/
|
|
||||||
Payload *models.CheckVersionResponse `json:"body,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewCheckMinIOVersionOK creates CheckMinIOVersionOK with default headers values
|
|
||||||
func NewCheckMinIOVersionOK() *CheckMinIOVersionOK {
|
|
||||||
|
|
||||||
return &CheckMinIOVersionOK{}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPayload adds the payload to the check min i o version o k response
|
|
||||||
func (o *CheckMinIOVersionOK) WithPayload(payload *models.CheckVersionResponse) *CheckMinIOVersionOK {
|
|
||||||
o.Payload = payload
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetPayload sets the payload to the check min i o version o k response
|
|
||||||
func (o *CheckMinIOVersionOK) SetPayload(payload *models.CheckVersionResponse) {
|
|
||||||
o.Payload = payload
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *CheckMinIOVersionOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.WriteHeader(200)
|
|
||||||
if o.Payload != nil {
|
|
||||||
payload := o.Payload
|
|
||||||
if err := producer.Produce(rw, payload); err != nil {
|
|
||||||
panic(err) // let the recovery middleware deal with this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
CheckMinIOVersionDefault Generic error response.
|
|
||||||
|
|
||||||
swagger:response checkMinIOVersionDefault
|
|
||||||
*/
|
|
||||||
type CheckMinIOVersionDefault struct {
|
|
||||||
_statusCode int
|
|
||||||
|
|
||||||
/*
|
|
||||||
In: Body
|
|
||||||
*/
|
|
||||||
Payload *models.APIError `json:"body,omitempty"`
|
|
||||||
}
|
|
||||||
|
|
||||||
// NewCheckMinIOVersionDefault creates CheckMinIOVersionDefault with default headers values
|
|
||||||
func NewCheckMinIOVersionDefault(code int) *CheckMinIOVersionDefault {
|
|
||||||
if code <= 0 {
|
|
||||||
code = 500
|
|
||||||
}
|
|
||||||
|
|
||||||
return &CheckMinIOVersionDefault{
|
|
||||||
_statusCode: code,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithStatusCode adds the status to the check min i o version default response
|
|
||||||
func (o *CheckMinIOVersionDefault) WithStatusCode(code int) *CheckMinIOVersionDefault {
|
|
||||||
o._statusCode = code
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetStatusCode sets the status to the check min i o version default response
|
|
||||||
func (o *CheckMinIOVersionDefault) SetStatusCode(code int) {
|
|
||||||
o._statusCode = code
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithPayload adds the payload to the check min i o version default response
|
|
||||||
func (o *CheckMinIOVersionDefault) WithPayload(payload *models.APIError) *CheckMinIOVersionDefault {
|
|
||||||
o.Payload = payload
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetPayload sets the payload to the check min i o version default response
|
|
||||||
func (o *CheckMinIOVersionDefault) SetPayload(payload *models.APIError) {
|
|
||||||
o.Payload = payload
|
|
||||||
}
|
|
||||||
|
|
||||||
// WriteResponse to the client
|
|
||||||
func (o *CheckMinIOVersionDefault) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
||||||
|
|
||||||
rw.WriteHeader(o._statusCode)
|
|
||||||
if o.Payload != nil {
|
|
||||||
payload := o.Payload
|
|
||||||
if err := producer.Produce(rw, payload); err != nil {
|
|
||||||
panic(err) // let the recovery middleware deal with this
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
// Code generated by go-swagger; DO NOT EDIT.
|
|
||||||
|
|
||||||
// This file is part of MinIO Console Server
|
|
||||||
// Copyright (c) 2023 MinIO, Inc.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
//
|
|
||||||
|
|
||||||
package system
|
|
||||||
|
|
||||||
// This file was generated by the swagger tool.
|
|
||||||
// Editing this file might prove futile when you re-run the generate command
|
|
||||||
|
|
||||||
import (
|
|
||||||
"errors"
|
|
||||||
"net/url"
|
|
||||||
golangswaggerpaths "path"
|
|
||||||
)
|
|
||||||
|
|
||||||
// CheckMinIOVersionURL generates an URL for the check min i o version operation
|
|
||||||
type CheckMinIOVersionURL struct {
|
|
||||||
_basePath string
|
|
||||||
}
|
|
||||||
|
|
||||||
// WithBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *CheckMinIOVersionURL) WithBasePath(bp string) *CheckMinIOVersionURL {
|
|
||||||
o.SetBasePath(bp)
|
|
||||||
return o
|
|
||||||
}
|
|
||||||
|
|
||||||
// SetBasePath sets the base path for this url builder, only required when it's different from the
|
|
||||||
// base path specified in the swagger spec.
|
|
||||||
// When the value of the base path is an empty string
|
|
||||||
func (o *CheckMinIOVersionURL) SetBasePath(bp string) {
|
|
||||||
o._basePath = bp
|
|
||||||
}
|
|
||||||
|
|
||||||
// Build a url path and query string
|
|
||||||
func (o *CheckMinIOVersionURL) Build() (*url.URL, error) {
|
|
||||||
var _result url.URL
|
|
||||||
|
|
||||||
var _path = "/check-version"
|
|
||||||
|
|
||||||
_basePath := o._basePath
|
|
||||||
if _basePath == "" {
|
|
||||||
_basePath = "/api/v1"
|
|
||||||
}
|
|
||||||
_result.Path = golangswaggerpaths.Join(_basePath, _path)
|
|
||||||
|
|
||||||
return &_result, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// Must is a helper function to panic when the url builder returns an error
|
|
||||||
func (o *CheckMinIOVersionURL) Must(u *url.URL, err error) *url.URL {
|
|
||||||
if err != nil {
|
|
||||||
panic(err)
|
|
||||||
}
|
|
||||||
if u == nil {
|
|
||||||
panic("url can't be nil")
|
|
||||||
}
|
|
||||||
return u
|
|
||||||
}
|
|
||||||
|
|
||||||
// String returns the string representation of the path with query string
|
|
||||||
func (o *CheckMinIOVersionURL) String() string {
|
|
||||||
return o.Must(o.Build()).String()
|
|
||||||
}
|
|
||||||
|
|
||||||
// BuildFull builds a full url with scheme, host, path and query string
|
|
||||||
func (o *CheckMinIOVersionURL) BuildFull(scheme, host string) (*url.URL, error) {
|
|
||||||
if scheme == "" {
|
|
||||||
return nil, errors.New("scheme is required for a full url on CheckMinIOVersionURL")
|
|
||||||
}
|
|
||||||
if host == "" {
|
|
||||||
return nil, errors.New("host is required for a full url on CheckMinIOVersionURL")
|
|
||||||
}
|
|
||||||
|
|
||||||
base, err := o.Build()
|
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
|
|
||||||
base.Scheme = scheme
|
|
||||||
base.Host = host
|
|
||||||
return base, nil
|
|
||||||
}
|
|
||||||
|
|
||||||
// StringFull returns the string representation of a complete url
|
|
||||||
func (o *CheckMinIOVersionURL) StringFull(scheme, host string) string {
|
|
||||||
return o.Must(o.BuildFull(scheme, host)).String()
|
|
||||||
}
|
|
||||||
@@ -1,59 +0,0 @@
|
|||||||
// This file is part of MinIO Console Server
|
|
||||||
// Copyright (c) 2022 MinIO, Inc.
|
|
||||||
//
|
|
||||||
// This program is free software: you can redistribute it and/or modify
|
|
||||||
// it under the terms of the GNU Affero General Public License as published by
|
|
||||||
// the Free Software Foundation, either version 3 of the License, or
|
|
||||||
// (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU Affero General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU Affero General Public License
|
|
||||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
|
|
||||||
package restapi
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
"time"
|
|
||||||
|
|
||||||
xhttp "github.com/minio/console/pkg/http"
|
|
||||||
|
|
||||||
"github.com/go-openapi/runtime/middleware"
|
|
||||||
"github.com/minio/console/models"
|
|
||||||
"github.com/minio/console/pkg/utils"
|
|
||||||
"github.com/minio/console/restapi/operations"
|
|
||||||
systemApi "github.com/minio/console/restapi/operations/system"
|
|
||||||
)
|
|
||||||
|
|
||||||
func registerVersionHandlers(api *operations.ConsoleAPI) {
|
|
||||||
api.SystemCheckMinIOVersionHandler = systemApi.CheckMinIOVersionHandlerFunc(func(params systemApi.CheckMinIOVersionParams) middleware.Responder {
|
|
||||||
versionResponse, err := getVersionResponse(params)
|
|
||||||
if err != nil {
|
|
||||||
return systemApi.NewCheckMinIOVersionDefault(err.Code).WithPayload(err.APIError)
|
|
||||||
}
|
|
||||||
return systemApi.NewCheckMinIOVersionOK().WithPayload(versionResponse)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// getSessionResponse parse the token of the current session and returns a list of allowed actions to render in the UI
|
|
||||||
func getVersionResponse(params systemApi.CheckMinIOVersionParams) (*models.CheckVersionResponse, *CodedAPIError) {
|
|
||||||
ctx, cancel := context.WithCancel(params.HTTPRequest.Context())
|
|
||||||
defer cancel()
|
|
||||||
|
|
||||||
client := GetConsoleHTTPClient("", getClientIP(params.HTTPRequest))
|
|
||||||
client.Timeout = 15 * time.Second
|
|
||||||
|
|
||||||
ver, err := utils.GetLatestMinIOImage(&xhttp.Client{
|
|
||||||
Client: client,
|
|
||||||
})
|
|
||||||
if err != nil {
|
|
||||||
return nil, ErrorWithContext(ctx, err)
|
|
||||||
}
|
|
||||||
return &models.CheckVersionResponse{
|
|
||||||
LatestVersion: *ver,
|
|
||||||
}, nil
|
|
||||||
}
|
|
||||||
61
swagger.yml
61
swagger.yml
@@ -1,3 +1,5 @@
|
|||||||
|
# @format
|
||||||
|
|
||||||
swagger: "2.0"
|
swagger: "2.0"
|
||||||
info:
|
info:
|
||||||
title: MinIO Console Server
|
title: MinIO Console Server
|
||||||
@@ -23,7 +25,7 @@ securityDefinitions:
|
|||||||
type: apiKey
|
type: apiKey
|
||||||
# Apply the key security definition to all APIs
|
# Apply the key security definition to all APIs
|
||||||
security:
|
security:
|
||||||
- key: [ ]
|
- key: []
|
||||||
paths:
|
paths:
|
||||||
/login:
|
/login:
|
||||||
get:
|
get:
|
||||||
@@ -39,7 +41,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ApiError"
|
$ref: "#/definitions/ApiError"
|
||||||
# Exclude this API from the authentication requirement
|
# Exclude this API from the authentication requirement
|
||||||
security: [ ]
|
security: []
|
||||||
tags:
|
tags:
|
||||||
- Auth
|
- Auth
|
||||||
post:
|
post:
|
||||||
@@ -59,7 +61,7 @@ paths:
|
|||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ApiError"
|
$ref: "#/definitions/ApiError"
|
||||||
# Exclude this API from the authentication requirement
|
# Exclude this API from the authentication requirement
|
||||||
security: [ ]
|
security: []
|
||||||
tags:
|
tags:
|
||||||
- Auth
|
- Auth
|
||||||
/login/oauth2/auth:
|
/login/oauth2/auth:
|
||||||
@@ -79,7 +81,7 @@ paths:
|
|||||||
description: Generic error response.
|
description: Generic error response.
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/definitions/ApiError"
|
$ref: "#/definitions/ApiError"
|
||||||
security: [ ]
|
security: []
|
||||||
tags:
|
tags:
|
||||||
- Auth
|
- Auth
|
||||||
|
|
||||||
@@ -119,23 +121,6 @@ paths:
|
|||||||
tags:
|
tags:
|
||||||
- Auth
|
- Auth
|
||||||
|
|
||||||
/check-version:
|
|
||||||
get:
|
|
||||||
summary: Checks the current MinIO version against the latest
|
|
||||||
operationId: CheckMinIOVersion
|
|
||||||
responses:
|
|
||||||
200:
|
|
||||||
description: A successful response.
|
|
||||||
schema:
|
|
||||||
$ref: "#/definitions/checkVersionResponse"
|
|
||||||
default:
|
|
||||||
description: Generic error response.
|
|
||||||
schema:
|
|
||||||
$ref: "#/definitions/ApiError"
|
|
||||||
security: [ ]
|
|
||||||
tags:
|
|
||||||
- System
|
|
||||||
|
|
||||||
/account/change-password:
|
/account/change-password:
|
||||||
post:
|
post:
|
||||||
summary: Change password of currently logged in user.
|
summary: Change password of currently logged in user.
|
||||||
@@ -297,8 +282,8 @@ paths:
|
|||||||
get:
|
get:
|
||||||
summary: List Objects
|
summary: List Objects
|
||||||
security:
|
security:
|
||||||
- key: [ ]
|
- key: []
|
||||||
- anonymous: [ ]
|
- anonymous: []
|
||||||
operationId: ListObjects
|
operationId: ListObjects
|
||||||
parameters:
|
parameters:
|
||||||
- name: bucket_name
|
- name: bucket_name
|
||||||
@@ -417,8 +402,8 @@ paths:
|
|||||||
post:
|
post:
|
||||||
summary: Uploads an Object.
|
summary: Uploads an Object.
|
||||||
security:
|
security:
|
||||||
- key: [ ]
|
- key: []
|
||||||
- anonymous: [ ]
|
- anonymous: []
|
||||||
consumes:
|
consumes:
|
||||||
- multipart/form-data
|
- multipart/form-data
|
||||||
parameters:
|
parameters:
|
||||||
@@ -444,8 +429,8 @@ paths:
|
|||||||
summary: Download Multiple Objects
|
summary: Download Multiple Objects
|
||||||
operationId: DownloadMultipleObjects
|
operationId: DownloadMultipleObjects
|
||||||
security:
|
security:
|
||||||
- key: [ ]
|
- key: []
|
||||||
- anonymous: [ ]
|
- anonymous: []
|
||||||
produces:
|
produces:
|
||||||
- application/octet-stream
|
- application/octet-stream
|
||||||
parameters:
|
parameters:
|
||||||
@@ -477,8 +462,8 @@ paths:
|
|||||||
summary: Download Object
|
summary: Download Object
|
||||||
operationId: Download Object
|
operationId: Download Object
|
||||||
security:
|
security:
|
||||||
- key: [ ]
|
- key: []
|
||||||
- anonymous: [ ]
|
- anonymous: []
|
||||||
produces:
|
produces:
|
||||||
- application/octet-stream
|
- application/octet-stream
|
||||||
parameters:
|
parameters:
|
||||||
@@ -2953,7 +2938,7 @@ paths:
|
|||||||
- name: order
|
- name: order
|
||||||
in: query
|
in: query
|
||||||
type: string
|
type: string
|
||||||
enum: [ timeDesc, timeAsc ]
|
enum: [timeDesc, timeAsc]
|
||||||
default: timeDesc
|
default: timeDesc
|
||||||
- name: timeStart
|
- name: timeStart
|
||||||
in: query
|
in: query
|
||||||
@@ -4375,7 +4360,7 @@ definitions:
|
|||||||
properties:
|
properties:
|
||||||
loginStrategy:
|
loginStrategy:
|
||||||
type: string
|
type: string
|
||||||
enum: [ form, redirect, service-account, redirect-service-account ]
|
enum: [form, redirect, service-account, redirect-service-account]
|
||||||
redirectRules:
|
redirectRules:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
@@ -4474,7 +4459,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
status:
|
status:
|
||||||
type: string
|
type: string
|
||||||
enum: [ ok ]
|
enum: [ok]
|
||||||
operator:
|
operator:
|
||||||
type: boolean
|
type: boolean
|
||||||
distributedMode:
|
distributedMode:
|
||||||
@@ -4505,7 +4490,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
values:
|
values:
|
||||||
type: array
|
type: array
|
||||||
items: { }
|
items: {}
|
||||||
resultTarget:
|
resultTarget:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
@@ -4928,7 +4913,7 @@ definitions:
|
|||||||
type: string
|
type: string
|
||||||
service:
|
service:
|
||||||
type: string
|
type: string
|
||||||
enum: [ replication ]
|
enum: [replication]
|
||||||
syncMode:
|
syncMode:
|
||||||
type: string
|
type: string
|
||||||
bandwidth:
|
bandwidth:
|
||||||
@@ -5690,14 +5675,6 @@ definitions:
|
|||||||
shortName:
|
shortName:
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
checkVersionResponse:
|
|
||||||
type: object
|
|
||||||
properties:
|
|
||||||
current_version:
|
|
||||||
type: string
|
|
||||||
latest_version:
|
|
||||||
type: string
|
|
||||||
|
|
||||||
permissionResource:
|
permissionResource:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
|
|||||||
Reference in New Issue
Block a user