Closed himself65 closed 1 year ago
Refactor to https://fastapi.tiangolo.com/
@Himself65 Please revise the issue below. What changes do you suggest us to make ?
I think we should study how Google App Script does this.
I think this is almost solved with rjsf in dev branch
For now, the response of types to the frontend is based on
string
. However, this will cause serious problems.We need to implement N-to-N parsers for both sides. For now, we only have the
javascript
andpython
sides. Supporting basic type has caused many bugs on both sides. WHAT IF we have more than two languages support?type checks based on string matches will become shit codes. For example:
https://github.com/TexteaInc/PyDataFront/blob/abaf7ee6929bee265391748fd63ee7577e10c028/backend/pydatafront/decorator/__init__.py#L41-L67
The
regex
is human unreadble code. For now, we have onlystr
,int
, andlist
, but the code already become unreadable.Our type checking should be based on
JSON schema
, one of the famous and stable formats for describing data structure.https://json-schema.org/
And you can just write one code to build your own data form, https://react-jsonschema-form.readthedocs.io/en/latest/