boxo icon indicating copy to clipboard operation
boxo copied to clipboard

pinning/http: PinStatus.Info incorrectly generated

Open aschmahmann opened this issue 4 years ago • 1 comments

PinStatus.Info should be an arbitrary JSON object which is generally represented in Go as map[string]interface{}.

It looks like the tools have some bugs around doing this by default.

https://github.com/OpenAPITools/openapi-generator/issues/3277 https://github.com/OpenAPITools/openapi-generator/issues/518

Also the Meta() wrapper function we wrote incorrectly returns map[string]string as well, so probably I should have noticed this earlier 🤦‍♂️.

cc @whyrusleeping @lidel

aschmahmann avatar Aug 26 '21 17:08 aschmahmann

The linked issues should have descriptions of how to make the code generator behave itself. Note that redoing the code generation will run into https://github.com/OpenAPITools/openapi-generator/issues/7473 and so we'll need to do some of the manual editing to remove the "4XX" checks.

We could also drop the OpenAPITools code generator and either use an alternative or write the client manually, but that might not be worth doing at the moment.

Next step here is probably evaluating if any of the workarounds in the linked issues work and if they don't then we can decide if the next thing is to just drop OpenAPITools as being a pain, or work with them on a patch.

aschmahmann avatar Sep 24 '21 21:09 aschmahmann