Requirements:
-
use Python (FastAPI library) to create a backend rest api endpoint.
- Get Method
- you can use any url definition you want
- returning a json object which is the hard coded content as data.json (in the same repo as this readme.md) as well as http code 200
- The Json object must follow the hierarchy structure but the data details may be flexible (pay attention to the array hierarchy)
- Using pydantic library to validate the json payload
-
use Angular to create a frontend to present the json format, please follow the rules:
- use a separated http service to get data from backend
- present the data to the frontend component
- use data table to present the data
- the table has to be nested as row-expand details view since the data arrays in the requirement are nested
- the row items from the array must be able to change order using any method in the frontend
- please implement actions that you can change the content of any value inside the table
- provide a submit button that can call the backend POST method to save the modified table content
-
Create a backend api endpoint to accept POST method that frontend submitted
the json payload in the request body must be saved to a file on the backend server folder
-
To simplify, authentication is not required for any rest API call.
-
The frontend datatable design can be flexible but consider the best user experience first.
-
Please use flask-restful to implement backend python rest API
-
you must use ng-zorro angular library for frontend implementation