-
Notifications
You must be signed in to change notification settings - Fork 381
[http-client-java] Document protocol response headers #11610
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
Open
Weidong Xu (weidongxu-microsoft)
wants to merge
7
commits into
microsoft:main
Choose a base branch
from
weidongxu-microsoft:response-header-javadoc
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e854487
fix(http-client-java): document protocol response headers
weidongxu-microsoft 5a6d5db
test(http-client-java): regenerate response header clients
weidongxu-microsoft 376e4cd
refactor(http-client-java): build response header metadata
weidongxu-microsoft 0080c60
fix(http-client-java): omit multi-response header docs
weidongxu-microsoft 1820023
fix(http-client-java): document data-plane enum headers as strings
weidongxu-microsoft 362e623
fix(http-client-java): map clientcore response headers
weidongxu-microsoft 153a16c
chore(http-client-java): regenerate response header docs
weidongxu-microsoft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
7 changes: 7 additions & 0 deletions
7
.chronus/changes/http-client-java-response-header-javadocs-2026-08-10.md
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| changeKind: fix | ||
| packages: | ||
| - "@typespec/http-client-java" | ||
| --- | ||
|
|
||
| Document response headers in protocol API Javadocs. |
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
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
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
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
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
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
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
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
100 changes: 100 additions & 0 deletions
100
...soft/typespec/http/client/generator/core/model/clientmodel/ProxyMethodResponseHeader.java
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,100 @@ | ||
| // Copyright (c) Microsoft Corporation. All rights reserved. | ||
| // Licensed under the MIT License. | ||
|
|
||
| package com.microsoft.typespec.http.client.generator.core.model.clientmodel; | ||
|
|
||
| /** | ||
| * A response header returned by a {@link ProxyMethod}. | ||
| */ | ||
| public final class ProxyMethodResponseHeader { | ||
| private final String serializedName; | ||
|
|
||
| // Javadoc only needs the public client type. Add raw and wire types if response generation needs them in future. | ||
| private final IType clientType; | ||
|
|
||
| private final String description; | ||
|
|
||
| private ProxyMethodResponseHeader(String serializedName, IType clientType, String description) { | ||
| this.serializedName = serializedName; | ||
| this.clientType = clientType; | ||
| this.description = description; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the serialized header name. | ||
| * | ||
| * @return the serialized header name. | ||
| */ | ||
| public String getSerializedName() { | ||
| return serializedName; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the client type of the header value. | ||
| * | ||
| * @return the client type of the header value. | ||
| */ | ||
| public IType getClientType() { | ||
| return clientType; | ||
| } | ||
|
|
||
| /** | ||
| * Gets the header description. | ||
| * | ||
| * @return the header description. | ||
| */ | ||
| public String getDescription() { | ||
| return description; | ||
| } | ||
|
|
||
| /** | ||
| * Builder for {@link ProxyMethodResponseHeader}. | ||
| */ | ||
| public static final class Builder { | ||
| private String serializedName; | ||
| private IType clientType; | ||
| private String description; | ||
|
|
||
| /** | ||
| * Sets the serialized header name. | ||
| * | ||
| * @param serializedName the serialized header name. | ||
| * @return the Builder itself. | ||
| */ | ||
| public Builder serializedName(String serializedName) { | ||
| this.serializedName = serializedName; | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Sets the client type of the header value. | ||
| * | ||
| * @param clientType the client type of the header value. | ||
| * @return the Builder itself. | ||
| */ | ||
| public Builder clientType(IType clientType) { | ||
| this.clientType = clientType; | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Sets the header description. | ||
| * | ||
| * @param description the header description. | ||
| * @return the Builder itself. | ||
| */ | ||
| public Builder description(String description) { | ||
| this.description = description; | ||
| return this; | ||
| } | ||
|
|
||
| /** | ||
| * Builds the response header. | ||
| * | ||
| * @return the response header. | ||
| */ | ||
| public ProxyMethodResponseHeader build() { | ||
| return new ProxyMethodResponseHeader(serializedName, clientType, description); | ||
| } | ||
| } | ||
| } |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.