-
Notifications
You must be signed in to change notification settings - Fork 14
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(spec): add customRequest methods #178
Conversation
de15963
to
96e59ec
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love it !
*/ | ||
private Call getCustomRequestCall( | ||
String path, | ||
Object body, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a way to specify queryParams ? Maybe with an helper
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean having a clearer name?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
body
is just body
right ? The list of queryParams
will always be empty in this function (it can be passed inside the path but it defeats the purpose of having an api client)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohhhh you commented on the get request I did not get it sorry, I'll try to make it query params!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
wdyt? 88f0963
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🚀
|
||
import { exists, run, toAbsolutePath } from './common'; | ||
import { createSpinner } from './oraLog'; | ||
import type { Spec } from './pre-gen/setHostsOptions'; | ||
|
||
async function propagateTagsToOperations( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could have been a separate PR
…-clients-automation into feat/APIC-339/customRequests
description: This method allow you to send requests to the Algolia REST API. | ||
parameters: | ||
- $ref: '#/PathInPath' | ||
- name: parameters |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also add this to the others method ? I don't know if queryParams are restricted to GET
in our api
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I already did 🤔 You are right, this should do it: d4cd002
…-clients-automation into feat/APIC-339/customRequests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice
🧭 What and Why
🎟 JIRA Ticket: https://algolia.atlassian.net/browse/APIC-339
Changes included:
Real changes are in
scripts/buildSpecs.ts
andcommon
specs, all of the other are automatically generated.propagateTagsToOperations
that runs beforebuildSpec
, which allows us to:customRequest
definition that will be used for each clientstags
definition from eachpaths
file, this option can now be globally defined in the main<clientName>/spec.yml
file.path
template parameter torequestPath
, to avoid conflict with parameters of the same name.batch
andmultipleBatch
parameters🧪 Test
CI :D
The CI might not pass before #179 is merged if cache is invalidated