Skip to content

feat: support custom doc scripts - #1000

Open
DevDengChao wants to merge 2 commits into
xiaoymin:devfrom
DevDengChao:codex/custom-script-extension
Open

feat: support custom doc scripts#1000
DevDengChao wants to merge 2 commits into
xiaoymin:devfrom
DevDengChao:codex/custom-script-extension

Conversation

@DevDengChao

Copy link
Copy Markdown

Summary

  • Add backend customJavaScriptUrls setting support for Knife4j doc.html extension scripts.
  • Load configured scripts in Vue2/Vue3 doc initialization and expose window.Knife4j.registerRequestInterceptor for debug request customization.
  • Apply request interceptors to url-form, form, and raw debug requests so injected headers are sent and reflected in curl output.
  • Document usage, security notes, and the difference from AfterScript.
  • Add Spring configuration binding tests for OpenAPI2 and OpenAPI3 Jakarta starters.

Test Plan

  • node tests/custom-script-extension.test.cjs
  • mvn -pl knife4j-openapi2-spring-boot-starter,knife4j-openapi3-jakarta-spring-boot-starter -am -Dknife4j-skipTests=false "-Dspotless.apply.skip=true" test
  • mvn -pl knife4j-core,knife4j-openapi2-spring-boot-starter,knife4j-openapi3-spring-boot-starter,knife4j-openapi3-jakarta-spring-boot-starter -am -DskipTests "-Dspotless.apply.skip=true" compile

DevDengChao and others added 2 commits May 20, 2026 12:44
Co-authored-by: Codex <codex@openai.com>
Co-authored-by: OpenAI <noreply@openai.com>
@netlify

netlify Bot commented May 20, 2026

Copy link
Copy Markdown

Deploy Preview for knife4j ready!

Name Link
🔨 Latest commit 453c534
🔍 Latest deploy log https://app.netlify.com/projects/knife4j/deploys/6a0d5ff67a20ec0008f85895
😎 Deploy Preview https://deploy-preview-1000--knife4j.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

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