Closed lucab closed 7 years ago
I don't think I needed that features so it seems I missed that case :) Shouldn't be to difficult to fix though.
In the same vein, could we also support external refs?
"nested": {
"$ref": "defnested.json"
}
This would greatly help me with my current project.
@lucab Released version 0.2.2 which handles nested definitions.
@mre Sure, though that is unfortunately not trivial to add due to some unfortunate implementation details. I may try to do a refactor later this week.
@Marwes thanks for the fast reaction, it looks fine from a very quick test! I'll report separately if I hit other corner-cases.
@mre do you mind moving the external-refs issue to its own ticket? This one can otherwise be closed from the point of view of the original issue.
Absolutely. Moved to new issue. 👍
Nested-defs support landed, external-refs tracked at https://github.com/Marwes/schemafy/issues/3. Closing this.
It looks like the library is producing incomplete code due to missing types in case of nested definitions.
As a short example, let's take the following JSON schema:
which produces the following struct:
However, the library is not generating any corresponding definition for
Defnested
.