-
Notifications
You must be signed in to change notification settings - Fork 17
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
fix: search index spec #8
Conversation
Error I got, you got to love an API that only output one error without context {
"message": "Unknown parameter: userData",
"status": 400
}
{
"message": "Unknown response field `string`",
"status": 400
}
{
"message": "Unknown parameter: attributeForDistinct",
"status": 400
}
{
"message": "Value too small for \"minimumAroundRadius\" parameter, expected integer between 1 and 9223372036854775807",
"status": 400
}
{
"message": "Invalid value for \"aroundRadius\" parameter, expected integer > 0",
"status": 400
} |
@millotp @damcou @shortcuts not sure I will have time tomorrow (tuesday), do not hesitate to continue this PR. |
Do you mean forwarding the message sent by the engine but changing the status code? |
It was more about writing all possible messages and do a |
@@ -0,0 +1,85 @@ | |||
allowCompressionOfIntegerArray: |
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.
Since we already have indexSettings
params, 1/indexes/{indexName}/settings
should be pretty easy
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 can not approve since I'm the owner but LGTM
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 work !
/** | ||
* A single record | ||
*/ | ||
export class Record extends null<String, object> { |
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 don't get where this extends null
is coming from but it's breaking the js, do you know how it got here ?
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.
Good question 🤔
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.
Don't forget to commit the build if you have found the solution
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 can't find where this is coming from, it's just every other model but it adds a parent to this one
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.
additionalProperties: true
adds this weird part, I did not find a solution yet 🤔
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.
Actually, modelError
also have this type thing https://github.com/algolia/api-client-automation-experiment/blob/main/output/model/modelError.ts so it might be related to the generator template itself
Updated a bunch of things, might need an other review @damcou @bodinsamuel @millotp |
_highlightResult: | ||
$ref: '#/highlightResult' | ||
_snippetResult: | ||
$ref: '#/snippetResult' | ||
_rankingInfo: | ||
$ref: '#/rankingInfo' | ||
_distinctSeqID: | ||
type: number |
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.
Note, we should investigate if we can influence this response object with request param.
e.g: _rankingInfo is only return when getRankingInfo is true
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.
True, it was implemented as all optional for now but we should indeed make it clearer.
Should we consider it in this PR?
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.
no but we can note it in next investigation
/** | ||
* A single record | ||
*/ | ||
export class Record extends null<String, object> { |
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.
Don't forget to commit the build if you have found the solution
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.
Seems to be working now that main was merged.
If everything is good on your side, we can merge.
Co-authored-by: Clément Vannicatte <[email protected]>
Spec for
/1/indexes/{indexName}/query
todo:
Mostly because SearchParams are incorrect