Add custom scripts to swagger-ui template#94
Conversation
…er-ui fix: remove body margin spacing from swagger ui
WalkthroughThe changes add a new field Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Server
participant Config
participant HTMLTemplate
User->>Server: Request Page
Server->>Config: Fetch Configuration
Config-->>Server: Send Config (with CustomScript)
Server->>HTMLTemplate: Render Template (with CustomScript if available)
HTMLTemplate-->>Server: Compiled HTML
Server-->>User: Send Compiled HTML
Poem
Tip AI model upgrade
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- config.go (1 hunks)
- index.go (1 hunks)
Additional comments not posted (2)
index.go (1)
19-22: Add support for custom scripts in the HTML template.The inclusion of custom scripts enhances the customization capabilities of the Swagger UI.
config.go (1)
182-185: Add new fieldCustomScriptto theConfigstruct.This new field allows for the inclusion of custom JavaScript scripts in the Swagger UI configuration.
improves workarounds like #76
enables to customize swagger ui further
workaround for swagger-api/swagger-ui#7521
Summary by CodeRabbit