mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-09 12:37:49 +00:00
Adding more docs to v2 swagger model.
once and done job, not much fun to be honest ;)
This commit is contained in:
@@ -5,6 +5,10 @@ package v3
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
|
||||
// ServerVariable represents a high-level OpenAPI 3+ ServerVariable object, that is backed by a low-level one.
|
||||
//
|
||||
// ServerVariable is an object representing a Server Variable for server URL template substitution.
|
||||
// - https://spec.openapis.org/oas/v3.1.0#server-variable-object
|
||||
type ServerVariable struct {
|
||||
Enum []string
|
||||
Default string
|
||||
@@ -12,6 +16,7 @@ type ServerVariable struct {
|
||||
low *low.ServerVariable
|
||||
}
|
||||
|
||||
// NewServerVariable will return a new high-level instance of a ServerVariable from a low-level one.
|
||||
func NewServerVariable(variable *low.ServerVariable) *ServerVariable {
|
||||
v := new(ServerVariable)
|
||||
v.low = variable
|
||||
@@ -27,6 +32,7 @@ func NewServerVariable(variable *low.ServerVariable) *ServerVariable {
|
||||
return v
|
||||
}
|
||||
|
||||
// GoLow returns the low-level ServerVariable used to to create the high\-level one.
|
||||
func (s *ServerVariable) GoLow() *low.ServerVariable {
|
||||
return s.low
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user