File: swagger_builder.go

package info (click to toggle)
golang-github-emicklei-go-restful-swagger12 1.0.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 196 kB
  • sloc: makefile: 2
file content (21 lines) | stat: -rw-r--r-- 554 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package swagger

type SwaggerBuilder struct {
	SwaggerService
}

func NewSwaggerBuilder(config Config) *SwaggerBuilder {
	return &SwaggerBuilder{*newSwaggerService(config)}
}

func (sb SwaggerBuilder) ProduceListing() ResourceListing {
	return sb.SwaggerService.produceListing()
}

func (sb SwaggerBuilder) ProduceAllDeclarations() map[string]ApiDeclaration {
	return sb.SwaggerService.produceAllDeclarations()
}

func (sb SwaggerBuilder) ProduceDeclarations(route string) (*ApiDeclaration, bool) {
	return sb.SwaggerService.produceDeclarations(route)
}