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

Add a switch to allow implicit string conversion #399

Closed
mwadams opened this issue Aug 13, 2024 · 2 comments
Closed

Add a switch to allow implicit string conversion #399

mwadams opened this issue Aug 13, 2024 · 2 comments
Labels
breaking This would be a breaking change if implemented. enhancement New feature or request

Comments

@mwadams
Copy link
Contributor

mwadams commented Aug 13, 2024

This is a more complex issue than simply allowing an implicit string conversion.

It would be a breaking change for existing .NET 8.0 clients as the explicit conversion is required by the interface, and an implicit conversion is distinct from an explicit conversion.

@mwadams mwadams added breaking This would be a breaking change if implemented. enhancement New feature or request labels Aug 13, 2024
@mwadams mwadams changed the title Add a switch to allow implicit string Add a switch to allow implicit string conversion Aug 13, 2024
mwadams added a commit that referenced this issue Aug 25, 2024
Removed explicit conversion to string in interface, and its dependencies.
@mwadams
Copy link
Contributor Author

mwadams commented Aug 26, 2024

The proposal is to make the breaking change in V3.1. This would require you to regenerate your types using the V3.1 code generator to make use of V3.1 Corvus.Json.ExtendedTypes.

It still generates the explicit operator on the type as today, so the only impact on downstream consumers would be those who depend on the IJsonString<T> interface directly; these should be minimal.

mwadams added a commit that referenced this issue Aug 26, 2024
- Generate implicit operator string if requested
- Eliminate some unused methods in code generation
- Fix bug: dependent property collection is never adding dependent properties
- Update package versions
@mwadams
Copy link
Contributor Author

mwadams commented Aug 26, 2024

This is now available in 4.0.0-preview.8

@mwadams mwadams closed this as completed Aug 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking This would be a breaking change if implemented. enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant