-
-
Notifications
You must be signed in to change notification settings - Fork 478
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
Contextual Products #84
Comments
Hi @digitalcoyote, Thank you for creating an issue. I appreciate very much being able to discuss the proposal before a PR is submitted. I'm still on the fence about creating a dedicated contextual The reasons I feel some reservations about
My overall arching view of Bogus is to keep its API somewhat focused and terse on the general use case. I do sometimes fear polluting the API in the name of being everything for everyone. Regardless how I feel about With that being said, I do see possibly a better/alternative way of looking at a Imagine for a second we had a namespace called
Where IMHO, this approach scales Bogus' usefulness and utility without necessarily polluting and complicating the public API set. It's a win-win all around I think. We could endlessly scale these conventions to a whole library of conventions for different object types. Long term, this is where I see Bogus going and I'd be happy to maintain something like that. See #8 for more discussion on the topic. I hope my mind dump on the topic somewhat makes sense. 👍 Thanks, |
Makes sense, I look forward to that approach. In the mean time, I'll handle this case within the project I'm testing. |
I'd like to see Products be able to produce contextual information in a similar way to Persons. Seems like this could be disruptive though as the appropriate location (I believe) would be Faker.Commerce.Product. It seems to me that the Product Method would more appropriately be named ProductName (as this is what it actually returns).
This would be extremely helpful for my use case, but if I'm going to do it for me, I'd like to code it in such a way it could be pulled back in.
Ideally a product would have (with new datasets as necessary):
Potentially:
I'm not excited about breaking people using Product to generate product names though so any suggestion would be greatly appreciated.
EDIT: To be clearer, I'm looking for a suggestion of where this would be best added and not suggesting actually replacing Product with ProductName (never used faker.js but I assume that would break the semantic API compatibility with faker.js)
The text was updated successfully, but these errors were encountered: