mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 04:20:11 +00:00
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.
This commit is contained in:
28
document.go
Normal file
28
document.go
Normal file
@@ -0,0 +1,28 @@
|
||||
// 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
|
||||
}
|
||||
Reference in New Issue
Block a user