Skip to content

Adding possibility to generate a json schema file when calling jsonargparse.ArgumentParser.save #618

Open
@martinResearch

Description

@martinResearch

🚀 Feature request

Add option to generate a json schema alongside the json file when calling jsonargparse.ArgumentParser.save and link to that schema file in the default config json file using the "$schema" key.

Motivation

When I edit json configuration files, it is error prone. I can do spelling mistakes, I do not know what filed are optional, what the possible values for enums are etc.

Pitch

It would be nice if we could generate a json schema alongside the json file when calling jsonargparse.ArgumentParser.save and link to that schema file in the default config json file using the "$schema" key. This would enable the use of a plugin like Json Schema validator in vs code to get auto-completion and validation directly when editing the configuration file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions