Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Kiota.Builder.Plugins.PluginsGenerationService generic over the output kind #5254

Open
calebkiage opened this issue Aug 27, 2024 · 0 comments
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned

Comments

@calebkiage
Copy link
Contributor

How the class works now:

The Kiota.Builder.Plugins.PluginsGenerationService is used to generate a plugin manifest from an OpenAPI document. It receives a working directory path as a string and generates plugin files into that path.

Why I want to change it

The current strategy works well but I see it becoming harder to maintain and test as more features are added to the type. It also makes it hard to test logic of individual units. For example, writing a test independent of the file system is currently not possible. That means that unit tests are effectively integration tests and require a lot of boilerplate code to write. This increases the development time of features in the class. I think this makes the class brittle and increases the maintainers' technical debt.

How I want to change it

I would like to split the type into multiple modular types that serve specific purposes. I haven't come up with a broken down design yet, but I would imagine the first big win is separating out the file IO from the type. This will unlock the possibility of using tests that work on in-memory data. An integration test could then be created to test the file system access.

How I would implement it

TBD

@calebkiage calebkiage added the status:waiting-for-triage An issue that is yet to be reviewed or assigned label Aug 27, 2024
@github-project-automation github-project-automation bot moved this to Needs Triage 🔍 in Kiota Aug 27, 2024
@github-staff github-staff deleted a comment from mengyanshou Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:waiting-for-triage An issue that is yet to be reviewed or assigned
Projects
Status: Needs Triage 🔍
Development

No branches or pull requests

1 participant