Skip to content
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Conversation

@Nicholas-Schaub
Copy link
Contributor

@Nicholas-Schaub Nicholas-Schaub commented Jan 9, 2022

This PR converts most extension classes into pydantic classes.

The Extension class is not converted into a pydantic class because I am investigating a good approach to doing this. Effectively, Extension.py contains all information for package.json. The ideal approach is to get the json schema for package.json and autogenerate the pydantic classes, that way if the schema is updated then it is easy to update the class. However, there is no package.json schema that fits vscode extensions exactly. Rather, vscode uses NPMs package.json schema and then make modifications within the code rather than creating an actual schema.

What we can do is create an autogenerated package.json class, then make Extension a subclass and make the necessary changes to conform to vscode.

This PR also enforces some standards outlined in the vscode docs. For example, package versions should follow semantic versioning, so the pydantic classes validate the input version that is supplied to the class.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant