[docs] Fix HTTP Service Discovery API response format #4005
+164
−140
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.
What's changed?
The API response format example in the HTTP Service Discovery document does not match the actual code implementation, resulting in deserialization errors when users implement the API according to the document.
All error examples in the following 4 document files have been fixed
Incorrect format in the document:
{ "targets": [ "192.168.1.101:8080", "192.168.1.102:8080" ] }log:
Code implementation in HttpSdCollectImpl.java:
Entity definition in ServiceDiscoveryResponseEntity.java:
The expected format of the actual code:
[ { "target": [ "192.168.1.101:8080", "192.168.1.102:8080" ] } ]Checklist
Add or update API