Closed carlosdagos closed 5 years ago
I'm not completely sure about the invocation that you're using (nothing stands out as obviously wrong about it). However, it looks like the schema doesn't define any additionalProperties
fields. As far as I know, the field is optional within the swagger spec, but ocaml-swagger
doesn't handle the case when it is not present. You can see that here: https://github.com/andrenth/ocaml-swagger/blob/master/src/schema.ml#L39
I'm not really sure what would be the correct way of handling it, seeing as OCaml requires the type to be known ahead of time.
So, I looked a little further into it, it looks like the types are being specified, but a level above. I'd say someone would have to tinker with the code generator in order to correctly output the necessary types.
it looks like the types are being specified, but a level above
I noticed this when comparing to, say, the Kubernetes one. Looks like ocaml-swagger
is making an assumption about the structure.
Thanks for replying to my issue @rdavison 👍
Took a closer look and figured out that ocaml-swagger
was just misinterpreting the semantics of additionalProperties
(however, the level at which the types are being specified is correct and ocaml-swagger
treats this correctly). I think I've got a fix for it. Will submit a PR and see what you and the library author think :)
Quick update:
It's also happening with this schema. I haven't had time to look at the issue in detail, but I'll use it as an additional test case 😃
Hello!
I'm trying to use this lib with this schema and I'm getting the error:
And I'm getting the following
(It's very likely I'm getting the invocation wrong.)
Thanks!