Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👽️(frontend) Generate typescript api client - winter 2023 #2142

Open
wants to merge 12 commits into
base: master
Choose a base branch
from

Conversation

rlecellier
Copy link
Collaborator

@rlecellier rlecellier commented Nov 17, 2023

Purpose

Here the generated typescript client with the current joanie's openapi schema

TODO:

  • mv factory/joanie to factory/joanieLegacy, and joanieGen to joanie.

@rlecellier rlecellier force-pushed the rlecellier/generated_api_2023 branch 5 times, most recently from 29a7c08 to bb4c252 Compare November 21, 2023 11:08
Copy link
Collaborator Author

@rlecellier rlecellier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quick comment on missing element of Addresses endoints

src/frontend/js/api/joanie/gen/services/ApiService.ts Outdated Show resolved Hide resolved
src/frontend/js/api/joanie/gen/services/ApiService.ts Outdated Show resolved Hide resolved
src/frontend/js/api/joanie/gen/services/ApiService.ts Outdated Show resolved Hide resolved
src/frontend/js/api/joanie/gen/services/ApiService.ts Outdated Show resolved Hide resolved

import type { Address } from './Address';

export type PaginatedAddressList = {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

page?: number,
pageSize?: number,
productId?: string,
signatureState?: 'half_signed' | 'signed' | 'unsigned',
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be nice to have :

enum SignatureStateEnum {
 half_signed,
 signed,
 unsigned
}
// ... 
signatureState?: SignatureStateEnum

@rlecellier rlecellier force-pushed the rlecellier/generated_api_2023 branch 6 times, most recently from a46fe84 to 1a38c6f Compare March 6, 2024 16:40
rlecellier and others added 3 commits March 7, 2024 15:30
We'll implement a api client generated from joanie's openApi schema.
The current client needs to change place.
We'll implement a api client generated from joanie's openApi schema.
The current client's type factories needs to change place.
Add openapi-typescript-codegen@0.23.0 to the projet
this lib handle typescript api client generation from openapi schema
@rlecellier rlecellier force-pushed the rlecellier/generated_api_2023 branch 5 times, most recently from fcd2806 to 2d3a4c2 Compare March 7, 2024 15:56
rlecellier and others added 4 commits March 7, 2024 17:02
Generate typescript api client according to joanie openapi schema
on CoursesService and OrganizationService, a function get the id param
twice.
Generated api client need's to handle joanie authentification
use generated Address type instead of legacy one
@rlecellier rlecellier force-pushed the rlecellier/generated_api_2023 branch 2 times, most recently from 7125685 to 4781687 Compare March 7, 2024 16:17
@rlecellier rlecellier marked this pull request as ready for review March 7, 2024 16:20
@rlecellier rlecellier self-assigned this Mar 7, 2024
@rlecellier rlecellier requested review from NathanVss and jbpenrath and removed request for NathanVss March 7, 2024 16:20
now that we've generated types and api client, we need to use them into
our api hooks
@rlecellier rlecellier force-pushed the rlecellier/generated_api_2023 branch 2 times, most recently from 9efc67a to abefe25 Compare March 7, 2024 16:56
Joanie's api client shouldn't be loaded on test that don't use it.
@rlecellier rlecellier force-pushed the rlecellier/generated_api_2023 branch from abefe25 to 3da710e Compare March 8, 2024 08:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant