You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In Porter v1, we introduced some new files that people will be editing by hand and it would be great if VS Code would autocomplete these documents when the Porter extension is installed.
credential set
parameter set
installation
plugins (the file argument passed to porter plugins install -f plugins.yaml)
Seems like before porter releases we should tweak the schemaVersion field to indicate which file it is, e.g. schemaVersion: "credential-set-1.0.0", so that VS code can detect the type of file? Or do you recommend another way, like a separate field like kind: credential-set`? Porter now adds a schemaType field so that we can detect the file type. So if a file is yaml, and it contains a known schemaType, then we should apply the corresponding json schema so that the user gets autocomplete.
Long term it would be cool to get autocomplete support for the parameters/credentials names by querying porter but for now just having any syntax support would be nice.
Update: Porter v1 now embeds a schemaType and schemaVersion field in each file so that the extension could use these values to determine the proper jsonschema to apply to the file.
So if you opened a file that had those two fields, the porter extension could download the schema from
In Porter v1, we introduced some new files that people will be editing by hand and it would be great if VS Code would autocomplete these documents when the Porter extension is installed.
porter plugins install -f plugins.yaml
)Here is an example of what they look like and they are documented at https://getporter.org/reference/file-formats/ with links to the corresponding json schema files.
Credential Set
Parameter Set
Installation
Plugins
Seems like before porter releases we should tweak the schemaVersion field to indicate which file it is, e.g.Porter now adds a schemaType field so that we can detect the file type. So if a file is yaml, and it contains a known schemaType, then we should apply the corresponding json schema so that the user gets autocomplete.schemaVersion: "credential-set-1.0.0", so that VS code can detect the type of file? Or do you recommend another way, like a separate field like
kind: credential-set`?Since the schema for these is fixed (unlike porter.yaml which is generated directly by porter on demand), I was thinking that the extension could download the schema from a well-known url, e.g. https://getporter.org/schema/VERSION/FILE_TYPE.json. So the installation schema from https://raw.githubusercontent.com/getporter/porter/release/v1/pkg/schema/installation.schema.json (this isn't the URL we want to use in the extension) would be available at https://getporter.org/schema/v1/installation.schema.json (this is the URL to use in the extension, so that we can improve or fix it later as needed using URL redirects).
The text was updated successfully, but these errors were encountered: