glideapps / quicktype

Generate types and converters from JSON, Schema, and GraphQL
https://app.quicktype.io
Apache License 2.0
11.76k stars 1.04k forks source link

[FEATURE]: Use externally provided class #2616

Open Azbesciak opened 3 weeks ago

Azbesciak commented 3 weeks ago

I would like to use a class implementation provided in the schema, not providing a mirror of it, but just reusing the one already in the dependencies.

One example is geojson schema, where I have my geometries classes already in dependencies and I want to avoid duplicating them, and then mapping to my classes. Or maybe it is already possible?

Context (Input, Language)

Input Format: json schema

Output Language: java, but would benefit for all

Description

Current Behaviour / Output

Maybe it is possible but right now I need to map one by one created classes to my desired ones

Proposed Behaviour / Output

There would be some "magic" property in schema which indicates the class. Or maybe in the renderer properties, to address $ref, somehow.