Allow custom schemas using IDataSourceSchemaProvider#40
Open
ThomasBleijendaal wants to merge 1 commit intoSamuelFisher:masterfrom
Open
Allow custom schemas using IDataSourceSchemaProvider#40ThomasBleijendaal wants to merge 1 commit intoSamuelFisher:masterfrom
ThomasBleijendaal wants to merge 1 commit intoSamuelFisher:masterfrom
Conversation
Contributor
Author
|
On second thought, we might want to make the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds
IDataSourceSchemaProviderwhich is an interface that allows plugins to provide custom schemas that are not bound to a specific concrete type. One can output a schema containing objects with certain properties, but use an type that receives those properties in something likeDictionary<string, Dictionary<string, object>>.I don't know if you want to go this direction with this plugin, but this allows for creating a bunch of specialized schemas, but handle those using a single type.
A use case for this is, for example, create a terraform plugin that reads a certain folder for specific files, parse those files, and output a schemas for each file, containing properties from those files. Those files can then be referenced in the terraform template, and the code suggestions will reflect those exact files and their contents.