-
Notifications
You must be signed in to change notification settings - Fork 16
feat: support inbound plugin jsonschema validator #239
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
base: main
Are you sure you want to change the base?
feat: support inbound plugin jsonschema validator #239
Conversation
e24260e to
e613d87
Compare
Codecov Report❌ Patch coverage is
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes 🚀 New features to boost your workflow:
|
d4f58ec to
6166e8d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default_schema: to be used when event_type is not defined in theschemasversion: define the jsonschema dialect version
| "time" | ||
| ) | ||
|
|
||
| type Config struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Requires a version field. (enum: draft4/draft6/draft7/etc..)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
current jsonschema only support openapi3 schema, which based on the draft6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not use string? (draft4, draft6, draft202012)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's use string value but simplify the version number
draft: 4/6/7/2019-09/2020-12
|
I think we can design a feature to support loading values from external system(including file, env, and network), this would be a different topic. Let's remove the part of loading schema from the file and network to keep the plugin as simple as possible. |
good idea, this should the common requirement of plugin |
|
Please update the README.md to mention this cool plugin. |
1129fe1 to
a72086b
Compare
test/declarative/declarative_test.go
Outdated
| resp, err := adminClient.R(). | ||
| SetBody(string(yaml)). | ||
| Post("/workspaces/default/config/sync") | ||
| fmt.Print(string(resp.Body())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| fmt.Print(string(resp.Body())) |
|
Don't forget the plugin documentation (see https://docs.webhookx.io/docs/plugin/function/). It would be great if we had a blog post introducing this awesome plugin! |
fd73160 to
b5a616b
Compare
ba635b2 to
442afd0
Compare
issue #227