-
Notifications
You must be signed in to change notification settings - Fork 327
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
chore(tools): improve resource-gen by auto generating ws code #2466
Conversation
2887ac3
to
3558ec0
Compare
This code was systematically created. We generate code to make this code auto generated from protobuf annotations This adds boilerplate code for the validator and tests if they don't exist already. The goal is to make creating a new policy less cumbersome. Signed-off-by: Charly Molter <charly.molter@konghq.com>
3558ec0
to
e9b2be4
Compare
…efinitions Signed-off-by: Charly Molter <charly.molter@konghq.com>
Signed-off-by: Charly Molter <charly.molter@konghq.com>
1fbc63e
to
4252444
Compare
@jpeach I added what you were suggesting. It almost feels that instead of having 2 extensions there should be one with different options. |
Codecov Report
@@ Coverage Diff @@
## master #2466 +/- ##
==========================================
- Coverage 52.47% 52.43% -0.05%
==========================================
Files 868 866 -2
Lines 48198 48249 +51
==========================================
+ Hits 25294 25299 +5
- Misses 20868 20912 +44
- Partials 2036 2038 +2
Continue to review full report at Codecov.
|
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.
A few nit-picking comments on style. I'm find if you disagree and prefer to leave the code as is though.
Nice improvement!
What did you have in mind? |
…efinitions Signed-off-by: Charly Molter <charly.molter@konghq.com>
Instead of having:
Have:
It seems a little simpler than have a lot of options. |
This code was systematically created. We generate code for webservices to make this code auto generated from protobuf annotations The goal is to make creating a new policy less cumbersome. Signed-off-by: Charly Molter <charly.molter@konghq.com> (cherry picked from commit ac839aa) # Conflicts: # pkg/api-server/definitions/all.go # pkg/api-server/definitions/api.go # pkg/api-server/definitions/circuit_breaker.go # pkg/api-server/definitions/dataplane.go # pkg/api-server/definitions/dataplane_insight.go # pkg/api-server/definitions/definition.go # pkg/api-server/definitions/external_service.go # pkg/api-server/definitions/fault_injection.go # pkg/api-server/definitions/global_secret.go # pkg/api-server/definitions/health_check.go # pkg/api-server/definitions/mesh.go # pkg/api-server/definitions/mesh_insight.go # pkg/api-server/definitions/proxytemplate.go # pkg/api-server/definitions/rate_limit.go # pkg/api-server/definitions/retry.go # pkg/api-server/definitions/secret.go # pkg/api-server/definitions/service_insight.go # pkg/api-server/definitions/timeout.go # pkg/api-server/definitions/traffic_log.go # pkg/api-server/definitions/traffic_permission.go # pkg/api-server/definitions/traffic_route.go # pkg/api-server/definitions/traffic_trace.go # pkg/api-server/definitions/zone-ingress.go # pkg/api-server/definitions/zone.go # pkg/api-server/definitions/zone_insight.go # pkg/api-server/server.go
This code was systematically created. We generate code for webservices to make this code auto generated from protobuf annotations The goal is to make creating a new policy less cumbersome. Signed-off-by: Charly Molter <charly.molter@konghq.com> (cherry picked from commit ac839aa)
…#2485) This code was systematically created. We generate code for webservices to make this code auto generated from protobuf annotations The goal is to make creating a new policy less cumbersome. Signed-off-by: Charly Molter <charly.molter@konghq.com> (cherry picked from commit ac839aa) Co-authored-by: Charly Molter <charly.molter@konhq.com>
This code was systematically created.
We generate code to make this code auto generated from protobuf annotations. It avoids users adding this code manually and ensure it's coherent.
Signed-off-by: Charly Molter charly.molter@konghq.com