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

add basic support for phone numbers api #79

Merged
merged 10 commits into from Oct 2, 2022
Merged

add basic support for phone numbers api #79

merged 10 commits into from Oct 2, 2022

Conversation

MiTo0o
Copy link
Contributor

@MiTo0o MiTo0o commented Oct 2, 2022

  • generate random phone number based on country code WIP (LONG list of countries)
  • generate random phone number with random format
  • generate random IMEI number

@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

was wondering if this looks ok? Phone numbers can also be formatted with dashes like 111-111-111 or with () like (111)-111-111. I currently just left it with spaces like +1 111 111 111.

@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

now that I think about it, my whole approach may have been overkill. Most people probably don't care that much about a specific country's phone number format.

@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

ah, and most countries have many different phone formats locally. I'm just gonna wait for some suggestions.

@ageddesi
Copy link
Owner

ageddesi commented Oct 2, 2022

Hi @MiTo0o,
Thank you for the PR, this is great work. I love that you added the ability to have country codes.
In regards to your question about spaces. Can we make it an option in the url. so you can choose the format.

Examples are:
spaces
no-spaces
dashes

What do you think?

@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

Hi @MiTo0o, Thank you for the PR, this is great work. I love that you added the ability to have country codes. In regards to your question about spaces. Can we make it an option in the url. so you can choose the format.

Examples are: spaces no-spaces dashes

What do you think?

Sounds great, I will add those three options.

@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

hey @ageddesi do you think it's ok if we only provide the phone number formats to popular countries for now? It's a lot of work to search every countries phone number format. Some countries also have many different phone number formats.

@ageddesi
Copy link
Owner

ageddesi commented Oct 2, 2022

@MiTo0o Hi, do how ever many you like for this step and then please can you raise a ticket for what needs to be done. Hopefully someone else will pick it up as part of Hacktoberfest

@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

@ageddesi Thank you for your patience and quick responses :D. How does it look so far? Is there anything else I should clean up / do. I think I'll take your suggestion and raise a ticket for the rest of the phone number formats.

@ageddesi ageddesi changed the base branch from main to v.0.13.0 October 2, 2022 19:43
@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

hey @ageddesi I merged the 0.13.0 branch into mine and found some problems with swagger.json, there were missing/extra commas and there are some duplicate keys. I fixed the commas, but not sure what you want to do with the duplicate keys.

@ageddesi
Copy link
Owner

ageddesi commented Oct 2, 2022

Hi @MiTo0o, I have just pulled in a new way of doing the swagger docs.
We now do the openAPI spec directly in the API file itself using comments.
If you update your code to use this you can ignore the swagger.json file as it will auto generate.

@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

oh the openAPI seems so cool, let me check it out and update

@ageddesi
Copy link
Owner

ageddesi commented Oct 2, 2022

Thanks @MiTo0o sorry to be a pain, someone kindly finally set it up for me as part of hacktoberfest and handles all the conflicts I have been having

@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

hey @ageddesi its all good :D. I'm always open to learning more. One quick thing, how do I generate swagger with openAPI? and also getting a error in another api route

image
image

the Music interface is being imported by also being created again the the same file

@ageddesi
Copy link
Owner

ageddesi commented Oct 2, 2022 via email

@ageddesi
Copy link
Owner

ageddesi commented Oct 2, 2022

@MiTo0o Once you have added the OpenAPI comments to your api ts file. The next time you run the application and go to the localhost url you will see your changes refelected in the docs.

@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

ok so the thing is my fork only has the main branch, I can't merge 0.13.0 branch into my branch ;(

@ageddesi
Copy link
Owner

ageddesi commented Oct 2, 2022

ok no problem, leave it with me 👍 I will get what you have done merged in.

@ageddesi ageddesi merged commit e944c3f into ageddesi:v.0.13.0 Oct 2, 2022
@ageddesi
Copy link
Owner

ageddesi commented Oct 2, 2022

@all-contributors please add @MiTo0o for code.

Thanks for the contribution, Happy Hacktoberfest. I hope you will want to do more in our API. If you do like what we are doing please consider staring the repo and joining our Discord channel at https://discord.gg/yxqrkjDR87

@allcontributors
Copy link
Contributor

@ageddesi

I've put up a pull request to add @MiTo0o! 🎉

@MiTo0o
Copy link
Contributor Author

MiTo0o commented Oct 2, 2022

Thanks for the contribution, Happy Hacktoberfest. I hope you will want to do more in our API. If you do like what we are doing please consider staring the repo and joining our Discord channel at https://discord.gg/yxqrkjDR87

Thank you so much! :D I had a lot of fun

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants