vscode-yaml icon indicating copy to clipboard operation
vscode-yaml copied to clipboard

Feature request: Typescript types as Schema

Open mhanuszh opened this issue 1 year ago • 0 comments

This might be a stupid question, but: Could the schema be derived from a Typescript type?

My reasoning for this would be that in most cases (at least for my project) Typescript types can be much more compact than the overly verbose JSON Schema.

For example, in my use cases, the same structure can be represented in 75% less lines, in an easily readable and editable way.

I am currently writing the schema in Typescript and using this cute project to create a file that the vscode-yaml extension accepts.

The absence of this feature is not a deal breaker, and I understand that such a feature might not be implemented due to unreasonable const to value ratio. I'm just here to express that there might be a demand for this feature.

mhanuszh avatar Jul 29 '23 20:07 mhanuszh