Skip to content
Snippets Groups Projects

New: Application Profile Storing

5 files
+ 108
5
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -4,7 +4,7 @@
* Coscine.Api.Metadata
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
*
* The version of the OpenAPI document: 2.1.0
* The version of the OpenAPI document: 2.1.1
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -21,6 +21,37 @@ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObj
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from './base';
/**
* Parameter object containing the application profile informations.
* @export
* @interface ApplicationProfile
*/
export interface ApplicationProfile {
/**
* Name of the application profile
* @type {string}
* @memberof ApplicationProfile
*/
name?: string | null;
/**
* Base URL of the application profile
* @type {string}
* @memberof ApplicationProfile
*/
base_url?: string | null;
/**
* Definition of the application profile
* @type {string}
* @memberof ApplicationProfile
*/
definition?: string | null;
/**
* Mime type of the application profile
* @type {string}
* @memberof ApplicationProfile
*/
mimeType?: string | null;
}
/**
* MetadataApi - axios parameter creator
@@ -245,6 +276,45 @@ export const MetadataApiAxiosParamCreator = function (configuration?: Configurat
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary Create a request for storing a given application profile.
* @param {ApplicationProfile} applicationProfile Object describing the application profile
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
metadataSaveApplicationProfile: async (applicationProfile: ApplicationProfile, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'applicationProfile' is not null or undefined
assertParamExists('metadataSaveApplicationProfile', 'applicationProfile', applicationProfile)
const localVarPath = `/Metadata/profiles`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication JWT token required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter, options.query);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(applicationProfile, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
@@ -326,6 +396,17 @@ export const MetadataApiFp = function(configuration?: Configuration) {
const localVarAxiosArgs = await localVarAxiosParamCreator.metadataGetVocabulary(path, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary Create a request for storing a given application profile.
* @param {ApplicationProfile} applicationProfile Object describing the application profile
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async metadataSaveApplicationProfile(applicationProfile: ApplicationProfile, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<any>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.metadataSaveApplicationProfile(applicationProfile, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};
@@ -396,6 +477,16 @@ export const MetadataApiFactory = function (configuration?: Configuration, baseP
metadataGetVocabulary(path: string, options?: any): AxiosPromise<any> {
return localVarFp.metadataGetVocabulary(path, options).then((request) => request(axios, basePath));
},
/**
*
* @summary Create a request for storing a given application profile.
* @param {ApplicationProfile} applicationProfile Object describing the application profile
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
metadataSaveApplicationProfile(applicationProfile: ApplicationProfile, options?: any): AxiosPromise<any> {
return localVarFp.metadataSaveApplicationProfile(applicationProfile, options).then((request) => request(axios, basePath));
},
};
};
@@ -477,6 +568,18 @@ export class MetadataApi extends BaseAPI {
public metadataGetVocabulary(path: string, options?: any) {
return MetadataApiFp(this.configuration).metadataGetVocabulary(path, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary Create a request for storing a given application profile.
* @param {ApplicationProfile} applicationProfile Object describing the application profile
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof MetadataApi
*/
public metadataSaveApplicationProfile(applicationProfile: ApplicationProfile, options?: any) {
return MetadataApiFp(this.configuration).metadataSaveApplicationProfile(applicationProfile, options).then((request) => request(this.axios, this.basePath));
}
}
Loading