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

Make the type of a Task a enum of values #363

Closed
brunoocasali opened this issue Mar 2, 2023 · 4 comments · Fixed by #425
Closed

Make the type of a Task a enum of values #363

brunoocasali opened this issue Mar 2, 2023 · 4 comments · Fixed by #425
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@brunoocasali
Copy link
Member

In /Sources/MeiliSearch/Model/Task.swift:

The attribute public let type: String should become an enum.
The possible values are:

indexCreation, indexUpdate, indexDeletion, indexSwap, documentAdditionOrUpdate, documentDeletion, settingsUpdate, dumpCreation, taskCancelation, taskDeletion, and snapshotCreation
@brunoocasali brunoocasali added the enhancement New feature or request label Mar 2, 2023
@Dishant10
Copy link
Contributor

Hii,
I would like to fix this issue. Please assign this issue to me and if possible please mention any extra information that is required apart from the above statement.
Thank you!!

@brunoocasali
Copy link
Member Author

Hi! @Dishant10. Good to see you again!

This issue is very straightforward! Something I could add to it is the value of the enum should be sent as camelCase eg. "indexUpdate", even if the enum key is INDEX_UPDATE.

You don't need to be assigned to the issue, we usually don't do it since people may not come back! And this could prevent other potential developers to contribute!

See you soon! Let me know if you have any doubts!

@Dishant10
Copy link
Contributor

Got it! Let me try this one. I'll ask if I get stuck somewhere.
Thank you!!!

Dishant10 added a commit to Dishant10/meilisearch-swift that referenced this issue Mar 17, 2023
@Dishant10
Copy link
Contributor

I've raised a PR, please review it. I'll make any changes if needed.
Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
3 participants