mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-08-21 07:28:44 +00:00
Enhance: Add PATCH endpoint to update storage service by FQN in StorageServiceResource (#20598)
This commit is contained in:
parent
cf110edf31
commit
ee6164e2f9
@ -393,6 +393,37 @@ public class StorageServiceResource
|
|||||||
return patchInternal(uriInfo, securityContext, id, patch);
|
return patchInternal(uriInfo, securityContext, id, patch);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@PATCH
|
||||||
|
@Path("/name/{fqn}")
|
||||||
|
@Operation(
|
||||||
|
operationId = "patchStorageServiceByFQN",
|
||||||
|
summary = "Update an storage service by FQN",
|
||||||
|
description = "Update an existing storage service using JsonPatch by FQN.",
|
||||||
|
externalDocs =
|
||||||
|
@ExternalDocumentation(
|
||||||
|
description = "JsonPatch RFC",
|
||||||
|
url = "https://tools.ietf.org/html/rfc6902"))
|
||||||
|
@Consumes(MediaType.APPLICATION_JSON_PATCH_JSON)
|
||||||
|
public Response patch(
|
||||||
|
@Context UriInfo uriInfo,
|
||||||
|
@Context SecurityContext securityContext,
|
||||||
|
@Parameter(
|
||||||
|
description = "Fully qualified name of the storage service",
|
||||||
|
schema = @Schema(type = "string"))
|
||||||
|
@PathParam("fqn")
|
||||||
|
String fqn,
|
||||||
|
@RequestBody(
|
||||||
|
description = "JsonPatch with array of operations",
|
||||||
|
content =
|
||||||
|
@Content(
|
||||||
|
mediaType = MediaType.APPLICATION_JSON_PATCH_JSON,
|
||||||
|
examples = {
|
||||||
|
@ExampleObject("[{op:remove, path:/a},{op:add, path: /b, value: val}]")
|
||||||
|
}))
|
||||||
|
JsonPatch patch) {
|
||||||
|
return patchInternal(uriInfo, securityContext, fqn, patch);
|
||||||
|
}
|
||||||
|
|
||||||
@DELETE
|
@DELETE
|
||||||
@Path("/{id}")
|
@Path("/{id}")
|
||||||
@Operation(
|
@Operation(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user