mirror of
https://github.com/LukeHagar/libopenapi.git
synced 2025-12-06 04:20:11 +00:00
Refactored version directory names
3.0 and 2.0 do not work, there are multiple versions and anything with a period in it sucks from my point of view, v2 and v3 feel much better from a DX perspective.
This commit is contained in:
@@ -6,8 +6,8 @@ package v2
|
||||
import (
|
||||
highbase "github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
lowmodel "github.com/pb33f/libopenapi/datamodel/low"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
lowbase "github.com/pb33f/libopenapi/datamodel/low/base"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type Definitions struct {
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package v2
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
|
||||
type Examples struct {
|
||||
Values map[string]any
|
||||
@@ -5,7 +5,7 @@ package v2
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type Header struct {
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package v2
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
|
||||
type Items struct {
|
||||
Type string
|
||||
@@ -6,7 +6,7 @@ package v2
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
"github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type Operation struct {
|
||||
@@ -6,7 +6,7 @@ package v2
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
"github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type Parameter struct {
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package v2
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
|
||||
type ParameterDefinitions struct {
|
||||
Definitions map[string]*Parameter
|
||||
@@ -5,7 +5,7 @@ package v2
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type PathItem struct {
|
||||
@@ -5,7 +5,7 @@ package v2
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type Paths struct {
|
||||
@@ -6,7 +6,7 @@ package v2
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
"github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type Response struct {
|
||||
@@ -5,7 +5,7 @@ package v2
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type Responses struct {
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package v2
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
|
||||
type ResponsesDefinitions struct {
|
||||
Definitions map[string]*Response
|
||||
@@ -4,7 +4,7 @@
|
||||
package v2
|
||||
|
||||
import (
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type Scopes struct {
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package v2
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
|
||||
type SecurityDefinitions struct {
|
||||
Definitions map[string]*SecurityScheme
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package v2
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
|
||||
type SecurityRequirement struct {
|
||||
Requirements map[string][]string
|
||||
@@ -5,7 +5,7 @@ package v2
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type SecurityScheme struct {
|
||||
@@ -6,7 +6,7 @@ package v2
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
"github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
)
|
||||
|
||||
type Swagger struct {
|
||||
@@ -5,7 +5,7 @@ package v2
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel"
|
||||
v2 "github.com/pb33f/libopenapi/datamodel/low/2.0"
|
||||
v2 "github.com/pb33f/libopenapi/datamodel/low/v2"
|
||||
"github.com/stretchr/testify/assert"
|
||||
|
||||
"io/ioutil"
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package v3
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
|
||||
type Callback struct {
|
||||
Expression map[string]*PathItem
|
||||
@@ -7,8 +7,8 @@ import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
highbase "github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
lowmodel "github.com/pb33f/libopenapi/datamodel/low"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
"github.com/pb33f/libopenapi/datamodel/low/base"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -6,7 +6,7 @@ package v3
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
"github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
"github.com/pb33f/libopenapi/index"
|
||||
)
|
||||
|
||||
@@ -6,7 +6,7 @@ package v3
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/pb33f/libopenapi/datamodel"
|
||||
lowv3 "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
lowv3 "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"io/ioutil"
|
||||
"testing"
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
lowmodel "github.com/pb33f/libopenapi/datamodel/low"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type Encoding struct {
|
||||
@@ -6,8 +6,8 @@ package v3
|
||||
import (
|
||||
highbase "github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
lowmodel "github.com/pb33f/libopenapi/datamodel/low"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
"github.com/pb33f/libopenapi/datamodel/low/base"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type Header struct {
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type Link struct {
|
||||
@@ -7,7 +7,7 @@ import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
"github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
lowmodel "github.com/pb33f/libopenapi/datamodel/low"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
"sync"
|
||||
)
|
||||
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type OAuthFlow struct {
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type OAuthFlows struct {
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/low"
|
||||
v3 "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
v3 "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
"github.com/pb33f/libopenapi/index"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gopkg.in/yaml.v3"
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type Operation struct {
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/low"
|
||||
v3 "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
v3 "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
"github.com/pb33f/libopenapi/index"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gopkg.in/yaml.v3"
|
||||
@@ -6,7 +6,7 @@ package v3
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
"github.com/pb33f/libopenapi/datamodel/high/base"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type Parameter struct {
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/low"
|
||||
v3 "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
v3 "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
"github.com/pb33f/libopenapi/index"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gopkg.in/yaml.v3"
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type Paths struct {
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type RequestBody struct {
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type Response struct {
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/low"
|
||||
v3 "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
v3 "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
"github.com/pb33f/libopenapi/index"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gopkg.in/yaml.v3"
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type Responses struct {
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/low"
|
||||
v3 "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
v3 "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
"github.com/pb33f/libopenapi/index"
|
||||
"github.com/stretchr/testify/assert"
|
||||
"gopkg.in/yaml.v3"
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package v3
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
|
||||
type SecurityRequirement struct {
|
||||
ValueRequirements []map[string][]string
|
||||
@@ -5,7 +5,7 @@ package v3
|
||||
|
||||
import (
|
||||
"github.com/pb33f/libopenapi/datamodel/high"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
)
|
||||
|
||||
type SecurityScheme struct {
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package v3
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
|
||||
type Server struct {
|
||||
URL string
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
package v3
|
||||
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/3.0"
|
||||
import low "github.com/pb33f/libopenapi/datamodel/low/v3"
|
||||
|
||||
type ServerVariable struct {
|
||||
Enum []string
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user