-
Notifications
You must be signed in to change notification settings - Fork 0
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
Share types between report-schema and mutation-server-protocol #4
Comments
We don't use the schema to generate our types so this decision is not currently relevant to us. I would suggest that you check your json schema type generator to see if this potentially creates conflicting types and if not that it's fine for now. For the future I would like to see us publish relevant types as separate schema's so they can be reusable and composable: https://json-schema.org/understanding-json-schema/structuring#dollarref At that point I would also like to publish the schema's so they can be referenced. |
At this time I don't have a preference yet. For go (golang) and Kotlin I don't know yet if I want to generate any models. Maybe only validate the json output, which could be executed by a validator that does not depend on the target languages for implementing the server or plugin. |
Sure, or we migrate the whole thing to Zod, so we can use simple schema's using the JS module system and export it to JSON schema as part of our build steps. Aligning on Zod would be some work for StrykerJS, but would save us on some dependencies (not the end of the world though)
Which do you prefer? If you prefer json schema than we can use zod-to-json-schema to convert the current Zod schema
Sure. I can do that in a PR after #3 |
I don't have enough experience to have a well founded preference. |
The report-schema and mutation-server-protocol have some overlap in their defined types—namely the
MutantResult
type.I see 2 ways forward.
Leave it as is. We accept this bit of overlap in favor of readability, portability, and possibly maintainability.
Create a new package, "mutation-testing-schema" (I guess), with all types from both report schema and MSP. Let
report-schema
andmts
use that.I'm currently leaning toward the DAMP option, maybe, until we have more to share.
The text was updated successfully, but these errors were encountered: