Skip to content

Commit

Permalink
Merge branch '7.3.x' into 7.4.x by sriman-confluent
Browse files Browse the repository at this point in the history
  • Loading branch information
ConfluentSemaphore committed Aug 20, 2024
2 parents 93b57bb + 0e3fbd9 commit 4c4ce16
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import io.confluent.kafka.schemaregistry.rules.RuleException;
import io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry;
import io.confluent.kafka.schemaregistry.utils.QualifiedSubject;
import io.confluent.rest.annotations.PerformanceMetric;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down Expand Up @@ -97,6 +98,7 @@ public ConfigResource(KafkaSchemaRegistry schemaRegistry) {
+ "Error code 50003 indicates a failure forwarding the request to the primary.",
content = @Content(schema = @Schema(implementation = ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("config.update-subject")
public ConfigUpdateRequest updateSubjectLevelConfig(
@Parameter(description = "Name of the subject", required = true)
@PathParam("subject") String subject,
Expand Down Expand Up @@ -165,6 +167,7 @@ public ConfigUpdateRequest updateSubjectLevelConfig(
+ "Error code 50001 indicates a failure in the backend data store.",
content = @Content(schema = @Schema(implementation = ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("config.get-subject")
public Config getSubjectLevelConfig(
@Parameter(description = "Name of the subject", required = true)
@PathParam("subject") String subject,
Expand Down Expand Up @@ -209,6 +212,7 @@ public Config getSubjectLevelConfig(
+ "Error code 50003 indicates a failure forwarding the request to the primary.",
content = @Content(schema = @Schema(implementation = ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("config.update-global")
public ConfigUpdateRequest updateTopLevelConfig(
@Context HttpHeaders headers,
@Parameter(description = "Config Update Request", required = true)
Expand Down Expand Up @@ -264,6 +268,7 @@ public ConfigUpdateRequest updateTopLevelConfig(
+ "Error code 50001 indicates a failure in the backend data store.",
content = @Content(schema = @Schema(implementation = ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("config.get-global")
public Config getTopLevelConfig() {
Config config;
try {
Expand Down Expand Up @@ -330,6 +335,7 @@ public void deleteTopLevelConfig(
+ "Error code 50001 indicates a failure in the backend data store.",
content = @Content(schema = @Schema(implementation = ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("config.delete-subject")
public void deleteSubjectConfig(
final @Suspended AsyncResponse asyncResponse,
@Context HttpHeaders headers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
import io.confluent.kafka.schemaregistry.rest.exceptions.RestInvalidModeException;
import io.confluent.kafka.schemaregistry.storage.KafkaSchemaRegistry;
import io.confluent.kafka.schemaregistry.utils.QualifiedSubject;
import io.confluent.rest.annotations.PerformanceMetric;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter;
import io.swagger.v3.oas.annotations.media.Content;
Expand Down Expand Up @@ -94,6 +95,7 @@ public ModeResource(KafkaSchemaRegistry schemaRegistry) {
+ "Error code 50004 indicates unknown leader.",
content = @Content(schema = @Schema(implementation = ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("mode.update-subject")
public ModeUpdateRequest updateMode(
@Parameter(description = "Name of the subject", required = true)
@PathParam("subject") String subject,
Expand Down Expand Up @@ -152,6 +154,7 @@ public ModeUpdateRequest updateMode(
+ "Error code 50001 indicates a failure in the backend data store.",
content = @Content(schema = @Schema(implementation = ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("mode.get-subject")
public Mode getMode(
@Parameter(description = "Name of the subject", required = true)
@PathParam("subject") String subject,
Expand Down Expand Up @@ -193,6 +196,7 @@ public Mode getMode(
+ "Error code 50004 indicates unknown leader.",
content = @Content(schema = @Schema(implementation = ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("mode.update-global")
public ModeUpdateRequest updateTopLevelMode(
@Context HttpHeaders headers,
@Parameter(description = "Update Request", required = true)
Expand All @@ -214,6 +218,7 @@ public ModeUpdateRequest updateTopLevelMode(
description = "Error code 50001 -- Error in the backend data store")
})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("mode.get-global")
public Mode getTopLevelMode() {
return getMode(null, false);
}
Expand All @@ -235,6 +240,7 @@ public Mode getTopLevelMode() {
+ "Error code 50001 indicates a failure in the backend data store.",
content = @Content(schema = @Schema(implementation = ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("mode.delete-subject")
public void deleteSubjectMode(
final @Suspended AsyncResponse asyncResponse,
@Context HttpHeaders headers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ public SchemaString getSchema(
content = @Content(schema = @io.swagger.v3.oas.annotations.media.Schema(implementation =
ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("schemas.get-subjects")
public Set<String> getSubjects(
@Parameter(description = "Globally unique identifier of the schema", required = true)
@PathParam("id") Integer id,
Expand Down Expand Up @@ -239,6 +240,7 @@ public Set<String> getSubjects(
content = @Content(schema = @io.swagger.v3.oas.annotations.media.Schema(implementation =
ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("schemas.get-versions")
public List<SubjectVersion> getVersions(
@Parameter(description = "Globally unique identifier of the schema", required = true)
@PathParam("id") Integer id,
Expand Down Expand Up @@ -327,6 +329,7 @@ public String getSchemaOnly(
content = @Content(schema = @io.swagger.v3.oas.annotations.media.Schema(implementation =
ErrorMessage.class)))})
@Tags(@Tag(name = apiTag))
@PerformanceMetric("schemas.get-types")
public Set<String> getSchemaTypes() {
return schemaRegistry.schemaTypes();
}
Expand Down

0 comments on commit 4c4ce16

Please sign in to comment.