Minor: Fix API docs (#17011)

* Fix API docs

* Fix Linting issues

---------

Co-authored-by: Ayush Shah <ayush@getcollate.io>
This commit is contained in:
Sriharsha Chintalapani 2024-07-13 06:38:20 -07:00 committed by GitHub
parent f2f8443c76
commit d27f518f26
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -13,7 +13,6 @@
package org.openmetadata.service.resources.apis; package org.openmetadata.service.resources.apis;
import com.google.api.Endpoint;
import io.swagger.v3.oas.annotations.ExternalDocumentation; import io.swagger.v3.oas.annotations.ExternalDocumentation;
import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.Parameter; import io.swagger.v3.oas.annotations.Parameter;
@ -173,7 +172,8 @@ public class APIEndpointResource extends EntityResource<APIEndpoint, APIEndpoint
public EntityHistory listVersions( public EntityHistory listVersions(
@Context UriInfo uriInfo, @Context UriInfo uriInfo,
@Context SecurityContext securityContext, @Context SecurityContext securityContext,
@Parameter(description = "Id of the topic", schema = @Schema(type = "UUID")) @PathParam("id") @Parameter(description = "Id of the APIEndpoint", schema = @Schema(type = "UUID"))
@PathParam("id")
UUID id) { UUID id) {
return super.listVersionsInternal(securityContext, id); return super.listVersionsInternal(securityContext, id);
} }
@ -181,6 +181,7 @@ public class APIEndpointResource extends EntityResource<APIEndpoint, APIEndpoint
@GET @GET
@Path("/{id}") @Path("/{id}")
@Operation( @Operation(
operationId = "getEndpointById",
summary = "Get a APIEndpoint by id", summary = "Get a APIEndpoint by id",
description = "Get a APIEndpoint by `id`.", description = "Get a APIEndpoint by `id`.",
responses = { responses = {
@ -219,16 +220,16 @@ public class APIEndpointResource extends EntityResource<APIEndpoint, APIEndpoint
@Path("/name/{fqn}") @Path("/name/{fqn}")
@Operation( @Operation(
operationId = "getEndpointByFQN", operationId = "getEndpointByFQN",
summary = "Get a Endpoint by fully qualified name", summary = "Get a Endpoint by fully qualified name.",
description = "Get a Endpoint by fully qualified name.", description = "Get a Endpoint by fully qualified name.",
responses = { responses = {
@ApiResponse( @ApiResponse(
responseCode = "200", responseCode = "200",
description = "The Endpoint", description = "The APIEndpoint",
content = content =
@Content( @Content(
mediaType = "application/json", mediaType = "application/json",
schema = @Schema(implementation = Endpoint.class))), schema = @Schema(implementation = APIEndpoint.class))),
@ApiResponse(responseCode = "404", description = "Endpoint for instance {fqn} is not found") @ApiResponse(responseCode = "404", description = "Endpoint for instance {fqn} is not found")
}) })
public APIEndpoint getByName( public APIEndpoint getByName(