Skip to content

Commit

Permalink
Merge pull request #4 from a-kataev/a-kataev/swagger-ui-v4.15.5
Browse files Browse the repository at this point in the history
bump swagger-ui to v4.15.5
  • Loading branch information
a-kataev authored Nov 13, 2022
2 parents 27ce5ed + ee9c0c6 commit 5d3b3d7
Show file tree
Hide file tree
Showing 14 changed files with 84 additions and 11 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Alex Kataev

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
37 changes: 37 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1 +1,38 @@
# swagfs

## Swagger-UI

Update dist files in `files/dist/*`

```bash
./swagger-ui-dist.sh 4.15.5
```

## Example

Use `echo`

```golang
package main

import (
"log"

"github.com/a-kataev/swagfs"
"github.com/labstack/echo/v4"
)

func main() {
e := echo.New()

cfg := &swagfs.Config{}
cfg.AddURL("https://petstore.swagger.io/v2/swagger.json", "petstore")
cfg.SetLayout("StandaloneLayout")

e.StaticFS("/*", swagfs.FS(cfg))

if err := e.Start("127.0.0.1:8080"); err != nil {
log.Fatal(err)
}
}
```
2 changes: 1 addition & 1 deletion files/dist/swagger-ui-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion files/dist/swagger-ui-bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion files/dist/swagger-ui-es-bundle-core.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion files/dist/swagger-ui-es-bundle-core.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion files/dist/swagger-ui-es-bundle.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion files/dist/swagger-ui-es-bundle.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion files/dist/swagger-ui-standalone-preset.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion files/dist/swagger-ui.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion files/dist/swagger-ui.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion files/dist/swagger-ui.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion files/dist/swagger-ui.js.map

Large diffs are not rendered by default.

15 changes: 15 additions & 0 deletions swagger-ui-dist.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/env bash

version=${1:-4.15.5}

set -x

curl -Ls -o swagger-ui.zip "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v${version}.zip"

unzip -o swagger-ui.zip "swagger-ui-${version}/dist/*.*" -d tmp

rm "tmp/swagger-ui-${version}/dist/swagger-initializer.js"

cp -rf "tmp/swagger-ui-${version}/dist" files/

rm -rf tmp swagger-ui.zip

0 comments on commit 5d3b3d7

Please sign in to comment.