andrenth / ocaml-swagger

Swagger 2.0 code generator for OCaml
37 stars 10 forks source link

Add support for string types with int-or-string format. #7

Closed rizo closed 6 years ago

rizo commented 6 years ago

This essentially fixes https://github.com/andrenth/kubecaml/issues/3

The implementation is not beautiful but relatively straightforward: the schema value is inspected for the string-or-int format and the alias generated in an implementation will wrap the yojson conversion functions attempting to represent the string value as a JSON integer.

andrenth commented 6 years ago

Thanks again Rizo.

Would you like to be added as a collaborator to ocaml-swagger? I think you're already familiar with the code and this way you'd be able to add your enhancements directly.

rizo commented 6 years ago

Hey @andrenth thanks for merging this!

I don't mind being added as a collaborator, thank you. I might not always have time to respond to issues quickly but I guess two people is better than one. I'm currently actively using Kubecaml at my work so I might find more issues or propose improvements.

If you think you won't have time in the future to manage this library (and I guess kubecaml too) I would recommend considering moving them to the OCaml Community organization (I'm also a member of the group). Some popular projects were already adopted and more are being added. You can find more details here.