Files
libopenapi/document.go
Dave Shanley 2c4177e97a Swagger 2.0 high level model going in now
Shifting a few high level models around that are also shared. now it's just a churn game to flesh the high level model and test it up.
2022-09-09 07:08:52 -04:00

29 lines
606 B
Go

// Copyright 2022 Princess B33f Heavy Industries / Dave Shanley
// SPDX-License-Identifier: MIT
package main
import (
"github.com/pb33f/libopenapi/datamodel"
v2high "github.com/pb33f/libopenapi/datamodel/high/2.0"
v3high "github.com/pb33f/libopenapi/datamodel/high/3.0"
)
type Document[T any] struct {
version string
info *datamodel.SpecInfo
Model T
}
func (d *Document[T]) GetVersion() string {
return d.version
}
func (d *Document[T]) BuildV2Document() (*v2high.Swagger, error) {
return nil, nil
}
func (d *Document[T]) BuildV3Document() (*v3high.Document, error) {
return nil, nil
}