Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Nov 21, 2024. It is now read-only.

Comments

Partial Implementation of Pydantic#45

Open
Nicholas-Schaub wants to merge 1 commit intoCodeWithSwastik:main from
Nicholas-Schaub:feat/pydantic
Open

Partial Implementation of Pydantic #45
Nicholas-Schaub wants to merge 1 commit intoCodeWithSwastik:main from
Nicholas-Schaub:feat/pydantic

Conversation

@Nicholas-Schaub
Copy link
Contributor

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

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.

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /