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:
Dave Shanley
2022-09-09 07:08:52 -04:00
parent 6d21790a98
commit 2c4177e97a
37 changed files with 645 additions and 103 deletions

28
document.go Normal file
View 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
}