Skip to content

Commit

Permalink
EW-1039 tsp client requesting access from tsp token endpoint (#5273)
Browse files Browse the repository at this point in the history
* tsp client requesting access to from tsp token endpoint

---------

Co-authored-by: Alexander Weber <103171324+alweber-cap@users.noreply.github.com>
  • Loading branch information
psachmann and alweber-cap authored Oct 8, 2024
1 parent 52c8f2b commit d95880a
Show file tree
Hide file tree
Showing 12 changed files with 5,010 additions and 73 deletions.
6 changes: 6 additions & 0 deletions apps/server/src/infra/tsp-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,12 @@ export class MyNewService {

## How the code generation works

> IMPORTANT: Currently we are using the `openapi.json` and not the spec from
> https://test2.schulportal-thueringen.de/tip-ms/api/swagger.json, because we have to patch the security schemas
> manually into to the specification so the generator can generate them correctly. The provided
> specification does not contain all necessary definitions. Only the `Export` endpoints are
> decorated with the security definitions.
We are using the openapi-generator-cli to generate apis, models and supporting files in the
`generated` directory. **DO NOT** modify anything in the `generated` folder, because it will
be deleted on the next client generation.
Expand Down
21 changes: 21 additions & 0 deletions apps/server/src/infra/tsp-client/generated/api/export-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Bearer required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

if (dtLetzteAenderung !== undefined) {
localVarQueryParameter['dtLetzteAenderung'] = dtLetzteAenderung;
}
Expand Down Expand Up @@ -96,6 +99,9 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Bearer required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

if (dtLetzteAenderung !== undefined) {
localVarQueryParameter['dtLetzteAenderung'] = dtLetzteAenderung;
}
Expand Down Expand Up @@ -130,6 +136,9 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Bearer required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)



setSearchParams(localVarUrlObj, localVarQueryParameter);
Expand Down Expand Up @@ -161,6 +170,9 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Bearer required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

if (dtLetzteAenderung !== undefined) {
localVarQueryParameter['dtLetzteAenderung'] = dtLetzteAenderung;
}
Expand Down Expand Up @@ -195,6 +207,9 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Bearer required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)



setSearchParams(localVarUrlObj, localVarQueryParameter);
Expand Down Expand Up @@ -226,6 +241,9 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Bearer required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)

if (dtLetzteAenderung !== undefined) {
localVarQueryParameter['dtLetzteAenderung'] = dtLetzteAenderung;
}
Expand Down Expand Up @@ -260,6 +278,9 @@ export const ExportApiAxiosParamCreator = function (configuration?: Configuratio
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;

// authentication Bearer required
await setApiKeyToObject(localVarHeaderParameter, "Authorization", configuration)



setSearchParams(localVarUrlObj, localVarQueryParameter);
Expand Down
8 changes: 5 additions & 3 deletions apps/server/src/infra/tsp-client/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
export * from './generated/api';
export * from './generated/models';
export { TspClientFactory } from './tsp-client-factory';
export * from './generated/api';
export * from './generated/models';
export * from './tsp-client-config';
export * from './tsp-client-factory';
export * from './tsp-client.module';
Loading

0 comments on commit d95880a

Please sign in to comment.