Trying to fix documentation

This commit is contained in:
Luca Frosini 2022-09-30 15:26:23 +02:00
parent bcd4038932
commit 957a36cc21
1 changed files with 9 additions and 10 deletions

View File

@ -30,6 +30,8 @@ import org.xml.sax.SAXException;
import com.webcohesion.enunciate.metadata.rs.ResourceGroup;
import com.webcohesion.enunciate.metadata.rs.ResourceLabel;
import com.webcohesion.enunciate.metadata.rs.ResponseCode;
import com.webcohesion.enunciate.metadata.rs.StatusCodes;
/**
* A Profile must comply with the defined <a href="../profiles/SCHEMA">XSD schema</a> .
@ -135,26 +137,23 @@ public class Profile extends BaseREST implements org.gcube.gcat.api.interfaces.P
* <p>
* It is possible reading a profile in JSON by specifing the HTTP Header:<br/>
* <code>Accept: application/json</code>
*</p>
* </p>
*
* @param name the name of the profile
* @return the profile definition
*
* @pathExample /profiles/EmptyProfile
* @requestExample application/json;charset=UTF-8
* @responseExample application/json;charset=UTF-8 classpath:/api-docs-examples/profile/read-profile-response.json
*
* @pathExample /profiles/EmptyProfile
* @requestExample application/xml
* @responseExample application/xml classpath:/api-docs-examples/profile/read-profile-response.xml
*
*/
@GET
@Path("/{" + PROFILE_NAME_PARAMETER + "}")
@Consumes({MediaType.APPLICATION_XML, GCatConstants.APPLICATION_JSON_CHARSET_UTF_8})
@Produces({MediaType.APPLICATION_XML, GCatConstants.APPLICATION_JSON_CHARSET_UTF_8})
@Produces({MediaType.APPLICATION_XML})
@StatusCodes ({
@ResponseCode ( code = 200, condition = "The pprofile exists.")
})
@Override
public String read(@PathParam(PROFILE_NAME_PARAMETER) String name) { // @DefaultValue(MediaType.APPLICATION_XML) @HeaderParam("Accept") String accept) {
public String read(@PathParam(PROFILE_NAME_PARAMETER) String name) {
setCalledMethod("GET /" + PROFILES + "/{" + PROFILE_NAME_PARAMETER + "}");
try {
// If the name is SCHEMA