Socket
Book a DemoInstallSign in
Socket

github.com/stephanhcb/go-autumn-web-swagger-ui

Package Overview
Dependencies
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/stephanhcb/go-autumn-web-swagger-ui

Source
Go
Version
v0.2.3
Version published
Created
Source

go-autumn-web-swagger-ui

About go-autumn

A collection of libraries for enterprise microservices in golang that

  • is heavily inspired by Spring Boot / Spring Cloud
  • is very opinionated
  • names modules by what they do
  • unlike Spring Boot avoids certain types of auto-magical behaviour
  • is not a library monolith, that is every part only depends on the api parts of the other components (if at all), and the api parts do not add any dependencies.

Fall is my favourite season, so I'm calling it go-autumn.

IMPORTANT Third Party Licensing Information

The static files included under third_party/swagger_ui are

                      Copyright 2020-2021 SmartBear Software Inc.

They are licensed under

                             Apache License
                       Version 2.0, January 2004
                    http://www.apache.org/licenses/

See here for the full licensing information. This LICENSE file is also included with the static distribution provided by this module. If you use it as instructed, it will be statically served under /swagger-ui/LICENSE

Original download location:

https://github.com/swagger-api/swagger-ui

About go-autumn-web-swagger-ui

A library that provides a static go source file for the swagger-api/swagger-ui distributable ui module.

How to regenerate

  • update swagger ui files
  • do not forget to retain LICENSE and README.txt
  • delete assets_vfsdata.go
  • rename the package to main in main.go
  • run main.go
  • change package back to auwebswaggerui in both main.go and generated file
  • capitalize var assets to Assets so it becomes exported

How to use

Simply import the module using go.mod.

The main.go file is really just here to re-generate the static source code, if swagger-ui has been updated.

auwebswaggerui.Assets is an instance of http.FileSystem, so you can do stuff like

  http.Handle("/swagger-ui/", http.FileServer(auwebswaggerui.Assets))

FAQs

Package last updated on 20 Mar 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts