Skip to content

Commit

Permalink
Fix oas headers
Browse files Browse the repository at this point in the history
  • Loading branch information
furkansenharputlu committed Dec 22, 2023
1 parent 6db89cd commit ac99879
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apidef/oas/oas_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func TestOAS_ExtractTo_DontTouchExistingClassicFields(t *testing.T) {
api.VersionData.Versions = map[string]apidef.VersionInfo{
Main: {
ExtendedPaths: apidef.ExtendedPathsSet{
TransformHeader: []apidef.HeaderInjectionMeta{
PersistGraphQL: []apidef.PersistGraphQLMeta{
{},
},
},
Expand All @@ -124,7 +124,7 @@ func TestOAS_ExtractTo_DontTouchExistingClassicFields(t *testing.T) {
var s OAS
s.ExtractTo(&api)

assert.Len(t, api.VersionData.Versions[Main].ExtendedPaths.TransformHeader, 1)
assert.Len(t, api.VersionData.Versions[Main].ExtendedPaths.PersistGraphQL, 1)
}

func TestOAS_ExtractTo_ResetAPIDefinition(t *testing.T) {
Expand Down
2 changes: 2 additions & 0 deletions apidef/oas/operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,8 @@ func (s *OAS) extractPathsAndOperations(ep *apidef.ExtendedPathsSet) {
ep.AdvanceCacheConfig = nil
ep.Transform = nil
ep.TransformResponse = nil
ep.TransformHeader = nil
ep.TransformResponseHeader = nil
ep.HardTimeouts = nil
ep.Virtual = nil
ep.MethodTransforms = nil
Expand Down

0 comments on commit ac99879

Please sign in to comment.