Skip to content
This repository has been archived by the owner on Mar 15, 2024. It is now read-only.

OpenAPI extension in Go for the go-restful package

License

Notifications You must be signed in to change notification settings

avenuesec/go-restful-openapi

 
 

Repository files navigation

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

Go modules

Versions v1 of this package require Go module version v2 of the go-restful package. To use version v3 of the go-restful package, you need to import v2 of this package, such as:

import (
    restfulspec "github.com/emicklei/go-restful-openapi/v2"
    restful "github.com/emicklei/go-restful/v3"
)

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

About

OpenAPI extension in Go for the go-restful package

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Go 99.3%
  • Makefile 0.7%