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

feat: straightforward client init with apiKey and appId #7

Merged
merged 3 commits into from
Nov 15, 2021

Conversation

damcou
Copy link
Contributor

@damcou damcou commented Nov 12, 2021

JIRA APIC-157

  • created a searchClient class that extends the generated class which takes appId and apiKey for the init
  • removed all passed parameters in the methods parameters

Copy link
Contributor

@bodinsamuel bodinsamuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it's correct right now as you basically removed it from the spec.
I woud look at Security prop, might be supported by the generator https://swagger.io/docs/specification/authentication/api-keys/

@damcou
Copy link
Contributor Author

damcou commented Nov 12, 2021

I'm not sure it's correct right now as you basically removed it from the spec. I woud look at Security prop, might be supported by the generator https://swagger.io/docs/specification/authentication/api-keys/

Yeah I know it's a little bit "quick and dirty", sorry for that, my goal was to quickly come up with a situation where the api key, the application id and the host were at init time. I'll try to find a better solution next week.

@damcou damcou requested a review from bodinsamuel November 15, 2021 11:08
Copy link
Contributor

@bodinsamuel bodinsamuel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🚀

searchClient.ts Outdated
@@ -0,0 +1,11 @@
import { SearchApi, SearchApiApiKeys } from 'algoliasearch-client-javascript';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Naming is ugly but I guess it's hard to change

Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!!

@damcou damcou requested a review from shortcuts November 15, 2021 14:29
Copy link
Member

@shortcuts shortcuts left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to go!

We should just keep in mind that we should generate the client class based on the classname (spec tags) otherwise it breaks our automation goal

@damcou
Copy link
Contributor Author

damcou commented Nov 15, 2021

Good to go!

We should just keep in mind that we should generate the client class based on the classname (spec tags) otherwise it breaks our automation goal

Yes, we will automate that once the POC is finished :)

Copy link
Collaborator

@millotp millotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems good to me ! Love the var env

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

Successfully merging this pull request may close these issues.

4 participants