Peter Wall

Results 80 comments of Peter Wall

I'm closing this issue as resolved. If you think there are still outstanding questions, feel free to reopen it or create a new issue.

Thanks for this. You say it can be implemented easily, and you're right that it wouldn't be difficult to add code to look for precisely this case and substitute a...

Hi @cmpaul , there is a simple solution to your problem – if you're prepared to accept the same compromise that I adopted in relation to `required`. Consider the following:...

As I said, it involves a compromise. Your second example would not validate against the schema, but it would deserialize into the generated Kotlin. If you're concerned to reject this...

I see your misspelling problem as a different issue. Your JSON deserialization library will almost certainly have an option to reject unrecognised properties (I recommend the [kjson](https://github.com/pwall567/kjson) library, which defaults...

On second thoughts – don't try the example in my previous post (using `allOf`) – it will generate very poor code. I will have an implementation of the `anyOf` or...

OK, I've implemented the special case of `oneOf` or `anyOf` described above, so the following (copied from one of your examples): ``` SomeType: type: object properties: commonType: oneOf: - type:...

The problem here is exactly what the exception message says – you have a recursive reference (to `/definitions/Extension`. JSON Schema draft 2019-09 introduced `$recursiveRef`, and later, draft 2020-12 introduced `$dynamicRef`,...

The parser guards against recursion by storing a dummy entry in its cache (used to resolve `$ref` references). When parsing of an individual schema is complete, it replaces the dummy...

Hi Matthias, thanks for the positive feedback. Yes, I have a separate project [json-kotlin-gradle](https://github.com/pwall567/json-kotlin-gradle) - this simplifies the use of the code generator with Gradle. I haven't yet put it...