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

Generate fake mock data #309

Open
Tanddant opened this issue Aug 7, 2023 · 2 comments
Open

Generate fake mock data #309

Tanddant opened this issue Aug 7, 2023 · 2 comments
Labels
enhancement New feature or request needs spec Issue needs specification

Comments

@Tanddant
Copy link

Tanddant commented Aug 7, 2023

A neat feature would be to use the mock feature with a tool like fakerjs and essentially be able to mock a full API, and generate random data.

For instance when building a user management tool it would be nice to be able to generate 100's of random users mocking the graph endpoints to test things like pagination without having to create those users in my dev tenant

@waldekmastykarz
Copy link
Collaborator

That's a great idea! Recently, we released a set of mocks for all Graph endpoints based on Graph API reference docs, but I can imagine that you might need some other/more content.

Did you give some thought how you'd see it work? Would you like the Proxy to generate the mocks on the fly (making the outcomes dynamic but less predictable) or would you rather have something like a subcommand that you can use to generate a specific set of mocks, like m365proxy mock user --numItems 100 and the command would generate hundred mocked users in a mock file that you can plug into the Proxy?

@waldekmastykarz waldekmastykarz added enhancement New feature or request needs peer review Issue needs review from other team members labels Aug 8, 2023
@Tanddant
Copy link
Author

Tanddant commented Aug 8, 2023

That's a good question - my use case was actually just needing random data, I don't necessarily have an opinion on the "best way" - I guess the main thing is just mapping the Graph responses to a "mock" dataset

@waldekmastykarz waldekmastykarz added needs spec Issue needs specification and removed needs peer review Issue needs review from other team members labels Dec 13, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs spec Issue needs specification
Projects
None yet
Development

No branches or pull requests

2 participants