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

Add Bad Request Exception For Empty Rule #3491

Closed
wants to merge 140 commits into from

Conversation

Amoncy
Copy link
Contributor

@Amoncy Amoncy commented Jul 6, 2023

#3474
Hi Eric,

I have made the changes to the code. Could you please review?

Thank you

@Amoncy Amoncy marked this pull request as draft July 6, 2023 12:57
@Amoncy Amoncy marked this pull request as ready for review July 6, 2023 13:14
Copy link
Member

@EricWittmann EricWittmann left a comment

Choose a reason for hiding this comment

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

Good start, but a few changes are needed I think.

This endpoint accepts a payload that contains two values: 1. the name/type of the rule and 2. the configuration value of the rule

Looking at this now I see that we should be checking for null for the name/type and we should be checking for null or empty-string for the config.

You can use requireParameter() to check the name/type, but will need to check for null value or empty string for the config. Note that you must check for null value first because if you check for empty value (like you are doing now) but it's actually null that will result in a NullPointerException.

For both values we should throw a MissingRequiredParameterException in case of failure.

Copy link
Member

@carlesarnal carlesarnal left a comment

Choose a reason for hiding this comment

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

In addition to what Eric said we should add a test to validate the new behaviour and ensure that the expected exception is thrown.

andreaTP and others added 24 commits August 22, 2023 17:47
… GET (Apicurio#3462)

* Changing "derefence" support to support both deref and ref rewriting

* Add tests for ref writing.  Fix failing build.
…curio#3479)

Bumps [strimzi-test-container](https://github.com/strimzi/test-container) from 0.103.0 to 0.104.0.
- [Release notes](https://github.com/strimzi/test-container/releases)
- [Commits](strimzi/test-container@0.103.0...0.104.0)

---
updated-dependencies:
- dependency-name: io.strimzi:strimzi-test-container
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [guava](https://github.com/google/guava) from 32.0.1-jre to 32.1.0-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [guava](https://github.com/google/guava) from 32.1.0-jre to 32.1.1-jre.
- [Release notes](https://github.com/google/guava/releases)
- [Commits](https://github.com/google/guava/commits)

---
updated-dependencies:
- dependency-name: com.google.guava:guava
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…io#3492)

Bumps [json-schema-validator](https://github.com/networknt/json-schema-validator) from 1.0.85 to 1.0.86.
- [Release notes](https://github.com/networknt/json-schema-validator/releases)
- [Changelog](https://github.com/networknt/json-schema-validator/blob/master/CHANGELOG.md)
- [Commits](networknt/json-schema-validator@1.0.85...1.0.86)

---
updated-dependencies:
- dependency-name: com.networknt:json-schema-validator
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps `protobuf.version` from 3.23.2 to 3.23.4.

Updates `protobuf-java` from 3.23.2 to 3.23.4
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](protocolbuffers/protobuf@v3.23.2...v3.23.4)

Updates `protobuf-java-util` from 3.23.2 to 3.23.4

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: com.google.protobuf:protobuf-java-util
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [okio-fakefilesystem](https://github.com/square/okio) from 3.3.0 to 3.4.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.3.0...parent-3.4.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio-fakefilesystem
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [okio-jvm](https://github.com/square/okio) from 3.3.0 to 3.4.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.3.0...parent-3.4.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio-jvm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [okio](https://github.com/square/okio) from 3.3.0 to 3.4.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.3.0...parent-3.4.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [proto-google-common-protos](https://github.com/googleapis/sdk-platform-java) from 2.21.0 to 2.22.0.
- [Release notes](https://github.com/googleapis/sdk-platform-java/releases)
- [Changelog](https://github.com/googleapis/sdk-platform-java/blob/main/CHANGELOG.md)
- [Commits](googleapis/sdk-platform-java@v2.21.0...v2.22.0)

---
updated-dependencies:
- dependency-name: com.google.api.grpc:proto-google-common-protos
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [kafka-oauth-client](https://github.com/strimzi/strimzi-kafka-oauth) from 0.12.0 to 0.13.0.
- [Release notes](https://github.com/strimzi/strimzi-kafka-oauth/releases)
- [Changelog](https://github.com/strimzi/strimzi-kafka-oauth/blob/main/RELEASE_NOTES.md)
- [Commits](strimzi/strimzi-kafka-oauth@0.12.0...0.13.0)

---
updated-dependencies:
- dependency-name: io.strimzi:kafka-oauth-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps keycloak-admin-client from 21.1.2 to 22.0.0.

---
updated-dependencies:
- dependency-name: org.keycloak:keycloak-admin-client
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [graphql-java](https://github.com/graphql-java/graphql-java) from 20.4 to 21.0.
- [Release notes](https://github.com/graphql-java/graphql-java/releases)
- [Commits](graphql-java/graphql-java@v20.4...v21.0)

---
updated-dependencies:
- dependency-name: com.graphql-java:graphql-java
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
…picurio#3510)

Bumps [kafka-schema-registry-client](https://github.com/confluentinc/schema-registry) from 7.4.0 to 7.4.1.
- [Commits](https://github.com/confluentinc/schema-registry/commits)

---
updated-dependencies:
- dependency-name: io.confluent:kafka-schema-registry-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps `apicurio-common-rest-client.version` from 0.1.17.Final to 0.1.18.Final.

Updates `apicurio-common-rest-client-vertx` from 0.1.17.Final to 0.1.18.Final
- [Release notes](https://github.com/apicurio/apicurio-common-rest-client/releases)
- [Commits](Apicurio/apicurio-common-rest-client@0.1.17.Final...0.1.18.Final)

Updates `apicurio-common-rest-client-jdk` from 0.1.17.Final to 0.1.18.Final
- [Release notes](https://github.com/apicurio/apicurio-common-rest-client/releases)
- [Commits](Apicurio/apicurio-common-rest-client@0.1.17.Final...0.1.18.Final)

Updates `apicurio-common-rest-client-common` from 0.1.17.Final to 0.1.18.Final
- [Release notes](https://github.com/apicurio/apicurio-common-rest-client/releases)
- [Commits](Apicurio/apicurio-common-rest-client@0.1.17.Final...0.1.18.Final)

---
updated-dependencies:
- dependency-name: io.apicurio:apicurio-common-rest-client-vertx
  dependency-type: direct:production
  update-type: version-update:semver-patch
- dependency-name: io.apicurio:apicurio-common-rest-client-jdk
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: io.apicurio:apicurio-common-rest-client-common
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
jsenko and others added 28 commits August 22, 2023 17:47
Bumps [org.yaml:snakeyaml](https://bitbucket.org/snakeyaml/snakeyaml) from 2.0 to 2.1.
- [Commits](https://bitbucket.org/snakeyaml/snakeyaml/branches/compare/snakeyaml-2.1..snakeyaml-2.0)

---
updated-dependencies:
- dependency-name: org.yaml:snakeyaml
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…curio#3552)

Bumps [com.squareup.okio:okio-jvm](https://github.com/square/okio) from 3.4.0 to 3.5.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.4.0...parent-3.5.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio-jvm
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps [tough-cookie](https://github.com/salesforce/tough-cookie) to 4.1.3 and updates ancestor dependency [ts-jest](https://github.com/kulshekhar/ts-jest). These dependencies need to be updated together.


Updates `tough-cookie` from 4.1.0 to 4.1.3
- [Release notes](https://github.com/salesforce/tough-cookie/releases)
- [Changelog](https://github.com/salesforce/tough-cookie/blob/master/CHANGELOG.md)
- [Commits](salesforce/tough-cookie@v4.1.0...v4.1.3)

Updates `ts-jest` from 24.3.0 to 29.1.1
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](kulshekhar/ts-jest@v24.3.0...v29.1.1)

---
updated-dependencies:
- dependency-name: tough-cookie
  dependency-type: indirect
- dependency-name: ts-jest
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps [com.squareup.okio:okio](https://github.com/square/okio) from 3.4.0 to 3.5.0.
- [Changelog](https://github.com/square/okio/blob/master/CHANGELOG.md)
- [Commits](square/okio@parent-3.4.0...parent-3.5.0)

---
updated-dependencies:
- dependency-name: com.squareup.okio:okio
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Bumps `protobuf.version` from 3.23.4 to 3.24.0.

Updates `com.google.protobuf:protobuf-java` from 3.23.4 to 3.24.0
- [Release notes](https://github.com/protocolbuffers/protobuf/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf/blob/main/protobuf_release.bzl)
- [Commits](protocolbuffers/protobuf@v3.23.4...v3.24.0)

Updates `com.google.protobuf:protobuf-java-util` from 3.23.4 to 3.24.0

---
updated-dependencies:
- dependency-name: com.google.protobuf:protobuf-java
  dependency-type: direct:production
  update-type: version-update:semver-minor
- dependency-name: com.google.protobuf:protobuf-java-util
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
* Java operator baseline

* operator/pom.xml

* fix the build

* bump version

---------

Co-authored-by: Eric Wittmann <[email protected]>
Bumps [microsoft-kiota-http](https://github.com/microsoft/kiota) from 0.4.4 to 0.5.0.
- [Release notes](https://github.com/microsoft/kiota/releases)
- [Changelog](https://github.com/microsoft/kiota/blob/main/CHANGELOG.md)
- [Commits](https://github.com/microsoft/kiota/commits/v0.5.0)

---
updated-dependencies:
- dependency-name: microsoft-kiota-http
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…picurio#3581)

Bumps [com.theoryinpractise:googleformatter-maven-plugin](https://github.com/talios/googleformatter-maven-plugin) from 1.7.3 to 1.7.5.
- [Commits](talios/googleformatter-maven-plugin@googleformatter-maven-plugin-1.7.3...googleformatter-maven-plugin-1.7.5)

---
updated-dependencies:
- dependency-name: com.theoryinpractise:googleformatter-maven-plugin
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants