-
-
Notifications
You must be signed in to change notification settings - Fork 975
docs unclear: faker.unsplash is not defined #412
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
Comments
It looks like the docs generation does not properly filter elements that arent directly available via faker. We will fix that. Thanks for bringing this to our attention. |
If you are willing to contribute, then I can assign this issue to you. Line 81 in 22a8cbc
Please note that I'm currently trying to rewrite the code a bit to use vue components so please dont refactor the code unless necessary |
@cdgn-coding While we are fixing the docs, just use https://stackblitz.com/edit/typescript-wsqtmx?file=index.ts in the meantime import { faker } from '@faker-js/faker';
faker.image.unsplash.avatar(); |
I started to use the methods below This example renders images using |
Yes, but any kind of bugfix of existing code is scheduled for 6.1 or later. |
Due to following code works, I will close this issue. import { faker } from "@faker-js/faker";
faker.image.unsplash.technology(); Please open new dedicated issues for anything that was unrelated to this issue. |
This is a bug in our documentation, that needs to be fixed. |
Unsplash is deprecating the above urls in two stages:
|
We deprecated the unsplash apis for removal already. faker/src/modules/image/index.ts Lines 12 to 15 in 2e6b136
|
Uh oh!
There was an error while loading. Please reload this page.
Describe the bug
faker.unsplash is not defined whereas the docs allows to use it (reference)
Reproduction
Minimal code to reproduce:
This code shows a typescript warning
When it's run it throws this error
Additional Info
I found that unsplash is accesible via the image property
We should either update the documentation or add unsplash to the Faker top level methods. The first option feels more natural to me. I would like to contribute introducing the fix if needed.
The text was updated successfully, but these errors were encountered: