Skip to content

Commit

Permalink
Add request changes
Browse files Browse the repository at this point in the history
  • Loading branch information
furkansenharputlu committed Oct 30, 2023
1 parent 610e19e commit 576fa89
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion apidef/oas/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ type Versioning struct {
Versions []VersionToID `bson:"versions" json:"versions"` // required
// StripVersioningData is a boolean flag, if set to `true`, the API responses will be stripped of versioning data.
StripVersioningData bool `bson:"stripVersioningData,omitempty" json:"stripVersioningData,omitempty"`
// FallbackToDefault controls whether the default API is invoked when the requested version can't be found.
// FallbackToDefault controls the behaviour of Tyk when a versioned API is called with a nonexistent version name.
// If set to `true` then the default API version will be invoked; if set to `false` Tyk will return an HTTP 404
// `This API version does not seem to exist` error in this scenario.
FallbackToDefault bool `bson:"fallbackToDefault,omitempty" json:"fallbackToDefault,omitempty"`
}

Expand Down
3 changes: 2 additions & 1 deletion apidef/oas/schema/x-tyk-gateway.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ Versions contains a list of versions that map to individual API IDs.
StripVersioningData is a boolean flag, if set to `true`, the API responses will be stripped of versioning data.

**Field: `fallbackToDefault` (`boolean`)**
FallbackToDefault controls whether the default API is invoked when the requested version can't be found.
FallbackToDefault controls the behaviour of Tyk when a versioned API is called with a nonexistent version name.
If set to `true` then the default API version will be invoked; if set to `false` Tyk will return an HTTP 404 "This API version does not seem to exist" error in this scenario.


### **VersionToID**
Expand Down

0 comments on commit 576fa89

Please sign in to comment.