Spring doc API for index should return a structured object instead of JSONObject #7584
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.
API should return a structured object instead of JSONObject
Updated indexer to return an object IndexResponse instead of JSONObject
This was causing a couple issues.
1 - JSONObject is a weird object to be returned from an API when the results are really a String.
2 - There were a couple API's that were returning JSONObject but not the same one. One was net.sf.json.JSONObject and the other was org.json.JSONObject. This was causing a conflict in the SpringDoc API which was causing bugs in the open api specification. The JSONObject schema could change on each application restart.
3 - It was causing issues when trying to use CodeGen as it has issue using JSONObject objects as it conflict with the normal JSONObject.
This fix updates the indexer so that it returns a new IndexResponse object.
Checklist
main
branch, backports managed with labelREADME.md
filespom.xml
dependency management. Update build documentation with intended library use and library tutorials or documentation