-
Notifications
You must be signed in to change notification settings - Fork 113
Closed
Labels
area:serverThis item is related to the server extensionThis item is related to the server extension
Description
I tried to generate the Resources for my open api file.
Unfortunately the descriptions are only included in the javadoc.
I would prefer to have this information in @operation(summary = "", description = "") to have this in the generated swagger again.
Is there any chance to do this?
Example Result with the infamous petshop example ;)
package io.petstore;
import io.petstore.beans.ApiResponse;
import io.petstore.beans.Pet;
import jakarta.validation.constraints.NotNull;
import jakarta.ws.rs.Consumes;
import jakarta.ws.rs.DELETE;
import jakarta.ws.rs.GET;
import jakarta.ws.rs.HeaderParam;
import jakarta.ws.rs.POST;
import jakarta.ws.rs.PUT;
import jakarta.ws.rs.Path;
import jakarta.ws.rs.PathParam;
import jakarta.ws.rs.Produces;
import jakarta.ws.rs.QueryParam;
import java.io.InputStream;
import java.util.List;
/**
* A JAX-RS interface. An implementation of this interface must be provided.
*/
@Path("/pet")
public interface PetResource {
/**
*
*/
@Path("/{petId}/uploadImage")
@POST
@Produces("application/json")
@Consumes("multipart/form-data")
ApiResponse uploadFile(@PathParam("petId") long petId, @NotNull InputStream data);
/**
*
*/
@PUT
@Consumes({"application/xml", "application/json"})
void updatePet(@NotNull Pet data);
/**
*
*/
@POST
@Consumes({"application/xml", "application/json"})
void addPet(@NotNull Pet data);
/**
* <p>
* Multiple status values can be provided with comma separated strings
* </p>
*
*/
@Path("/findByStatus")
@GET
@Produces({"application/xml", "application/json"})
List<Pet> findPetsByStatus(@QueryParam("status") @NotNull List<String> status);
/**
* <p>
* Multiple tags can be provided with comma separated strings. Use tag1, tag2,
* tag3 for testing.
* </p>
*
*/
@Path("/findByTags")
@GET
@Produces({"application/xml", "application/json"})
List<Pet> findPetsByTags(@QueryParam("tags") @NotNull List<String> tags);
/**
* <p>
* Returns a single pet
* </p>
*
*/
@Path("/{petId}")
@GET
@Produces({"application/xml", "application/json"})
Pet getPetById(@PathParam("petId") long petId);
/**
*
*/
@Path("/{petId}")
@POST
@Consumes("application/x-www-form-urlencoded")
void updatePetWithForm(@PathParam("petId") long petId, @NotNull InputStream data);
/**
*
*/
@Path("/{petId}")
@DELETE
void deletePet(@HeaderParam("api_key") String apiKey, @PathParam("petId") long petId);
}
Metadata
Metadata
Assignees
Labels
area:serverThis item is related to the server extensionThis item is related to the server extension