Open
Conversation
|
Guys, when are you planning to merge this PR? |
wistefan
requested changes
Jan 6, 2026
|
|
||
| private void checkForExplicitFieldOverrides(JsonSchema schema) { | ||
| var schemaNode = schema.getSchemaNode(); | ||
| var propertiesNode = schemaNode.get("definitions"); |
Collaborator
There was a problem hiding this comment.
shouldn't the propertiesNode be under "properties", instead of "definitions"? Please do not use magic constants, make them actual constants
|
|
||
| log.debug("Getting all fields for class: {}", clazz.getName()); | ||
|
|
||
| // Traverse the class hierarchy |
Collaborator
There was a problem hiding this comment.
You should add a test for this. I'm pretty sure that this wont give you the fieldnames used in the json-schema, since the json property names are defined via Jackson-Annotation, rather than the raw-property names.
| existingProperties.addAll(getAllFieldNames(beanDescription.getBeanClass())); | ||
|
|
||
| // Add standard TMForum properties that should never be overridden by schemas | ||
| existingProperties.add("id"); |
Collaborator
There was a problem hiding this comment.
Not every extendable entity has an id or href defined. With this, none such entity could be extended with an id or href.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Greetings @wistefan
I got a ticket because apparently it is possible to change base fields in TMForum using @schemalocation, I dont think this is intended since in the documentation @schemalocation is described for adding additional attributes rather than changing existing ones. Although I might be wrong...
In case it is not intented, here is a PR that tries to solve that problem by checking with beanDescription the fields in the target class as well as the commons
Here is a curl that can trigger this substitution:
Best regards