Skip to content

Commit

Permalink
feat(swaggerui): requestbody
Browse files Browse the repository at this point in the history
  • Loading branch information
tkurzydym committed Apr 24, 2024
1 parent 93ff365 commit 3ce5a8d
Showing 1 changed file with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,14 @@
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;

import org.eclipse.microprofile.openapi.annotations.media.Content;
import org.eclipse.microprofile.openapi.annotations.media.Schema;
import org.eclipse.microprofile.openapi.annotations.parameters.Parameter;

import de.openknowledge.sample.address.domain.Address;
import de.openknowledge.sample.address.domain.AddressRepository;
import de.openknowledge.sample.address.domain.CustomerNumber;
import org.eclipse.microprofile.openapi.annotations.parameters.RequestBody;

/**
* RESTFul endpoint for delivery addresses
Expand Down Expand Up @@ -79,6 +81,11 @@ public Response setAddress(
example = "0815",
schema = @Schema(type = STRING))
@PathParam("customerNumber") CustomerNumber customerNumber,
@RequestBody(
content = @Content(
mediaType = MediaType.APPLICATION_JSON,
schema = @Schema(ref = "#/components/schemas/Address")
))
Address address,
@Context UriInfo uri) {

Expand Down

0 comments on commit 3ce5a8d

Please sign in to comment.