Skip to content

chore(docs): establish MkDocs-based bilingual documentation site - #303

Merged
luk384090-cloud merged 2 commits into
codex/java-sdk-v3-squashedfrom
dev/v3-docs
Nov 30, 2026
Merged

luk384090-cloud merged 2 commits into
codex/java-sdk-v3-squashedfrom
dev/v3-docs

Conversation

@luk384090-cloud

Copy link
Copy Markdown
Collaborator
  • Add comprehensive mkdocs.yml configuration with Material theme and i18n support
  • Introduce docs/hooks.py to inject SDK version from pom.xml into site config
  • Add docs/main.py macros module for dynamically rendering SDK version and release notes
  • Create detailed docs/README.md guide on documentation maintenance and build process
  • Add docs/serve.sh script for local preview with Javadoc and MkDocs serve integration
  • Include logo.svg asset for site branding consistency
  • Update .gitignore to exclude site build output and docs/api Javadoc bundle
  • Add requirements-doc.txt for Python dependencies required by MkDocs and plugins
  • Configure Maven pom.xml for enhanced Javadoc generation with delombok and JDK 17 support
  • Add GitHub Actions workflow .github/workflows/docs.yml to build, validate and deploy docs
  • Update README.md and README_zh.md with links to the new bilingual documentation website

luk384090-cloud and others added 2 commits November 30, 2026 13:19
- Add comprehensive mkdocs.yml configuration with Material theme and i18n support
- Introduce docs/hooks.py to inject SDK version from pom.xml into site config
- Add docs/main.py macros module for dynamically rendering SDK version and release notes
- Create detailed docs/README.md guide on documentation maintenance and build process
- Add docs/serve.sh script for local preview with Javadoc and MkDocs serve integration
- Include logo.svg asset for site branding consistency
- Update .gitignore to exclude site build output and docs/api Javadoc bundle
- Add requirements-doc.txt for Python dependencies required by MkDocs and plugins
- Configure Maven pom.xml for enhanced Javadoc generation with delombok and JDK 17 support
- Add GitHub Actions workflow .github/workflows/docs.yml to build, validate and deploy docs
- Update README.md and README_zh.md with links to the new bilingual documentation website
maven-javadoc-plugin 3.11.2 writes javadoc:javadoc output to
target/reports/apidocs, breaking the stylesheet-bridge and /api/ attach
steps in docs.yml and serve.sh; pin outputDirectory so the bundle lands
in target/apidocs. Drop failOnError=false so Javadoc errors fail the
build instead of shipping a partial API reference.

Also: trigger docs builds on examples/** (snippets embed example
sources), skip the Pages artifact upload on PR builds, align the
Material pin with the 9.7.7 overrides, fall back to "unknown" when the
pom version cannot be parsed, and drop exclude globs for directories
that do not exist in this repo.
@luk384090-cloud
luk384090-cloud merged commit a6ad129 into codex/java-sdk-v3-squashed Nov 30, 2026
luk384090-cloud added a commit that referenced this pull request Nov 30, 2026
* feat: introduce DashScope Java SDK 3.0

Consolidate the v3 implementation into one commit.
Exclude the md directory and preserve the existing release workflow and NOTICE.

* fix(jobs): preserve task context on wait timeout

* test(proxy): avoid fixed port collisions

* feat(examples): add async chat, encrypted chat, local tokenization, deployments examples

- Add ChatCompletionsCreateAsync with CompletableFuture and Flowable support
- Implement ChatCompletionsCreateEncrypted example with request-level encryption
- Introduce TokenizationLocalCount for offline BPE tokenization without network calls
- Add DeploymentsManage example demonstrating listing, getting, and lifecycle management
- Update examples dry-run test to include new examples and inject synthetic tokenizer vocab
- Enhance README files with updated resource tree, migration notes, and API doc links

fix(legacy_2x): catch and log NoApiKeyException and InputRequiredException in generation calls

- Wrap legacy generation.call with try-catch for ApiException, NoApiKeyException, InputRequiredException
- Add error message output to standard error on exceptions

test(ci): pre-download Qwen tokenizer vocab to stabilize tokenization tests

- Add GitHub Actions step to download and verify qwen.tiktoken with retries before test run
- Cache tokenizer vocab to avoid flaky ModelScope runtime fetch failures

fix(ws): enhance websocket client logging with requestId context

- Append requestId to debug, info, warn, and error log statements in OkHttpWebSocketClient
- Include requestId where missing in cancellation, retry, and error handling logs

fix(finetunes): improve polling timeout logic to handle budget-bounded timeouts accurately

- Calculate remaining timeout budget correctly, compare with configured timeout
- Classify timeout as waitTimeout when budget is exhausted based on applied timeout duration

test(dry-run): add encryption support and deployment mocks to DryRunDispatcher

- Implement J7 encryption channel mock with RSA keypair and AES wrapping/unwrapping
- Add deployments list and get endpoints with canned responses
- Support encrypted chat responses with AES encrypt/decrypt roundtrip validation

style(examples): update legacy examples count and README formatting

- Change legacy_2x sample count from 64 to 66 in README and comments
- Improve formatting and clarify example code boundaries and usage instructions

test(dry-run): inject synthetic Qwen tokenizer vocab to support offline tokenization test

- Provide a minimal base64-encoded token vocab covering required token ids
- Inject vocab file as DASHSCOPE_QWEN_VOCAB environment variable for local tokenization example

* style(examples): reformat code and adjust comment wrapping

- Remove unnecessary line breaks in RSA decryption call
- Reformat Maven project path comment to a single line
- Wrap long comment lines within 100 characters
- Simplify string builder append chain in syntheticVocab method
- Wrap JavaDoc comment lines in FineTunesService for better readability

* docs: translate comments and example output to English

Keep semantic Chinese prompts and fixtures unchanged, and add the English examples guide alongside the existing Chinese documentation.

* docs(examples): split English and Chinese guides

Keep the English guide in README.md and move the Chinese guide to README_zh.md with cross-language links.

* refactor(agentstudio): decouple from legacy_2x with self-contained transport

Copy the pruned Gson/OkHttp base classes and GeneralApi transport into
AgentStudio-owned packages (api/base/common/exception/protocol/utils) so the
frozen legacy_2x subtree can be removed independently in 4.0. Repoint all 80
production files and 9 test files, remove the mutable legacy Constants.apiKey
coupling, and apply the agentstudio3 SDK header policy to ordinary HTTP, file
upload/download, and authenticated session SSE.

Add the reverse dependency-boundary gate: no non-legacy production source may
reference legacy_2x. The public error surface stays on the 3.0 errors family
via AgentStudioErrors; copied 2.x exceptions remain internal plumbing.

* fix(streaming): retain original response headers in streaming frames

- Snapshot and reuse streaming HTTP headers for all frames/chunks to preserve request IDs and tracing info
- Replace previous empty map usage with actual headers in envelope filling methods
- Modify SseStream to prefer raw network headers, preserving Content-Encoding and Content-Length
- Adjust HttpTransport to merge network headers with application headers for accurate response header representation
- Update ResponseStream to use streamHeadersMap directly for error and data frames
- Remove redundant header copying helpers, centralizing header map extraction
- Add tests verifying streaming frames and chunks carry original response headers including Content-Encoding on gzip
- Fix gzip responses to retain Content-Encoding header in synchronous and asynchronous clients

* docs(readme): update README with comprehensive 3.0 SDK usage and migration guide

- Add badges for Maven Central, build status, and license
- Provide detailed introduction and quick start for DashScope Java SDK 3.0 generation
- Document synchronous, streaming (SSE), and asynchronous client usage with code examples
- Explain configuration options with environment variable and builder method mappings
- Enumerate available API capabilities with links to minimal runnable examples
- Describe new error handling model with unchecked exceptions and legacy error style option
- Include comprehensive migration guide from 2.x to 3.0 with class mappings and behavior changes
- Retain deprecated 2.x API documentation as expandable appendix section
- Add instructions for building from source and running examples with Maven
- Clarify client lifecycle, API key resolution, telemetry opt-out, and HTTP logging settings

* feat(agentstudio): add AgentStudio memory stores end-to-end example

- Add `AgentStudioMemoryStores` example demonstrating full memory-store lifecycle
- Show create store, seed memory, list memories with content, and update memory with optimistic lock
- Implement list memory versions, redact a version, list stores, and delete store operations
- Include example usage instructions and environment variable requirements
- Update dry run dispatcher to support AgentStudio memory stores API mocks
- Add example registration to offline dry-run test suite
- Update documentation to mention AgentStudio memory stores example and features
- Fix HTTP status code documentation in README to reflect correct 500 code for InternalServerException

* chore(docs): establish MkDocs-based bilingual documentation site (#303)

* chore(docs): establish MkDocs-based bilingual documentation site

- Add comprehensive mkdocs.yml configuration with Material theme and i18n support
- Introduce docs/hooks.py to inject SDK version from pom.xml into site config
- Add docs/main.py macros module for dynamically rendering SDK version and release notes
- Create detailed docs/README.md guide on documentation maintenance and build process
- Add docs/serve.sh script for local preview with Javadoc and MkDocs serve integration
- Include logo.svg asset for site branding consistency
- Update .gitignore to exclude site build output and docs/api Javadoc bundle
- Add requirements-doc.txt for Python dependencies required by MkDocs and plugins
- Configure Maven pom.xml for enhanced Javadoc generation with delombok and JDK 17 support
- Add GitHub Actions workflow .github/workflows/docs.yml to build, validate and deploy docs
- Update README.md and README_zh.md with links to the new bilingual documentation website

* fix(docs): pin Javadoc output to target/apidocs and harden docs CI

maven-javadoc-plugin 3.11.2 writes javadoc:javadoc output to
target/reports/apidocs, breaking the stylesheet-bridge and /api/ attach
steps in docs.yml and serve.sh; pin outputDirectory so the bundle lands
in target/apidocs. Drop failOnError=false so Javadoc errors fail the
build instead of shipping a partial API reference.

Also: trigger docs builds on examples/** (snippets embed example
sources), skip the Pages artifact upload on PR builds, align the
Material pin with the 9.7.7 overrides, fall back to "unknown" when the
pom version cannot be parsed, and drop exclude globs for directories
that do not exist in this repo.

---------

Co-authored-by: luk384090-cloud <lu384090@gmail.com>
Co-authored-by: zhansheng.lzs <zhansheng.lzs@alibaba-inc.com>

* docs(audio): mark audio module as under development with interface warnings

- Add "(under development; interfaces may change)" note for client.audio() in features documentation (English and Chinese)
- Insert warning blocks in audio guide (English and Chinese) to notify users about ongoing development
- Clarify that API may change in future releases consistent with Javadoc in com.alibaba.dashscope.audio package
- Specify that client.tingwu() is not affected by these changes
- Advise users to watch for API changes when upgrading the SDK

* fix(oss): improve content-type resolution for file uploads

- Refactor contentTypeOf method to separate probe result resolution into resolveContentType
- Treat generic application/octet-stream probe result as unknown and fallback to extension mapping
- Ensure .wav files upload with audio/wav instead of application/octet-stream to avoid service rejection
- Add unit tests for resolveContentType covering various probe results and extensions
- Add integration test verifying .wav files upload with correct content-type in multimodal embeddings API

* fix(oss): normalize media types to canonical values for OSS uploads

- Prioritize canonical media extension types over OS MIME probes for consistency
- Replace generic binary types for known media extensions with standard ones
- Ensure multimodal services receive wire-compatible content types on all platforms
- Add fallback to probe result only for unknown extensions
- Add tests verifying normalization of host-dependent probe variants to canonical types
- Confirm specific non-generic probe results pass through untouched for unknown extensions

---------

Co-authored-by: lzsweb <10054716+lzsweb@users.noreply.github.com>
Co-authored-by: zhansheng.lzs <zhansheng.lzs@alibaba-inc.com>
Co-authored-by: luk384090-cloud <lu384090@gmail.com>
Co-authored-by: kevin Lu <luk384090@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant