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

Problem JSON to M5 and register problem+json as an additional type for JSON Codec #251

Merged
merged 8 commits into from
May 25, 2023

Conversation

sdelamo
Copy link
Contributor

@sdelamo sdelamo commented May 19, 2023

This PR updates to Micronaut Core M5 but also provides a PropertySourceLoader so that the user does not have to explicitly register problem+json as an additional type for JSON Codec.

@sdelamo sdelamo added the type: dependency-upgrade Upgrade a dependency label May 19, 2023
@sdelamo sdelamo changed the title Micronaut Framework 4.0.0-M4 Problem JSON to M5 May 24, 2023
@sdelamo sdelamo requested a review from graemerocher May 25, 2023 09:16
@sdelamo sdelamo changed the title Problem JSON to M5 Problem JSON to M5 and register problem+json as an additional type for JSON Codec May 25, 2023
@sdelamo sdelamo marked this pull request as ready for review May 25, 2023 09:17
@sdelamo sdelamo self-assigned this May 25, 2023

@Override
public Map<String, Object> read(String name, InputStream input) throws IOException {
return propertySource.asMap();
Copy link
Contributor Author

@sdelamo sdelamo May 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how this method be overriden in this context

Copy link
Contributor

@graemerocher graemerocher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this should be done with a @ContextConfigurer instead

@sdelamo
Copy link
Contributor Author

sdelamo commented May 25, 2023

this should be done with a @ContextConfigurer instead

@graemerocher it does not to work with a @ContextConfigurer.

@sdelamo sdelamo requested a review from graemerocher May 25, 2023 12:55
@sdelamo
Copy link
Contributor Author

sdelamo commented May 25, 2023

@graemerocher I have documented as a breaking change that the user needs to specify the additional type for the JSON codec via configuration.

@sonarcloud
Copy link

sonarcloud bot commented May 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@graemerocher
Copy link
Contributor

the other option is to define a MessageBodyWriter for problem/json

@sdelamo sdelamo merged commit 63c6e22 into master May 25, 2023
@sdelamo sdelamo deleted the mn4 branch May 25, 2023 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: dependency-upgrade Upgrade a dependency
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants