Skip to content

Mr/contextvalidate#2

Merged
majodev merged 6 commits intoallaboutapps:masterfrom
majodev:mr/contextvalidate
Mar 8, 2021
Merged

Mr/contextvalidate#2
majodev merged 6 commits intoallaboutapps:masterfrom
majodev:mr/contextvalidate

Conversation

@majodev
Copy link
Copy Markdown

@majodev majodev commented Feb 26, 2021

contextvalidate support + interface testing with openapi runtime

Copy link
Copy Markdown

@MorpheusXAUT MorpheusXAUT left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

Comment thread runtime_test.go Outdated
"github.com/go-openapi/runtime"
)

func TestInt16ImplementsRuntimeValidatable(t *testing.T) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

We could potentially also resort to the way e.g. the pq Postgres driver ensures the types implement the sql.Driver interface properly: https://github.com/lib/pq/blob/master/conn.go#L42
Could be added to each one of the generated files instead of having a runtime test for extra "security".

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

agreed, rm'ed + added in each generated file.

@majodev majodev merged commit 14cb4dc into allaboutapps:master Mar 8, 2021
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