Skip to content

Commit

Permalink
[TT-9528] Remove OldApiDefinition (#5365)
Browse files Browse the repository at this point in the history
`OldApiDefinition` is specific to dashboard and MDCB, it is not related
to the gw because it has database related functions.
  • Loading branch information
furkansenharputlu authored Jul 26, 2023
1 parent b7c87a5 commit 1854228
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions apidef/oas/old_oas.go
Original file line number Diff line number Diff line change
@@ -1,22 +1,15 @@
package oas

import (
openapifork "github.com/TykTechnologies/kin-openapi/openapi3"
"github.com/TykTechnologies/tyk/apidef"

"github.com/getkin/kin-openapi/openapi3"

openapifork "github.com/TykTechnologies/kin-openapi/openapi3"
)

type OldOAS struct {
openapifork.T
}

// OldApiDefinition is used to query APIs with old OAS structure.
type OldApiDefinition struct {
apidef.APIDefinition `bson:"api_definition,inline" json:"api_definition,inline"`
OAS *OldOAS `bson:"oas,omitempty" json:"oas,omitempty"`
}

// ConvertToNewerOAS converts a deprecated OldOAS object to the newer OAS representation.
func (o *OldOAS) ConvertToNewerOAS() (*OAS, error) {
outBytes, err := o.MarshalJSON()
Expand Down

0 comments on commit 1854228

Please sign in to comment.