swagger-api / swagger-api/swagger-ui

Set server programmatically

Open
#5,664 0 comments 4 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
29k
Forks
9.3k
Avg merge
2d 23h
Merged PRs (30d)
25

Description

Q&A (please complete the following information)
  • OS: any
  • Browser: any
  • Version: any
  • Method of installation: dist
  • Swagger-UI version: 3.24.0
  • Swagger/OpenAPI version: OpenAPI 3.0

Is there how to set the server programmatically so how can i do for authorization (preauthorizeApiKey)?
I'm using jquery to enter the value (.val method), but when I call 'try out' it doesn't get the updated value in select servers.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Swagger UI dist entry point and the documented preauthorizeApiKey, server selector, and Try it out flow described in the report. Reproduce the jQuery .val update, then define completion as programmatic server selection and authorization values being reflected when Try it out sends the request.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery, openapi
Domain
api, frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.