Skip to content

Custom Driver Model Generation from versioned Schema#24

Merged
PaulWinterstein merged 12 commits into
mainfrom
22-custom-driver-model-generation-from-versioned-schema
May 20, 2025
Merged

Custom Driver Model Generation from versioned Schema#24
PaulWinterstein merged 12 commits into
mainfrom
22-custom-driver-model-generation-from-versioned-schema

Conversation

@JonasScholl

@JonasScholl JonasScholl commented May 19, 2025

Copy link
Copy Markdown
Member

This PR adds a new VS Code task Generate Driver Models that takes a driver schema JSON file (default is the latest one) and generates the pydantic data model based on it.

Since the overloads should be generated after this too, I adjusted the tasks for this as well. There is now a task Generate Data Model that just runs all related code generations in the right order. So this is the task one should use when generating the model for a new version.

I also looked that the docstrings render as good as possible - looks a bit ugly in the code, but if the docstring is indented, it is indented in the preview / documentation too.

The only thing I didn't do (yet) is documentation - this should probably documented in the Readme and at least the PydanticModelBuilder should have some docstrings at least. But I wanted to get feedback first before investing time in it

@JonasScholl JonasScholl self-assigned this May 19, 2025
@JonasScholl JonasScholl linked an issue May 19, 2025 that may be closed by this pull request
@PaulWinterstein PaulWinterstein merged commit 76ee4cd into main May 20, 2025
7 checks passed
@PaulWinterstein PaulWinterstein deleted the 22-custom-driver-model-generation-from-versioned-schema branch May 20, 2025 07:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Custom Driver Model Generation from versioned Schema

2 participants