meilisearch-swift
meilisearch-swift copied to clipboard
Change naming of API path variable from `query` to `path`
In this example, we use let query to define the API path. As per this comment: https://github.com/meilisearch/meilisearch-swift/pull/248#discussion_r802883984
We should change the wording from query to path everywhere query is used to define a path to an API route.
Example: https://github.com/meilisearch/meilisearch-swift/blob/f322911570ae4d7836fd6f1bce49d1dec6ba12b2/Sources/MeiliSearch/Documents.swift#L21
Should become
let path
Hi there, I'm new to open source but I'd like to tackle this one if possible. Is it just changing the constant name to let path from let query where it is called in the Documents Swift file in the Model for Meilisearch? Or does it need to be changed elsewhere? I could do this asap and is it possible to submit the documents file only in a pull request if the change is only there for the file path for the API? Thanks for your time!
I would like to work on this. I have experience working in Swift and iOS development. It would be great if anyone from the team can assign this issue to me.
Thanks for your interest in this project :fire: You are more than welcome to open a PR for this!
We prefer not assigning people to our issues because sometimes people ask to be assigned and never return, discouraging genuine volunteer contributors from opening a PR to fix this issue. We will accept and merge the first PR that correctly fixes and implements the issue following our contributing guidelines.
We are looking forward to reviewing your PR :blush:
Sure! Thank you! I'll take a look at all the things required and will definitely try to fix this issue as soon as possible.
Hey @brunoocasali , I was working on this issue. I've also changed the query to path in the documents file. I wanted to know apart from documents file is there any where else where I have to change the given ? I've looked a few files and couldn't find 'query' as an API name. Do I have to check every file in each folder structure or is there a better way ? I'll do that if there isn't. Would really appreciate your response to this question of mine. I'll do accordingly and will follow your suggestion. Thank you!
Hi @Dishant10.
The documents file was just an example, so if you find any other usage of query that is actually a full path, you can switch! :)
Okay got it! So do I have to check every file to see whether query was set to a path or not? Also there's a function toQuery I'll check that too.
For this issue, you can only rename the variables, and that's it!
If you want to do more, you can send a new PR :)
Okay got your point! So I've checked and did not find any variable named query where query was set to be a full path except documents file and I've changed query to path where query was defined to be a full path. Does this sound good ? Thank you!
Yes it is awesome, please send your PR :D
I've raised a PR please review it and leave comments if you want anything else to be added or removed also if I need to do it in another way. I'll be happy to incorporate your suggestions. Thank you!