Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide JSON schema for deploy CLI config files #732

Open
1 task done
stabai opened this issue Feb 6, 2023 · 2 comments
Open
1 task done

Provide JSON schema for deploy CLI config files #732

stabai opened this issue Feb 6, 2023 · 2 comments

Comments

@stabai
Copy link

stabai commented Feb 6, 2023

Checklist

Describe the problem you'd like to have solved

When working with the JSON files exported by the deploy CLI, it's hard to know what fields and values are valid/required/etc.

Describe the ideal solution

It would be great if a JSON schema for these types were provided.

Ideally, the schema would be published to something like JSON Schema Store so that editors can automatically detect them via glob patterns. Alternatively/additionally, the export functionality of the CLI could write in a $schema URL for each file it exports, so that editors can use this information to validate the file.

Alternatives and current workarounds

I was unable to find a JSON schema definition. If only that were available, this would already be a huge step forward as users could wire it up to their editors manually.

Additional context

No response

@willvedd
Copy link
Contributor

@stabai This is an excellent suggestion, it would certainly make the process of creating Deploy CLI configuration much clearer. We already loosely define some of the resource handlers, but admittedly probably not enough for being a goo DX. It would be a pretty big undertaking to augment atop the current tool but this is something I'd consider implementing for future version of the tool.

@stabai
Copy link
Author

stabai commented Aug 11, 2023

Yeah, I think the trick is also in ensuring that the schema stays correct as the API evolves. Defining the API contract in a way that it can both be used by the service that the Deploy CLI calls and also be automatically translated into a JSON schema would be the approach I'd seek.

For example, using Protocol Buffers might be a good way to allow this, since they can define interoperable schemas in many languages and also be converted to JSON schemas (but I don't claim to know what would work well for this service).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants