patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

Investigation(Table): mock REST API for updated table data

Open jenny-s51 opened this issue 3 years ago • 1 comments

Per our discussion @tlabaj @mcarrano - we decided we need to find an online mock REST API that will allow us to paginate all the new table data: https://docs.google.com/spreadsheets/d/1-sqIbCpmFfmID0fByWZSOBpn99ocGyT2KoUZ5B_s3zo/edit#gid=0

The mock API we currently use (my-json-server.typicode.com) poses some development limitations - it comes with a character limit to the amount of data in the JSON file, and it only lets us make 5 table columns, whereas we need 7 columns to align with the new table data.

This is an investigation to find a different online REST API that supports fetching all this new data.

jenny-s51 avatar Aug 04 '22 19:08 jenny-s51

Investigation Results

I experimented with several online mock API tools:

The tools above are not of any use in our case, due to the combination of hardcoded and randomized data (26 "US" nodes, 15 "CZ" nodes, custom href links for each, location is based on the node country etc.). Mock APIs work by generating fully random data.

I also attempted hardcoding the entire block of data as a JSON file, which would live remotely on a web server, however we would not be able to pass in pagination parameters to the API if done that way. As a result, we'd have to paginate the API within the demo, which exposes a lot of hacky pagination logic to the consumer -- not ideal!

Therefore, it makes the most sense for this data to live in our repo. We are already doing this with logViewer, therefore taking a similar approach here would be the best solution.

jenny-s51 avatar Aug 09 '22 15:08 jenny-s51

Thank you for investigating.

tlabaj avatar Aug 19 '22 20:08 tlabaj