Skip to content

Commit

Permalink
Merge branch 'main' into BC-8427-member-dialogs-a11y
Browse files Browse the repository at this point in the history
  • Loading branch information
NFriedo authored Dec 19, 2024
2 parents ffb17ed + c298ab2 commit e31c571
Show file tree
Hide file tree
Showing 21 changed files with 723 additions and 33 deletions.
1 change: 1 addition & 0 deletions eslint.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ module.exports = [
"src/serverApi/**",
"src/fileStorageApi/**",
"src/h5pEditorApi/**",
"src/commonCartridgeApi/**",
],
},
{
Expand Down
20 changes: 19 additions & 1 deletion openapitools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
"$schema": "node_modules/@openapitools/openapi-generator-cli/config.schema.json",
"spaces": 2,
"generator-cli": {
"version": "5.1.0"
"version": "5.1.0",
"generators": {
"common-cartridge-api": {
"generatorName": "typescript-axios",
"inputSpec": "http://localhost:3350/api/v3/docs-json/",
"output": "./src/commonCartridgeApi/v3",
"skipValidateSpec": true,
"enablePostProcessFile": true,
"additionalProperties": {
"apiPackage": "api",
"enumNameSuffix": "",
"enumPropertyNaming": "UPPERCASE",
"modelPackage": "models",
"supportsES6": true,
"withInterfaces": true,
"withSeparateModelsAndApi": true
}
}
}
}
}
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@
"lint:fix": "npx eslint 'src/**/*.{ts,js,vue}' --fix",
"generate-client:server": "node generate-client.js -c openapitools-for-server.json",
"generate-client:filestorage": "node generate-client.js -u 'http://localhost:4444/api/v3/docs-json/' -p 'src/fileStorageApi/v3' -c 'openapitools-for-file-storage.json'",
"generate-client:h5p-editor": "node generate-client.js -u 'http://localhost:4448/api/v3/docs-json/' -p 'src/h5pEditorApi/v3' -c 'openapitools-for-h5p-editor.json'"
"generate-client:h5p-editor": "node generate-client.js -u 'http://localhost:4448/api/v3/docs-json/' -p 'src/h5pEditorApi/v3' -c 'openapitools-for-h5p-editor.json'",
"generate-client:common-cartridge": "openapi-generator-cli generate -c ./openapitools.json --generator-key common-cartridge-api"
},
"dependencies": {
"@braintree/sanitize-url": "^6.0.4",
Expand Down
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
sonar.organization=schulcloud-verbund
sonar.projectKey=hpi-schul-cloud_nuxt-client
sonar.sources=.
sonar.exclusions=src/serverApi/**/*.*,src/fileStorageApi/**/*.*,src/h5pEditorApi/**/*.*,**/themes/**.ts
sonar.exclusions=src/serverApi/**/*.*,src/fileStorageApi/**/*.*,src/h5pEditorApi/**/*.*,src/commonCartridgeApi/**/*.*,**/themes/**.ts
sonar.coverage.exclusions=tests/**/*.*,**/*.unit.ts,**/*.unit.js,**/themes/**.ts,eslint.config.js,src/main.ts,src/plugins/vuetify.ts
sonar.cpd.exclusions=**/locales/**.ts,tests/**/*.*,**/*.unit.ts,**/*.unit.js,**/themes/**.ts
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
4 changes: 4 additions & 0 deletions src/commonCartridgeApi/v3/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
wwwroot/*.js
node_modules
typings
dist
1 change: 1 addition & 0 deletions src/commonCartridgeApi/v3/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# empty npmignore to ensure all required files (e.g., in the dist folder) are published by npm
23 changes: 23 additions & 0 deletions src/commonCartridgeApi/v3/.openapi-generator-ignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# OpenAPI Generator Ignore
# Generated by openapi-generator https://github.com/openapitools/openapi-generator

# Use this file to prevent files from being overwritten by the generator.
# The patterns follow closely to .gitignore or .dockerignore.

# As an example, the C# client generator defines ApiClient.cs.
# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
#ApiClient.cs

# You can match any string of characters against a directory, file or extension with a single asterisk (*):
#foo/*/qux
# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux

# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
#foo/**/qux
# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux

# You can also negate patterns with an exclamation (!).
# For example, you can ignore all files in a docs folder with the file extension .md:
#docs/*.md
# Then explicitly reverse the ignore rule for a single file:
#!docs/README.md
12 changes: 12 additions & 0 deletions src/commonCartridgeApi/v3/.openapi-generator/FILES
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
.gitignore
.npmignore
.openapi-generator-ignore
api.ts
api/common-cartridge-api.ts
base.ts
common.ts
configuration.ts
git_push.sh
index.ts
models/course-export-body-params.ts
models/index.ts
1 change: 1 addition & 0 deletions src/commonCartridgeApi/v3/.openapi-generator/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.1.0
18 changes: 18 additions & 0 deletions src/commonCartridgeApi/v3/api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/* tslint:disable */
/* eslint-disable */
/**
* Schulcloud-Verbund-Software Server API
* This is v3 of Schulcloud-Verbund-Software Server. Checkout /docs for v1.
*
* The version of the OpenAPI document: 3.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/



export * from './api/common-cartridge-api';

161 changes: 161 additions & 0 deletions src/commonCartridgeApi/v3/api/common-cartridge-api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,161 @@
/* tslint:disable */
/* eslint-disable */
/**
* Schulcloud-Verbund-Software Server API
* This is v3 of Schulcloud-Verbund-Software Server. Checkout /docs for v1.
*
* The version of the OpenAPI document: 3.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';
import { Configuration } from '../configuration';
// Some imports not used depending on template conditions
// @ts-ignore
import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
// @ts-ignore
import { CourseExportBodyParams } from '../models';
/**
* CommonCartridgeApi - axios parameter creator
* @export
*/
export const CommonCartridgeApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @param {string} courseId
* @param {'1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0'} version The version of CC export
* @param {CourseExportBodyParams} courseExportBodyParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
commonCartridgeControllerExportCourse: async (courseId: string, version: '1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0', courseExportBodyParams: CourseExportBodyParams, options: any = {}): Promise<RequestArgs> => {
// verify required parameter 'courseId' is not null or undefined
assertParamExists('commonCartridgeControllerExportCourse', 'courseId', courseId)
// verify required parameter 'version' is not null or undefined
assertParamExists('commonCartridgeControllerExportCourse', 'version', version)
// verify required parameter 'courseExportBodyParams' is not null or undefined
assertParamExists('commonCartridgeControllerExportCourse', 'courseExportBodyParams', courseExportBodyParams)
const localVarPath = `/common-cartridge/export/{courseId}`
.replace(`{${"courseId"}}`, encodeURIComponent(String(courseId)));
// 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: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

if (version !== undefined) {
localVarQueryParameter['version'] = version;
}



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(courseExportBodyParams, localVarRequestOptions, configuration)

return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
}
};

/**
* CommonCartridgeApi - functional programming interface
* @export
*/
export const CommonCartridgeApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = CommonCartridgeApiAxiosParamCreator(configuration)
return {
/**
*
* @param {string} courseId
* @param {'1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0'} version The version of CC export
* @param {CourseExportBodyParams} courseExportBodyParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async commonCartridgeControllerExportCourse(courseId: string, version: '1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0', courseExportBodyParams: CourseExportBodyParams, options?: any): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.commonCartridgeControllerExportCourse(courseId, version, courseExportBodyParams, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
}
};

/**
* CommonCartridgeApi - factory interface
* @export
*/
export const CommonCartridgeApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = CommonCartridgeApiFp(configuration)
return {
/**
*
* @param {string} courseId
* @param {'1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0'} version The version of CC export
* @param {CourseExportBodyParams} courseExportBodyParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
commonCartridgeControllerExportCourse(courseId: string, version: '1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0', courseExportBodyParams: CourseExportBodyParams, options?: any): AxiosPromise<void> {
return localVarFp.commonCartridgeControllerExportCourse(courseId, version, courseExportBodyParams, options).then((request) => request(axios, basePath));
},
};
};

/**
* CommonCartridgeApi - interface
* @export
* @interface CommonCartridgeApi
*/
export interface CommonCartridgeApiInterface {
/**
*
* @param {string} courseId
* @param {'1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0'} version The version of CC export
* @param {CourseExportBodyParams} courseExportBodyParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CommonCartridgeApiInterface
*/
commonCartridgeControllerExportCourse(courseId: string, version: '1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0', courseExportBodyParams: CourseExportBodyParams, options?: any): AxiosPromise<void>;

}

/**
* CommonCartridgeApi - object-oriented interface
* @export
* @class CommonCartridgeApi
* @extends {BaseAPI}
*/
export class CommonCartridgeApi extends BaseAPI implements CommonCartridgeApiInterface {
/**
*
* @param {string} courseId
* @param {'1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0'} version The version of CC export
* @param {CourseExportBodyParams} courseExportBodyParams
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof CommonCartridgeApi
*/
public commonCartridgeControllerExportCourse(courseId: string, version: '1.0.0' | '1.1.0' | '1.2.0' | '1.3.0' | '1.4.0', courseExportBodyParams: CourseExportBodyParams, options?: any) {
return CommonCartridgeApiFp(this.configuration).commonCartridgeControllerExportCourse(courseId, version, courseExportBodyParams, options).then((request) => request(this.axios, this.basePath));
}
}
71 changes: 71 additions & 0 deletions src/commonCartridgeApi/v3/base.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/* tslint:disable */
/* eslint-disable */
/**
* Schulcloud-Verbund-Software Server API
* This is v3 of Schulcloud-Verbund-Software Server. Checkout /docs for v1.
*
* The version of the OpenAPI document: 3.0
*
*
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/


import { Configuration } from "./configuration";
// Some imports not used depending on template conditions
// @ts-ignore
import globalAxios, { AxiosPromise, AxiosInstance } from 'axios';

export const BASE_PATH = "http://localhost:3350/api/v3".replace(/\/+$/, "");

/**
*
* @export
*/
export const COLLECTION_FORMATS = {
csv: ",",
ssv: " ",
tsv: "\t",
pipes: "|",
};

/**
*
* @export
* @interface RequestArgs
*/
export interface RequestArgs {
url: string;
options: any;
}

/**
*
* @export
* @class BaseAPI
*/
export class BaseAPI {
protected configuration: Configuration | undefined;

constructor(configuration?: Configuration, protected basePath: string = BASE_PATH, protected axios: AxiosInstance = globalAxios) {
if (configuration) {
this.configuration = configuration;
this.basePath = configuration.basePath || this.basePath;
}
}
};

/**
*
* @export
* @class RequiredError
* @extends {Error}
*/
export class RequiredError extends Error {
name: "RequiredError" = "RequiredError";
constructor(public field: string, msg?: string) {
super(msg);
}
}
Loading

0 comments on commit e31c571

Please sign in to comment.