ory / sdk

The place where ORY's SDKs are being auto-generated
Apache License 2.0
141 stars 85 forks source link

Go: generated hydra-client-go v1.11.4 is wrong? #152

Closed Codebreaker101 closed 2 years ago

Codebreaker101 commented 2 years ago

Preflight checklist

Describe the bug

Just started to checkout hydra and it seems that the API generated for v1.11.4 is for Oathkeeper API and not for Hydra. Compared to v1.10.6 the API is different and all the file headers say that is is for Oathkeeper API

Reproducing the bug

https://github.com/ory/hydra-client-go/tree/v1.11.4

https://github.com/ory/hydra-client-go/tree/v1.10.6

Relevant log output

No response

Relevant configuration

No response

Version

v1.11.4

On which operating system are you observing this issue?

No response

In which environment are you deploying?

No response

Additional Context

No response

aeneasr commented 2 years ago

Hello, with Hydra 1.11 we switched the OpenAPI Generator from version 2 to version 3 to match all the other projects. If you want to generate 1.10.x-style APIs you can use this:

swagger generate client -f ./spec/swagger.json -t target_directory -A Ory_Hydra

in the project's root

Codebreaker101 commented 2 years ago

Thanks for the response. I was confused by the header of each file that states its an Oathkeeper API:

/*
 * Ory Oathkeeper API
 *
 * Documentation for all of Ory Oathkeeper's APIs. 
 *
 * API version: v1.11.4
 * Contact: hi@ory.sh
 */

Example

aeneasr commented 2 years ago

Oh, yeah, that is indeed confusing! The code base is correct though for the right project :)

aeneasr commented 2 years ago

I think this has been resolved on master already and we just need to push another release to fix the header!

Codebreaker101 commented 2 years ago

Great!