Skip to content

Commit

Permalink
Delete unnecessary comments and unused import class
Browse files Browse the repository at this point in the history
  • Loading branch information
vividroyjeong committed Dec 12, 2024
1 parent b5a1d17 commit 9d5b4ee
Show file tree
Hide file tree
Showing 16 changed files with 17 additions and 461 deletions.
1 change: 0 additions & 1 deletion frontend/src/env.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
declare global {
// eslint-disable-next-line no-unused-vars
interface Window {
config: any
}
Expand Down
48 changes: 4 additions & 44 deletions frontend/src/services/vdyp-api/apis/get-help-api.ts
Original file line number Diff line number Diff line change
@@ -1,28 +1,18 @@
import globalAxios from 'axios'
import type { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'
import { Configuration } from '../configuration'
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, BaseAPI, RequiredError } from '../base'
import { BASE_PATH, BaseAPI } from '../base'
import type { RequestArgs } from '../base'
import type { ParameterDetailsMessage } from '../models'
/**
* GetHelpApi - axios parameter creator
* @export
*/
import { env } from '@/env'

export const GetHelpApiAxiosParamCreator = function (
configuration?: Configuration,
) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
helpGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/v8/help`
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com')
const localVarUrlObj = new URL(localVarPath, env.VITE_API_URL)
let baseOptions
if (configuration) {
baseOptions = configuration.baseOptions
Expand Down Expand Up @@ -60,17 +50,8 @@ export const GetHelpApiAxiosParamCreator = function (
}
}

/**
* GetHelpApi - functional programming interface
* @export
*/
export const GetHelpApiFp = function (configuration?: Configuration) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async helpGet(
options?: AxiosRequestConfig,
): Promise<
Expand All @@ -95,21 +76,12 @@ export const GetHelpApiFp = function (configuration?: Configuration) {
}
}

/**
* GetHelpApi - factory interface
* @export
*/
export const GetHelpApiFactory = function (
configuration?: Configuration,
basePath?: string,
axios?: AxiosInstance,
) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async helpGet(
options?: AxiosRequestConfig,
): Promise<AxiosResponse<ParameterDetailsMessage[] /* edited */>> {
Expand All @@ -120,19 +92,7 @@ export const GetHelpApiFactory = function (
}
}

/**
* GetHelpApi - object-oriented interface
* @export
* @class GetHelpApi
* @extends {BaseAPI}
*/
export class GetHelpApi extends BaseAPI {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof GetHelpApi
*/
public async helpGet(
options?: AxiosRequestConfig,
): Promise<AxiosResponse<ParameterDetailsMessage[] /* edited */>> {
Expand Down
47 changes: 3 additions & 44 deletions frontend/src/services/vdyp-api/apis/get-root-api.ts
Original file line number Diff line number Diff line change
@@ -1,29 +1,18 @@
import globalAxios from 'axios'
import type { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'
import { Configuration } from '../configuration'
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, BaseAPI, RequiredError } from '../base'
import { BASE_PATH, BaseAPI } from '../base'
import type { RequestArgs } from '../base'
import type { RootResource } from '../models'
import { env } from '@/env'

/**
* GetRootApi - axios parameter creator
* @export
*/
export const GetRootApiAxiosParamCreator = function (
configuration?: Configuration,
) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
rootGet: async (options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
const localVarPath = `/api/v8`
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com')
const localVarUrlObj = new URL(localVarPath, env.VITE_API_URL)
let baseOptions
if (configuration) {
baseOptions = configuration.baseOptions
Expand Down Expand Up @@ -61,17 +50,8 @@ export const GetRootApiAxiosParamCreator = function (
}
}

/**
* GetRootApi - functional programming interface
* @export
*/
export const GetRootApiFp = function (configuration?: Configuration) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async rootGet(
options?: AxiosRequestConfig,
): Promise<
Expand All @@ -96,21 +76,12 @@ export const GetRootApiFp = function (configuration?: Configuration) {
}
}

/**
* GetRootApi - factory interface
* @export
*/
export const GetRootApiFactory = function (
configuration?: Configuration,
basePath?: string,
axios?: AxiosInstance,
) {
return {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async rootGet(
options?: AxiosRequestConfig,
): Promise<AxiosResponse<RootResource>> /* edited */ {
Expand All @@ -121,19 +92,7 @@ export const GetRootApiFactory = function (
}
}

/**
* GetRootApi - object-oriented interface
* @export
* @class GetRootApi
* @extends {BaseAPI}
*/
export class GetRootApi extends BaseAPI {
/**
*
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof GetRootApi
*/
public async rootGet(
options?: AxiosRequestConfig,
): Promise<AxiosResponse<RootResource>> /* edited */ {
Expand Down
8 changes: 3 additions & 5 deletions frontend/src/services/vdyp-api/apis/run-dcsvprojection-api.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import globalAxios from 'axios'
import type { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'
import { Configuration } from '../configuration'
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, BaseAPI, RequiredError } from '../base'
import { BASE_PATH, BaseAPI } from '../base'
import type { RequestArgs } from '../base'
import type { FileUpload, Parameters } from '../models'
import { env } from '@/env'

export const RunDCSVProjectionApiAxiosParamCreator = function (
configuration?: Configuration,
Expand All @@ -18,8 +17,7 @@ export const RunDCSVProjectionApiAxiosParamCreator = function (
options: AxiosRequestConfig = {},
): Promise<RequestArgs> => {
const localVarPath = `/api/v8/projection/dcsv`
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com')
const localVarUrlObj = new URL(localVarPath, env.VITE_API_URL)
let baseOptions
if (configuration) {
baseOptions = configuration.baseOptions
Expand Down
9 changes: 4 additions & 5 deletions frontend/src/services/vdyp-api/apis/run-hcsvprojection-api.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import globalAxios from 'axios'
import type { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'
import { Configuration } from '../configuration'
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, BaseAPI, RequiredError } from '../base'
import { BASE_PATH, BaseAPI } from '../base'
import type { RequestArgs } from '../base'
import type { FileUpload, Parameters } from '../models'
import { env } from '@/env'

export const RunHCSVProjectionApiAxiosParamCreator = function (
configuration?: Configuration,
Expand All @@ -19,7 +18,7 @@ export const RunHCSVProjectionApiAxiosParamCreator = function (
options: AxiosRequestConfig = {},
): Promise<RequestArgs> => {
const localVarPath = `/api/v8/projection/hcsv`
const localVarUrlObj = new URL(localVarPath, 'https://example.com')
const localVarUrlObj = new URL(localVarPath, env.VITE_API_URL)
let baseOptions
if (configuration) {
baseOptions = configuration.baseOptions
Expand Down Expand Up @@ -112,7 +111,7 @@ export const RunHCSVProjectionApiFp = function (configuration?: Configuration) {
) => {
const axiosRequestArgs: AxiosRequestConfig = {
...localVarAxiosArgs.options,
url: localVarAxiosArgs.url,
url: basePath + localVarAxiosArgs.url,
responseType: 'blob' /* edited */,
}
return axios.request(axiosRequestArgs)
Expand Down
69 changes: 3 additions & 66 deletions frontend/src/services/vdyp-api/apis/run-scsvprojection-api.ts
Original file line number Diff line number Diff line change
@@ -1,31 +1,15 @@
import globalAxios from 'axios'
import type { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios'
import { Configuration } from '../configuration'
// Some imports not used depending on template conditions
// @ts-ignore
import { BASE_PATH, BaseAPI, RequiredError } from '../base'
import { BASE_PATH, BaseAPI } from '../base'
import type { RequestArgs } from '../base'
import type { FileUpload, Parameters } from '../models'
import { env } from '@/env'

export const RunSCSVProjectionApiAxiosParamCreator = function (
configuration?: Configuration,
) {
return {
/**
*
* @param {FileUpload} [polygonInputData]
* @param {FileUpload} [layersInputData]
* @param {FileUpload} [historyInputData]
* @param {FileUpload} [nonVegetationInputData]
* @param {FileUpload} [otherVegetationInputData]
* @param {FileUpload} [polygonIdInputData]
* @param {FileUpload} [speciesInputData]
* @param {FileUpload} [vriAdjustInputData]
* @param {Parameters} [projectionParameters]
* @param {boolean} [trialRun]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
projectionScsvPostForm: async (
polygonInputData?: FileUpload,
layersInputData?: FileUpload,
Expand All @@ -40,8 +24,7 @@ export const RunSCSVProjectionApiAxiosParamCreator = function (
options: AxiosRequestConfig = {},
): Promise<RequestArgs> => {
const localVarPath = `/api/v8/projection/scsv`
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, 'https://example.com')
const localVarUrlObj = new URL(localVarPath, env.VITE_API_URL)
let baseOptions
if (configuration) {
baseOptions = configuration.baseOptions
Expand Down Expand Up @@ -139,21 +122,6 @@ export const RunSCSVProjectionApiAxiosParamCreator = function (

export const RunSCSVProjectionApiFp = function (configuration?: Configuration) {
return {
/**
*
* @param {FileUpload} [polygonInputData]
* @param {FileUpload} [layersInputData]
* @param {FileUpload} [historyInputData]
* @param {FileUpload} [nonVegetationInputData]
* @param {FileUpload} [otherVegetationInputData]
* @param {FileUpload} [polygonIdInputData]
* @param {FileUpload} [speciesInputData]
* @param {FileUpload} [vriAdjustInputData]
* @param {Parameters} [projectionParameters]
* @param {boolean} [trialRun]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async projectionScsvPostForm(
polygonInputData?: FileUpload,
layersInputData?: FileUpload,
Expand Down Expand Up @@ -204,21 +172,6 @@ export const RunSCSVProjectionApiFactory = function (
axios?: AxiosInstance,
) {
return {
/**
*
* @param {FileUpload} [polygonInputData]
* @param {FileUpload} [layersInputData]
* @param {FileUpload} [historyInputData]
* @param {FileUpload} [nonVegetationInputData]
* @param {FileUpload} [otherVegetationInputData]
* @param {FileUpload} [polygonIdInputData]
* @param {FileUpload} [speciesInputData]
* @param {FileUpload} [vriAdjustInputData]
* @param {Parameters} [projectionParameters]
* @param {boolean} [trialRun]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async projectionScsvPostForm(
polygonInputData?: FileUpload,
layersInputData?: FileUpload,
Expand Down Expand Up @@ -252,22 +205,6 @@ export const RunSCSVProjectionApiFactory = function (
}

export class RunSCSVProjectionApi extends BaseAPI {
/**
*
* @param {FileUpload} [polygonInputData]
* @param {FileUpload} [layersInputData]
* @param {FileUpload} [historyInputData]
* @param {FileUpload} [nonVegetationInputData]
* @param {FileUpload} [otherVegetationInputData]
* @param {FileUpload} [polygonIdInputData]
* @param {FileUpload} [speciesInputData]
* @param {FileUpload} [vriAdjustInputData]
* @param {Parameters} [projectionParameters]
* @param {boolean} [trialRun]
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof RunSCSVProjectionApi
*/
public async projectionScsvPostForm(
polygonInputData?: FileUpload,
layersInputData?: FileUpload,
Expand Down
Loading

0 comments on commit 9d5b4ee

Please sign in to comment.