-
Notifications
You must be signed in to change notification settings - Fork 85
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
base: master
Are you sure you want to change the base?
Conversation
29a7c08
to
bb4c252
Compare
There was a problem hiding this 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
bb4c252
to
450cef9
Compare
450cef9
to
7c6fe4a
Compare
|
||
import type { Address } from './Address'; | ||
|
||
export type PaginatedAddressList = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
doc: https://drf-spectacular.readthedocs.io/en/latest/faq.html#how-do-i-wrap-my-responses-my-endpoints-are-wrapped-in-a-generic-envelope
todo: try to use spectacular envelope in order to create a PaginatedSerialier
todo: try to use envelope into a custom pagination class https://www.django-rest-framework.org/api-guide/pagination/#custom-pagination-styles
7c6fe4a
to
eecbfe5
Compare
page?: number, | ||
pageSize?: number, | ||
productId?: string, | ||
signatureState?: 'half_signed' | 'signed' | 'unsigned', |
There was a problem hiding this comment.
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
a46fe84
to
1a38c6f
Compare
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 [email protected] to the projet this lib handle typescript api client generation from openapi schema
fcd2806
to
2d3a4c2
Compare
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
7125685
to
4781687
Compare
now that we've generated types and api client, we need to use them into our api hooks
9efc67a
to
abefe25
Compare
Joanie's api client shouldn't be loaded on test that don't use it.
abefe25
to
3da710e
Compare
Purpose
Here the generated typescript client with the current joanie's openapi schema
TODO: