Categorygithub.com/kinwyb/go-restful-openapi
modulepackage
1.3.1
Repository: https://github.com/kinwyb/go-restful-openapi.git
Documentation: pkg.go.dev

# README

go-restful-openapi

Build Status GoDoc

openapi extension to the go-restful package, targeting version 2.0

The following Go field tags are translated to OpenAPI equivalents

  • description
  • minimum
  • maximum
  • optional ( if set to "true" then it is not listed in required)
  • unique
  • modelDescription
  • type (overrides the Go type String())
  • enum
  • readOnly

See TestThatExtraTagsAreReadIntoModel for examples.

dependencies

© 2017, ernestmicklei.com. MIT License. Contributions welcome.

# Packages

No description provided by the author

# Functions

BuildSwagger returns a Swagger object for all services' API endpoints.
NewOpenAPIService returns a new WebService that provides the API documentation of all services conform the OpenAPI documentation specifcation.

# Constants

KeyOpenAPITags is a Metadata key for a restful Route.

# Structs

Config holds service api metadata.

# Interfaces

Documented is.

# Type aliases

MapModelTypeNameFunc can be used to return the desired typeName for a given type.
MapSchemaFormatFunc can be used to modify typeName at definition time.
PostBuildSwaggerObjectFunc can be used to change the creates Swagger Object before serving it.