Skip to content

Commit

Permalink
[NA] Fix style issues (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
thiagohora authored and Douglas Blank committed Oct 4, 2024
1 parent 16b9272 commit c3cf406
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@
import java.util.stream.Collectors;

import static com.comet.opik.api.Span.SpanPage;
import static com.comet.opik.api.Span.View;
import static com.comet.opik.utils.AsyncUtils.setRequestContext;
import static com.comet.opik.utils.ValidationUtils.validateProjectNameAndProjectId;

Expand All @@ -73,7 +72,7 @@ public class SpansResource {
@GET
@Operation(operationId = "getSpansByProject", summary = "Get spans by project_name or project_id and optionally by trace_id and/or type", description = "Get spans by project_name or project_id and optionally by trace_id and/or type", responses = {
@ApiResponse(responseCode = "200", description = "Spans resource", content = @Content(schema = @Schema(implementation = SpanPage.class)))})
@JsonView(View.Public.class)
@JsonView(Span.View.Public.class)
public Response getByProjectId(
@QueryParam("page") @Min(1) @DefaultValue("1") int page,
@QueryParam("size") @Min(1) @DefaultValue("10") int size,
Expand Down Expand Up @@ -108,7 +107,7 @@ public Response getByProjectId(
@Operation(operationId = "getSpanById", summary = "Get span by id", description = "Get span by id", responses = {
@ApiResponse(responseCode = "200", description = "Span resource", content = @Content(schema = @Schema(implementation = Span.class))),
@ApiResponse(responseCode = "404", description = "Not found", content = @Content(schema = @Schema(implementation = Span.class)))})
@JsonView(View.Public.class)
@JsonView(Span.View.Public.class)
public Response getById(@PathParam("id") @NotNull UUID id) {

String workspaceId = requestContext.get().getWorkspaceId();
Expand All @@ -128,7 +127,7 @@ public Response getById(@PathParam("id") @NotNull UUID id) {
@ApiResponse(responseCode = "201", description = "Created", headers = {
@Header(name = "Location", required = true, example = "${basePath}/v1/private/spans/{spanId}", schema = @Schema(implementation = String.class))})})
public Response create(
@RequestBody(content = @Content(schema = @Schema(implementation = Span.class))) @JsonView(View.Write.class) @NotNull @Valid Span span,
@RequestBody(content = @Content(schema = @Schema(implementation = Span.class))) @JsonView(Span.View.Write.class) @NotNull @Valid Span span,
@Context UriInfo uriInfo) {

String workspaceId = requestContext.get().getWorkspaceId();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public class ExperimentItemService {
private final @NonNull ExperimentService experimentService;
private final @NonNull DatasetItemDAO datasetItemDAO;

public Mono<Void> create(@NonNull Set<ExperimentItem> experimentItems) {
public Mono<Void> create(Set<ExperimentItem> experimentItems) {
Preconditions.checkArgument(CollectionUtils.isNotEmpty(experimentItems),
"Argument 'experimentItems' must not be empty");

Expand Down

0 comments on commit c3cf406

Please sign in to comment.