Skip to content

Commit a4d7230

Browse files
chore: update OpenAPI spec and generated client
1 parent 867c195 commit a4d7230

File tree

10 files changed

+332
-8
lines changed

10 files changed

+332
-8
lines changed

openapi/openapi.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,38 @@ info: {title: OpenAPI definition, version: v0}
33
servers:
44
- {url: 'http://localhost:8080', description: Generated server url}
55
paths:
6+
/api/auth/login:
7+
post:
8+
tags: [auth-controller]
9+
operationId: login
10+
requestBody:
11+
content:
12+
application/json:
13+
schema: {$ref: '#/components/schemas/LoginRequestDTO'}
14+
required: true
15+
responses:
16+
'200': {description: OK}
617
/api/requestResource/fetchAndCloneRepositories:
718
get:
819
tags: [request-resource]
920
operationId: fetchAndCloneRepositories
21+
parameters:
22+
- name: jwt
23+
in: cookie
24+
required: false
25+
schema: {type: string}
26+
- name: artemis_server_url
27+
in: cookie
28+
required: false
29+
schema: {type: string}
30+
- name: artemis_username
31+
in: cookie
32+
required: false
33+
schema: {type: string}
34+
- name: artemis_password
35+
in: cookie
36+
required: false
37+
schema: {type: string}
1038
responses:
1139
'200':
1240
description: OK
@@ -17,6 +45,12 @@ paths:
1745
items: {$ref: '#/components/schemas/TeamRepositoryDTO'}
1846
components:
1947
schemas:
48+
LoginRequestDTO:
49+
type: object
50+
properties:
51+
password: {type: string}
52+
serverUrl: {type: string}
53+
username: {type: string}
2054
ParticipantDTO:
2155
type: object
2256
properties:

src/main/webapp/src/app/generated/.openapi-generator/FILES

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
.gitignore
22
.npmignore
33
api.ts
4+
apis/auth-controller-api.ts
45
apis/request-resource-api.ts
56
base.ts
67
common.ts
78
configuration.ts
9+
docs/AuthControllerApi.md
10+
docs/LoginRequestDTO.md
811
docs/ParticipantDTO.md
912
docs/ParticipationDTO.md
1013
docs/RequestResourceApi.md
@@ -13,6 +16,7 @@ docs/TeamRepositoryDTO.md
1316
git_push.sh
1417
index.ts
1518
models/index.ts
19+
models/login-request-dto.ts
1620
models/participant-dto.ts
1721
models/participation-dto.ts
1822
models/team-dto.ts

src/main/webapp/src/app/generated/api.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,5 @@
1212
* Do not edit the class manually.
1313
*/
1414

15+
export * from './apis/auth-controller-api';
1516
export * from './apis/request-resource-api';
Lines changed: 135 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,135 @@
1+
/* tslint:disable */
2+
/* eslint-disable */
3+
/**
4+
* OpenAPI definition
5+
* No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
6+
*
7+
* The version of the OpenAPI document: v0
8+
*
9+
*
10+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11+
* https://openapi-generator.tech
12+
* Do not edit the class manually.
13+
*/
14+
15+
import type { Configuration } from '../configuration';
16+
import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
17+
import globalAxios from 'axios';
18+
// Some imports not used depending on template conditions
19+
// @ts-ignore
20+
import {
21+
DUMMY_BASE_URL,
22+
assertParamExists,
23+
setApiKeyToObject,
24+
setBasicAuthToObject,
25+
setBearerAuthToObject,
26+
setOAuthToObject,
27+
setSearchParams,
28+
serializeDataIfNeeded,
29+
toPathString,
30+
createRequestFunction,
31+
} from '../common';
32+
// @ts-ignore
33+
import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
34+
// @ts-ignore
35+
import type { LoginRequestDTO } from '../models';
36+
/**
37+
* AuthControllerApi - axios parameter creator
38+
*/
39+
export const AuthControllerApiAxiosParamCreator = function (configuration?: Configuration) {
40+
return {
41+
/**
42+
*
43+
* @param {LoginRequestDTO} loginRequestDTO
44+
* @param {*} [options] Override http request option.
45+
* @throws {RequiredError}
46+
*/
47+
login: async (loginRequestDTO: LoginRequestDTO, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
48+
// verify required parameter 'loginRequestDTO' is not null or undefined
49+
assertParamExists('login', 'loginRequestDTO', loginRequestDTO);
50+
const localVarPath = `/api/auth/login`;
51+
// use dummy base URL string because the URL constructor only accepts absolute URLs.
52+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
53+
let baseOptions;
54+
if (configuration) {
55+
baseOptions = configuration.baseOptions;
56+
}
57+
58+
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options };
59+
const localVarHeaderParameter = {} as any;
60+
const localVarQueryParameter = {} as any;
61+
62+
localVarHeaderParameter['Content-Type'] = 'application/json';
63+
64+
setSearchParams(localVarUrlObj, localVarQueryParameter);
65+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
66+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
67+
localVarRequestOptions.data = serializeDataIfNeeded(loginRequestDTO, localVarRequestOptions, configuration);
68+
69+
return {
70+
url: toPathString(localVarUrlObj),
71+
options: localVarRequestOptions,
72+
};
73+
},
74+
};
75+
};
76+
77+
/**
78+
* AuthControllerApi - functional programming interface
79+
*/
80+
export const AuthControllerApiFp = function (configuration?: Configuration) {
81+
const localVarAxiosParamCreator = AuthControllerApiAxiosParamCreator(configuration);
82+
return {
83+
/**
84+
*
85+
* @param {LoginRequestDTO} loginRequestDTO
86+
* @param {*} [options] Override http request option.
87+
* @throws {RequiredError}
88+
*/
89+
async login(
90+
loginRequestDTO: LoginRequestDTO,
91+
options?: RawAxiosRequestConfig,
92+
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>> {
93+
const localVarAxiosArgs = await localVarAxiosParamCreator.login(loginRequestDTO, options);
94+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
95+
const localVarOperationServerBasePath = operationServerMap['AuthControllerApi.login']?.[localVarOperationServerIndex]?.url;
96+
return (axios, basePath) =>
97+
createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
98+
},
99+
};
100+
};
101+
102+
/**
103+
* AuthControllerApi - factory interface
104+
*/
105+
export const AuthControllerApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
106+
const localVarFp = AuthControllerApiFp(configuration);
107+
return {
108+
/**
109+
*
110+
* @param {LoginRequestDTO} loginRequestDTO
111+
* @param {*} [options] Override http request option.
112+
* @throws {RequiredError}
113+
*/
114+
login(loginRequestDTO: LoginRequestDTO, options?: RawAxiosRequestConfig): AxiosPromise<void> {
115+
return localVarFp.login(loginRequestDTO, options).then(request => request(axios, basePath));
116+
},
117+
};
118+
};
119+
120+
/**
121+
* AuthControllerApi - object-oriented interface
122+
*/
123+
export class AuthControllerApi extends BaseAPI {
124+
/**
125+
*
126+
* @param {LoginRequestDTO} loginRequestDTO
127+
* @param {*} [options] Override http request option.
128+
* @throws {RequiredError}
129+
*/
130+
public login(loginRequestDTO: LoginRequestDTO, options?: RawAxiosRequestConfig) {
131+
return AuthControllerApiFp(this.configuration)
132+
.login(loginRequestDTO, options)
133+
.then(request => request(this.axios, this.basePath));
134+
}
135+
}

src/main/webapp/src/app/generated/apis/request-resource-api.ts

Lines changed: 52 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,20 @@ export const RequestResourceApiAxiosParamCreator = function (configuration?: Con
4040
return {
4141
/**
4242
*
43+
* @param {string} [jwt]
44+
* @param {string} [artemisServerUrl]
45+
* @param {string} [artemisUsername]
46+
* @param {string} [artemisPassword]
4347
* @param {*} [options] Override http request option.
4448
* @throws {RequiredError}
4549
*/
46-
fetchAndCloneRepositories: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
50+
fetchAndCloneRepositories: async (
51+
jwt?: string,
52+
artemisServerUrl?: string,
53+
artemisUsername?: string,
54+
artemisPassword?: string,
55+
options: RawAxiosRequestConfig = {},
56+
): Promise<RequestArgs> => {
4757
const localVarPath = `/api/requestResource/fetchAndCloneRepositories`;
4858
// use dummy base URL string because the URL constructor only accepts absolute URLs.
4959
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
@@ -76,13 +86,27 @@ export const RequestResourceApiFp = function (configuration?: Configuration) {
7686
return {
7787
/**
7888
*
89+
* @param {string} [jwt]
90+
* @param {string} [artemisServerUrl]
91+
* @param {string} [artemisUsername]
92+
* @param {string} [artemisPassword]
7993
* @param {*} [options] Override http request option.
8094
* @throws {RequiredError}
8195
*/
8296
async fetchAndCloneRepositories(
97+
jwt?: string,
98+
artemisServerUrl?: string,
99+
artemisUsername?: string,
100+
artemisPassword?: string,
83101
options?: RawAxiosRequestConfig,
84102
): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<TeamRepositoryDTO>>> {
85-
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchAndCloneRepositories(options);
103+
const localVarAxiosArgs = await localVarAxiosParamCreator.fetchAndCloneRepositories(
104+
jwt,
105+
artemisServerUrl,
106+
artemisUsername,
107+
artemisPassword,
108+
options,
109+
);
86110
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
87111
const localVarOperationServerBasePath =
88112
operationServerMap['RequestResourceApi.fetchAndCloneRepositories']?.[localVarOperationServerIndex]?.url;
@@ -100,11 +124,23 @@ export const RequestResourceApiFactory = function (configuration?: Configuration
100124
return {
101125
/**
102126
*
127+
* @param {string} [jwt]
128+
* @param {string} [artemisServerUrl]
129+
* @param {string} [artemisUsername]
130+
* @param {string} [artemisPassword]
103131
* @param {*} [options] Override http request option.
104132
* @throws {RequiredError}
105133
*/
106-
fetchAndCloneRepositories(options?: RawAxiosRequestConfig): AxiosPromise<Array<TeamRepositoryDTO>> {
107-
return localVarFp.fetchAndCloneRepositories(options).then(request => request(axios, basePath));
134+
fetchAndCloneRepositories(
135+
jwt?: string,
136+
artemisServerUrl?: string,
137+
artemisUsername?: string,
138+
artemisPassword?: string,
139+
options?: RawAxiosRequestConfig,
140+
): AxiosPromise<Array<TeamRepositoryDTO>> {
141+
return localVarFp
142+
.fetchAndCloneRepositories(jwt, artemisServerUrl, artemisUsername, artemisPassword, options)
143+
.then(request => request(axios, basePath));
108144
},
109145
};
110146
};
@@ -115,12 +151,22 @@ export const RequestResourceApiFactory = function (configuration?: Configuration
115151
export class RequestResourceApi extends BaseAPI {
116152
/**
117153
*
154+
* @param {string} [jwt]
155+
* @param {string} [artemisServerUrl]
156+
* @param {string} [artemisUsername]
157+
* @param {string} [artemisPassword]
118158
* @param {*} [options] Override http request option.
119159
* @throws {RequiredError}
120160
*/
121-
public fetchAndCloneRepositories(options?: RawAxiosRequestConfig) {
161+
public fetchAndCloneRepositories(
162+
jwt?: string,
163+
artemisServerUrl?: string,
164+
artemisUsername?: string,
165+
artemisPassword?: string,
166+
options?: RawAxiosRequestConfig,
167+
) {
122168
return RequestResourceApiFp(this.configuration)
123-
.fetchAndCloneRepositories(options)
169+
.fetchAndCloneRepositories(jwt, artemisServerUrl, artemisUsername, artemisPassword, options)
124170
.then(request => request(this.axios, this.basePath));
125171
}
126172
}
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# AuthControllerApi
2+
3+
All URIs are relative to _http://localhost:8080_
4+
5+
| Method | HTTP request | Description |
6+
| ------------------- | ------------------------ | ----------- |
7+
| [**login**](#login) | **POST** /api/auth/login | |
8+
9+
# **login**
10+
11+
> login(loginRequestDTO)
12+
13+
### Example
14+
15+
```typescript
16+
import { AuthControllerApi, Configuration, LoginRequestDTO } from './api';
17+
18+
const configuration = new Configuration();
19+
const apiInstance = new AuthControllerApi(configuration);
20+
21+
let loginRequestDTO: LoginRequestDTO; //
22+
23+
const { status, data } = await apiInstance.login(loginRequestDTO);
24+
```
25+
26+
### Parameters
27+
28+
| Name | Type | Description | Notes |
29+
| ------------------- | ------------------- | ----------- | ----- |
30+
| **loginRequestDTO** | **LoginRequestDTO** | | |
31+
32+
### Return type
33+
34+
void (empty response body)
35+
36+
### Authorization
37+
38+
No authorization required
39+
40+
### HTTP request headers
41+
42+
- **Content-Type**: application/json
43+
- **Accept**: Not defined
44+
45+
### HTTP response details
46+
47+
| Status code | Description | Response headers |
48+
| ----------- | ----------- | ---------------- |
49+
| **200** | OK | - |
50+
51+
[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# LoginRequestDTO
2+
3+
## Properties
4+
5+
| Name | Type | Description | Notes |
6+
| ------------- | ---------- | ----------- | --------------------------------- |
7+
| **password** | **string** | | [optional] [default to undefined] |
8+
| **serverUrl** | **string** | | [optional] [default to undefined] |
9+
| **username** | **string** | | [optional] [default to undefined] |
10+
11+
## Example
12+
13+
```typescript
14+
import { LoginRequestDTO } from './api';
15+
16+
const instance: LoginRequestDTO = {
17+
password,
18+
serverUrl,
19+
username,
20+
};
21+
```
22+
23+
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

0 commit comments

Comments
 (0)