bharel / bharel/mkdocs-render-swagger-plugin

Pass configuration to SwaggerUIBundle

Open
#17 3 comments 3 reactions 0 assignees View on GitHub
enhancement
Dominant language
Python
Stars
78
Forks
15
PR merge metrics
No merged PRs in 30d

Description

It would be nice if it was possible to configure Swagger-UI via a parameter,

For example if you want control which sections are expanded.

```javascript
SwaggerUIBundle({
...
"docExpansion":"none"
});
```

I'm not sure how to do this nicely, but maybe a configuration in `mkdocs.yaml` and in the `extra` section, or maybe it's easier to supply it every time you use the plugin?

```
!!swagger FILENAME "docExpansion":"none","someOtherSetting":"value"!!
```

An easier option would be to use `configUrl`, I believe that SwaggerUIBundle will load from that URL.
```
!!swagger FILENAME SWAGGER_CONFIG!!

!!swagger URL SWAGGER_CONFIG_URL!!
```

Thank you for creating the plugin!

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the plugin's SwaggerUIBundle invocation and the MkDocs configuration, including mkdocs.yaml and its extra section. Compare the proposed per-use settings with configUrl, then verify that a setting such as docExpansion reaches Swagger UI through the chosen configuration path.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, openapi, python
Domain
documentation, tooling
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.