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

Ability to mock whole API interface for local development without a need of a server. #168

Open
cyberail opened this issue Nov 28, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@cyberail
Copy link
Collaborator

cyberail commented Nov 28, 2023

Implement faker for generating fake data depending on the response and request models of mapped endpoints.

Currently, we need to provide different types of data, manually to test various repos, or the UIs, or domain logics.

But the most of the use of this package happens in unit tests of course for unit testing.
Idea that I am trying to suggest is to give users ability to develop the app without need of the server or without some junky test datas.

I think that this package can extend to the point where it will not only be the package for testing from unit tests, but the package that can mock whole API interface by providing necessary models and by running one or two commands user can have his/her API interface fully mocked in flutter till the day he/she decides to move on to the production, in which case he/she should be able to do it just by exchanging DioAdapters.

packages that might be necessary for that implementation might be:
mason,
build_runner,

Currently I don't have full ideas interface and implementation but slowly will update it.

Any ideas and suggestions are welcomed.

@LukaGiorgadze LukaGiorgadze added the enhancement New feature or request label Nov 29, 2023
@LukaGiorgadze
Copy link
Member

@cyberail Hey David, thanks for raising an issue.
What do you mean by "the package that can mock whole API interface"?
If my app uses let's say local storage, do you mean to mock local storage as well?

@cyberail
Copy link
Collaborator Author

cyberail commented Nov 29, 2023

NO not the local storage, at least for now, I mean HTTP API.

@SAGARSURI
Copy link

Any update on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants