[RFC v1 0/1] dts: separate allowed values from json schema

Juraj Linkeš juraj.linkes at pantheon.tech
Tue Sep 10 11:34:06 CEST 2024



On 7. 8. 2024 17:01, Luca Vizzarro wrote:
> Hi Nicholas,
> 
> Thank you for the proposal. The way I see it is that JSON schema can be 
> very developer unfriendly to read, therefore I would not rely on it for 
> this purpose. Adding $refs as well could start making it more 
> complicated for this purpose. It's helpful for structuring and 
> maintaining the files though.
> 
> Normally, a schema is meant for validation purposes. And docs should 
> provide the developer with the right information.
> 
> Nonetheless, I am getting started in replacing Warlock with Pydantic. 
> And basing the Python classes on Pydantic models. Unfortunately, this 
> will nullify this work altogether, as Pydantic provides an automatic 
> facility for generating the JSON schema, thus removing the need for 
> manual maintenance.
> 
> Best,
> Luca

What Luca says makes a lot of sense. Let's not bother improving the 
schema since it'll be obsolete soon with the Pydantic changes.


More information about the dev mailing list