Qovery / scaleway-api-rs

Rust lib for Scaleway API
GNU General Public License v3.0
9 stars 1 forks source link

Create source and docs with number as i64 #18

Closed gaetronik closed 2 years ago

gaetronik commented 2 years ago

This PRs updates the openapi source files and push the generated files. Files were generated through a patched openapi-generator to cirucmvent a bug https://github.com/OpenAPITools/openapi-generator/pull/12485

The new source code works fine with my usage of the Domain API (Some types are now with relevant name instead of InlineXX). Hope it does not break too much.

gaetronik commented 2 years ago

ping @benjaminch I f you want to give this code a try with your existing codes

benjaminch commented 2 years ago

Seems to work on my end too :) Do you have any visibility as of when your patch on open api generator will be merged ?

I think I will accept and merge your PR so unlock people using API as of today, but we will need this fix for later updates. I will bump this package version to breaking change just not to break any existing integration.

Thanks a lot for your work on this one !

gaetronik commented 2 years ago

Seems to work on my end too :) Do you have any visibility as of when your patch on open api generator will be merged ?

Sadly no, I'm trying to have more information on their slack

I think I will accept and merge your PR so unlock people using API as of today, but we will need this fix for later updates. I will bump this package version to breaking change just not to break any existing integration.

Thanks a lot !

Thanks a lot for your work on this one !

You're welcome

benjaminch commented 2 years ago

PR merged, thanks for your support here @gaetronik.

Please let me know once your PR will be merged on OpenAPI side :)

Cheers !

benjaminch commented 2 years ago

Hey @gaetronik !

Was wondering, would you mind describing how to use open app generator including your patched branch so we can use this until your PR got merged.

Thanks a lot 😊

gaetronik commented 2 years ago

I used a docker image built on my branch (I tried compiling it locally but never managed to have the right version of java, maven, …) end use this command to generate:

docker run -v "$PWD:/gen" -u "$(id -u):$(id -g)" openapi-generator generate -g rust \
 -i /gen/.generation/consolidated-specs.yml \
 -o /gen \
 -c /gen/openapi-generator-config.yml \
 --type-mappings number=i64 \

Image was created using docker build -t openapi-generator . in the repository

benjaminch commented 2 years ago

Thanks !

gaetronik commented 2 years ago

Hi, Sorry to bother you. still no news on the openapi-generator side. Do you plan to release the change on crates.io before the merge ? No that I can't live with a git reference to the branch in my cargo.toml file, it works fine

benjaminch commented 2 years ago

Hey @gaetronik ! Unless I am mistaken, your MR has been packed as version 0.1.4 https://crates.io/crates/scaleway_api_rs/0.1.4 Cheers

gaetronik commented 2 years ago

It seems the generator config part was merged, not the source file changes if I read corectly the commit history

benjaminch commented 2 years ago

Hey @gaetronik , sorry about the delay here, let me have a look.

benjaminch commented 2 years ago

Hey @gaetronik

Should be better now :) https://crates.io/crates/scaleway_api_rs

Do not hesitate to create your PR directly targeting dev branch, I didn't realized it was on another branch :)

Thanks again

gaetronik commented 2 years ago

Thanks BTW, I managed to get https://github.com/OpenAPITools/openapi-generator/pull/12485 merged