Only create WithAutomaticVersioning if versioning is used (#3210)
This option did not respect whether or not versioning was enabled when writing it out during generation. This does mean that there is a breaking change for auth tokens, but as it was a no-op anyways it's easy to fix and not something I want to /v2 about.
This commit is contained in:
1 parent
603c3c8c9c
commit
869310d7da
4 files changed
+20
-19
No files matched your search
@@ -55,16 +55,6 @@ func getOpts(opt ...Option) (options, []api.Option) {
|
||||
return opts, apiOpts
|
||||
}
|
||||
|
||||
// If set, and if the version is zero during an update, the API will perform a
|
||||
// fetch to get the current version of the resource and populate it during the
|
||||
// update call. This is convenient but opens up the possibility for subtle
|
||||
// order-of-modification issues, so use carefully.
|
||||
func WithAutomaticVersioning(enable bool) Option {
|
||||
return func(o *options) {
|
||||
o.withAutomaticVersioning = enable
|
||||
}
|
||||
}
|
||||
|
||||
// WithSkipCurlOutput tells the API to not use the current call for cURL output.
|
||||
// Useful for when we need to look up versions.
|
||||
func WithSkipCurlOutput(skip bool) Option {
|
||||
|
||||
Reference in new issue
Block a user