-
Notifications
You must be signed in to change notification settings - Fork 34
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
cargo make generate-api
: invalid gzip error
#190
Comments
@AbhinavGarg90 , I don't think the |
I tried different branch names, 1.x, main and master. None worked for me |
Could you suggest where the root of this issue likely is? I am not sure where to start @Xtansia. |
@AbhinavGarg90 If you look for the |
I looked a bit into the control flow. I have a few supposed conclusions:
Generate code from rest specifications main [Y/n]: y
Error: Failed to parse /home/abhinavgarg/osci/opensearch-rs/api_generator/rest_specs/ml.get_trained_models.json because: invalid type: boolean `true`, expected struct Deprecated at line 51 column 26 I'm guessing there is a certain format that the program expects, and the error causing file does not meet those specifications. Here is a snippet of which line this is ocurring on for the json: "include_model_definition":{
"type":"boolean",
"required":false,
"description":"Should the full model definition be included in the results. These definitions can be large. So be cautious when including them. Defaults to false.",
"default":false,
"deprecated": true <---
},
"decompress_definition":{
"type":"boolean",
"required":false,
"default":true,
"description":"Should the model definition be decompressed into valid JSON or returned in a custom compressed format. Defaults to true."
},
|
Well based off https://github.com/opensearch-project/opensearch-rs/blob/main/api_generator/src/rest_spec/mod.rs#L30 it's not downloading from the right place. But also I believe the copy of rest_specs in this repo have been hand edited so don't exactly match the ones that'd be downloaded. But also as #192 is to be done at some point, we probably don't want to invest too much effort into using these legacy specs |
so can we close this issue, considering there is another issue open that is aiming to fix the same problem? |
@AbhinavGarg90 Yes, that's a fair assessment |
What is the bug?
When
cargo make generate-api
is run, and you try to download the rest specifications from the default branch, it gives the following error:How can one reproduce the bug?
Follow instructions provided in
DEVELOPER_GUIDE.md
to initalise rust project.run
cargo make generate-api
when prompted with
Download rest specifications [y/N]:
, entery
when prompted with
Branch to download specification from [default main]:
, press ENTER for defaultWhat is the expected behavior?
It should generate the API specs successfully.
What is your host/environment?
WSL Ubuntu 22.04.3 LTS
libssl-dev installed.
Do you have any additional context?
Attempted different branch names, none seemed to work. However, if ENTER is pressed when prompted with
Download rest specifications [y/N]:
it executes successfully.
The text was updated successfully, but these errors were encountered: