hanko-go/client
2025-08-04 17:23:06 +02:00
..
admin feat: update to version 1.2.0 2025-08-04 17:23:06 +02:00
client_gen.go feat: upgrade oapi-codegen v2.3.0 2024-07-04 13:21:46 +02:00
client.config.yaml feat: generate hanko clients v0.11.0 2024-06-06 19:03:08 +02:00
client.yaml feat: upgrade client to spec v0.12.0 2024-07-04 13:45:45 +02:00
generate.go feat: upgrade client to spec v0.12.0 2024-07-04 13:45:45 +02:00
README.md chore: setup project structure 2024-07-04 13:04:41 +02:00

Unfortunately the provided openapi spec is not valid with oapi-codegen. The following error is thrown:

error loading swagger spec in client.yaml
: error unmarshaling JSON: while decoding JSON: failed to unmarshal property "components" (*openapi3.Components): failed to unmarshal property "schemas" (*openapi3.Schemas): failed to unmarshal property "items" (*openapi3.SchemaRef): failed to unmarshal property "properties" (*openapi3.Schemas): failed to unmarshal property "required" (*[]string): json: cannot unmarshal bool into Go value of type []stringpackages/go/clients/hanko/public/generate.go:4: running "oapi-codegen": exit status 1

There are several places in client.yaml where the required field is set to false instead of a list of strings. This is not valid according to the OpenAPI 3.0 specification. To fix this issue, replace all occurrences of required: false with required: ["false"].

timeout:
  type: number
  format: int64
  example: 60000

should be rewritten to:

timeout:
  type: integer
  format: int64
  example: 60000

And last but not least, due to name conflict during code generation, we must rename CreateUserResponse to CreateUserResponseObject.