Skip to content

Commit

Permalink
update client api
Browse files Browse the repository at this point in the history
  • Loading branch information
sdinkov committed Dec 20, 2024
1 parent 30db6c8 commit 06a973a
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 1,002 deletions.
8 changes: 4 additions & 4 deletions apps/server/src/infra/vidis-client/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ like this:
```typescript
export class MyNewService {
// inject the factory into the constructor
constructor(private readonly tspClientFactory: TspClientFactory) {}
constructor(private readonly vidisClientFactory: VidisClientFactory) {}

public async doSomeStuff(): Promise<void> {
// this will create a fully initialized client
const exportClient = tspClientFactory.createExportClient();
const exportClient = vidisClientFactory.createExportClient();

// calling the api
const versionResponse = await exportClient.version();
Expand All @@ -39,8 +39,8 @@ We are using the openapi-generator-cli to generate apis, models and supporting f
`generated` directory. **DO NOT** modify anything in the `generated` folder, because it will
be deleted on the next client generation.

The client generation is done with the npm command `npm run generate-client:tsp-api`. This
will delete the old and create new files. We are using the `tsp-api` generator configuration
The client generation is done with the npm command `npm run generate-client:vidis-api`. This
will delete the old and create new files. We are using the `vidis-api` generator configuration
from the `openapitools.json` found in the repository root. You can add new endpoints by
extending the `FILTER` list in the `openapiNormalizer` section with new `operationId` entries.
New models must be added to the list of `models` in the `globalProperty` section.
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
.gitignore
.npmignore
.openapi-generator-ignore
api.ts
api/default-api.ts
api/education-provider-api.ts
api/idmbetreiber-api.ts
base.ts
common.ts
Expand Down
2 changes: 0 additions & 2 deletions apps/server/src/infra/vidis-client/generated/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,5 @@



export * from './api/default-api';
export * from './api/education-provider-api';
export * from './api/idmbetreiber-api';

142 changes: 0 additions & 142 deletions apps/server/src/infra/vidis-client/generated/api/default-api.ts

This file was deleted.

Loading

0 comments on commit 06a973a

Please sign in to comment.