Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Server config api operation null check #1905

Merged
merged 1 commit into from
Mar 19, 2019

Conversation

kellrott
Copy link
Contributor

Adding check to see if passed api operation is already set before setting it to middleware.NotImplemented
So

api.GetStatusHandler = operations.GetStatusHandlerFunc(func(params operations.GetStatusParams) middleware.Responder {
	return middleware.NotImplemented("operation .GetStatus has not yet been implemented")
})

Becomes

if api.GetStatusHandler == nil {
	api.GetStatusHandler = operations.GetStatusHandlerFunc(func(params operations.GetStatusParams) middleware.Responder {
		return middleware.NotImplemented("operation .GetStatus has not yet been implemented")
	})
}

@codecov
Copy link

codecov bot commented Mar 19, 2019

Codecov Report

Merging #1905 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1905   +/-   ##
=======================================
  Coverage   80.74%   80.74%           
=======================================
  Files          38       38           
  Lines        7583     7583           
=======================================
  Hits         6123     6123           
  Misses        981      981           
  Partials      479      479
Impacted Files Coverage Δ
generator/bindata.go 70.92% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 873540c...652f232. Read the comment docs.

1 similar comment
@codecov
Copy link

codecov bot commented Mar 19, 2019

Codecov Report

Merging #1905 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1905   +/-   ##
=======================================
  Coverage   80.74%   80.74%           
=======================================
  Files          38       38           
  Lines        7583     7583           
=======================================
  Hits         6123     6123           
  Misses        981      981           
  Partials      479      479
Impacted Files Coverage Δ
generator/bindata.go 70.92% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 873540c...652f232. Read the comment docs.

@casualjim casualjim merged commit 3aa2612 into go-swagger:master Mar 19, 2019
Copy link
Contributor

@kaisawind kaisawind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question on handler set-up #1930

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants