Commit 756c272e by apoorvnaik

Fix for generating correct REST API docs

parent 93bd535e
...@@ -16,8 +16,7 @@ ...@@ -16,8 +16,7 @@
~ limitations under the License. ~ limitations under the License.
--> -->
<enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" <enunciate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.11.0.xsd">
xsi:noNamespaceSchemaLocation="http://enunciate.webcohesion.com/schemas/enunciate-2.8.0.xsd">
<title>Atlas REST API</title> <title>Atlas REST API</title>
<description> Atlas exposes a variety of REST endpoints to work with types, entities, lineage and data discovery.</description> <description> Atlas exposes a variety of REST endpoints to work with types, entities, lineage and data discovery.</description>
<api-classes> <api-classes>
...@@ -26,8 +25,9 @@ ...@@ -26,8 +25,9 @@
</api-classes> </api-classes>
<modules> <modules>
<swagger/> <swagger host="localhost:21000"/>
<jackson/> <jackson datatype-detection="aggressive" propertiesAlphabetical="true" honorJaxb="false"/>
<jaxrs datatype-detection="aggressive"/>
<jackson1 disabled="true"/> <jackson1 disabled="true"/>
<c-xml-client disabled="true"/> <c-xml-client disabled="true"/>
<java-json-client disabled="true"/> <java-json-client disabled="true"/>
......
...@@ -693,7 +693,7 @@ ...@@ -693,7 +693,7 @@
<jettison.version>1.3.7</jettison.version> <jettison.version>1.3.7</jettison.version>
<paranamer.version>2.7</paranamer.version> <paranamer.version>2.7</paranamer.version>
<zkclient.version>0.8</zkclient.version> <zkclient.version>0.8</zkclient.version>
<enunciate-maven-plugin.version>2.10.1</enunciate-maven-plugin.version> <enunciate-maven-plugin.version>2.11.1</enunciate-maven-plugin.version>
<antlr4.plugin.version>4.5</antlr4.plugin.version> <antlr4.plugin.version>4.5</antlr4.plugin.version>
<maven-site-plugin.version>3.7</maven-site-plugin.version> <maven-site-plugin.version>3.7</maven-site-plugin.version>
<doxia.version>1.8</doxia.version> <doxia.version>1.8</doxia.version>
...@@ -716,7 +716,7 @@ ...@@ -716,7 +716,7 @@
<skipITs>false</skipITs> <skipITs>false</skipITs>
<skipDocs>true</skipDocs> <skipDocs>true</skipDocs>
<skipSite>true</skipSite> <skipSite>true</skipSite>
<skipEnunciate>true</skipEnunciate> <skipEnunciate>false</skipEnunciate>
<projectBaseDir>${project.basedir}</projectBaseDir> <projectBaseDir>${project.basedir}</projectBaseDir>
<jetty-maven-plugin.stopWait>10</jetty-maven-plugin.stopWait> <jetty-maven-plugin.stopWait>10</jetty-maven-plugin.stopWait>
......
...@@ -51,6 +51,7 @@ import javax.ws.rs.PathParam; ...@@ -51,6 +51,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces; import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam; import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.io.IOException; import java.io.IOException;
import java.util.List; import java.util.List;
...@@ -60,6 +61,8 @@ import java.util.List; ...@@ -60,6 +61,8 @@ import java.util.List;
@Path("v2/search") @Path("v2/search")
@Singleton @Singleton
@Service @Service
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
public class DiscoveryREST { public class DiscoveryREST {
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.DiscoveryREST"); private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.DiscoveryREST");
...@@ -95,8 +98,6 @@ public class DiscoveryREST { ...@@ -95,8 +98,6 @@ public class DiscoveryREST {
*/ */
@GET @GET
@Path("/dsl") @Path("/dsl")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasSearchResult searchUsingDSL(@QueryParam("query") String query, public AtlasSearchResult searchUsingDSL(@QueryParam("query") String query,
@QueryParam("typeName") String typeName, @QueryParam("typeName") String typeName,
@QueryParam("classification") String classification, @QueryParam("classification") String classification,
...@@ -144,8 +145,6 @@ public class DiscoveryREST { ...@@ -144,8 +145,6 @@ public class DiscoveryREST {
*/ */
@GET @GET
@Path("/fulltext") @Path("/fulltext")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasSearchResult searchUsingFullText(@QueryParam("query") String query, public AtlasSearchResult searchUsingFullText(@QueryParam("query") String query,
@QueryParam("excludeDeletedEntities") boolean excludeDeletedEntities, @QueryParam("excludeDeletedEntities") boolean excludeDeletedEntities,
@QueryParam("limit") int limit, @QueryParam("limit") int limit,
...@@ -185,8 +184,6 @@ public class DiscoveryREST { ...@@ -185,8 +184,6 @@ public class DiscoveryREST {
*/ */
@GET @GET
@Path("/basic") @Path("/basic")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasSearchResult searchUsingBasic(@QueryParam("query") String query, public AtlasSearchResult searchUsingBasic(@QueryParam("query") String query,
@QueryParam("typeName") String typeName, @QueryParam("typeName") String typeName,
@QueryParam("classification") String classification, @QueryParam("classification") String classification,
...@@ -237,8 +234,6 @@ public class DiscoveryREST { ...@@ -237,8 +234,6 @@ public class DiscoveryREST {
*/ */
@GET @GET
@Path("/attribute") @Path("/attribute")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasSearchResult searchUsingAttribute(@QueryParam("attrName") String attrName, public AtlasSearchResult searchUsingAttribute(@QueryParam("attrName") String attrName,
@QueryParam("attrValuePrefix") String attrValuePrefix, @QueryParam("attrValuePrefix") String attrValuePrefix,
@QueryParam("typeName") String typeName, @QueryParam("typeName") String typeName,
...@@ -312,8 +307,6 @@ public class DiscoveryREST { ...@@ -312,8 +307,6 @@ public class DiscoveryREST {
*/ */
@Path("basic") @Path("basic")
@POST @POST
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasSearchResult searchWithParameters(SearchParameters parameters) throws AtlasBaseException { public AtlasSearchResult searchWithParameters(SearchParameters parameters) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
...@@ -362,8 +355,6 @@ public class DiscoveryREST { ...@@ -362,8 +355,6 @@ public class DiscoveryREST {
*/ */
@GET @GET
@Path("relationship") @Path("relationship")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasSearchResult searchRelatedEntities(@QueryParam("guid") String guid, public AtlasSearchResult searchRelatedEntities(@QueryParam("guid") String guid,
@QueryParam("relation") String relation, @QueryParam("relation") String relation,
@QueryParam("sortBy") String sortByAttribute, @QueryParam("sortBy") String sortByAttribute,
...@@ -397,8 +388,6 @@ public class DiscoveryREST { ...@@ -397,8 +388,6 @@ public class DiscoveryREST {
*/ */
@POST @POST
@Path("saved") @Path("saved")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasUserSavedSearch addSavedSearch(AtlasUserSavedSearch savedSearch) throws AtlasBaseException, IOException { public AtlasUserSavedSearch addSavedSearch(AtlasUserSavedSearch savedSearch) throws AtlasBaseException, IOException {
validateUserSavedSearch(savedSearch); validateUserSavedSearch(savedSearch);
...@@ -423,8 +412,6 @@ public class DiscoveryREST { ...@@ -423,8 +412,6 @@ public class DiscoveryREST {
*/ */
@PUT @PUT
@Path("saved") @Path("saved")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasUserSavedSearch updateSavedSearch(AtlasUserSavedSearch savedSearch) throws AtlasBaseException { public AtlasUserSavedSearch updateSavedSearch(AtlasUserSavedSearch savedSearch) throws AtlasBaseException {
validateUserSavedSearch(savedSearch); validateUserSavedSearch(savedSearch);
...@@ -450,8 +437,6 @@ public class DiscoveryREST { ...@@ -450,8 +437,6 @@ public class DiscoveryREST {
*/ */
@GET @GET
@Path("saved/{name}") @Path("saved/{name}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasUserSavedSearch getSavedSearch(@PathParam("name") String searchName, public AtlasUserSavedSearch getSavedSearch(@PathParam("name") String searchName,
@QueryParam("user") String userName) throws AtlasBaseException { @QueryParam("user") String userName) throws AtlasBaseException {
Servlets.validateQueryParamLength("name", searchName); Servlets.validateQueryParamLength("name", searchName);
...@@ -478,8 +463,6 @@ public class DiscoveryREST { ...@@ -478,8 +463,6 @@ public class DiscoveryREST {
*/ */
@GET @GET
@Path("saved") @Path("saved")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public List<AtlasUserSavedSearch> getSavedSearches(@QueryParam("user") String userName) throws AtlasBaseException { public List<AtlasUserSavedSearch> getSavedSearches(@QueryParam("user") String userName) throws AtlasBaseException {
Servlets.validateQueryParamLength("user", userName); Servlets.validateQueryParamLength("user", userName);
...@@ -501,8 +484,6 @@ public class DiscoveryREST { ...@@ -501,8 +484,6 @@ public class DiscoveryREST {
*/ */
@DELETE @DELETE
@Path("saved/{guid}") @Path("saved/{guid}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public void deleteSavedSearch(@PathParam("guid") String guid) throws AtlasBaseException { public void deleteSavedSearch(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -530,8 +511,6 @@ public class DiscoveryREST { ...@@ -530,8 +511,6 @@ public class DiscoveryREST {
*/ */
@Path("saved/execute/{name}") @Path("saved/execute/{name}")
@GET @GET
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasSearchResult executeSavedSearchByName(@PathParam("name") String searchName, public AtlasSearchResult executeSavedSearchByName(@PathParam("name") String searchName,
@QueryParam("user") String userName) throws AtlasBaseException { @QueryParam("user") String userName) throws AtlasBaseException {
Servlets.validateQueryParamLength("name", searchName); Servlets.validateQueryParamLength("name", searchName);
...@@ -562,8 +541,6 @@ public class DiscoveryREST { ...@@ -562,8 +541,6 @@ public class DiscoveryREST {
*/ */
@Path("saved/execute/guid/{guid}") @Path("saved/execute/guid/{guid}")
@GET @GET
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasSearchResult executeSavedSearchByGuid(@PathParam("guid") String searchGuid) throws AtlasBaseException { public AtlasSearchResult executeSavedSearchByGuid(@PathParam("guid") String searchGuid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", searchGuid); Servlets.validateQueryParamLength("guid", searchGuid);
......
...@@ -53,7 +53,6 @@ import javax.ws.rs.*; ...@@ -53,7 +53,6 @@ import javax.ws.rs.*;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType; import javax.ws.rs.core.MediaType;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
...@@ -65,6 +64,8 @@ import java.util.Map; ...@@ -65,6 +64,8 @@ import java.util.Map;
@Path("v2/entity") @Path("v2/entity")
@Singleton @Singleton
@Service @Service
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
public class EntityREST { public class EntityREST {
private static final Logger LOG = LoggerFactory.getLogger(EntityREST.class); private static final Logger LOG = LoggerFactory.getLogger(EntityREST.class);
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.EntityREST"); private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.EntityREST");
...@@ -94,8 +95,6 @@ public class EntityREST { ...@@ -94,8 +95,6 @@ public class EntityREST {
*/ */
@GET @GET
@Path("/guid/{guid}") @Path("/guid/{guid}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEntityWithExtInfo getById(@PathParam("guid") String guid, @QueryParam("minExtInfo") @DefaultValue("false") boolean minExtInfo) throws AtlasBaseException { public AtlasEntityWithExtInfo getById(@PathParam("guid") String guid, @QueryParam("minExtInfo") @DefaultValue("false") boolean minExtInfo) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -120,8 +119,6 @@ public class EntityREST { ...@@ -120,8 +119,6 @@ public class EntityREST {
*/ */
@GET @GET
@Path("/guid/{guid}/header") @Path("/guid/{guid}/header")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEntityHeader getHeaderById(@PathParam("guid") String guid) throws AtlasBaseException { public AtlasEntityHeader getHeaderById(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -157,8 +154,6 @@ public class EntityREST { ...@@ -157,8 +154,6 @@ public class EntityREST {
*/ */
@GET @GET
@Path("/uniqueAttribute/type/{typeName}") @Path("/uniqueAttribute/type/{typeName}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEntityWithExtInfo getByUniqueAttributes(@PathParam("typeName") String typeName, @QueryParam("minExtInfo") @DefaultValue("false") boolean minExtInfo, public AtlasEntityWithExtInfo getByUniqueAttributes(@PathParam("typeName") String typeName, @QueryParam("minExtInfo") @DefaultValue("false") boolean minExtInfo,
@Context HttpServletRequest servletRequest) throws AtlasBaseException { @Context HttpServletRequest servletRequest) throws AtlasBaseException {
Servlets.validateQueryParamLength("typeName", typeName); Servlets.validateQueryParamLength("typeName", typeName);
...@@ -200,8 +195,6 @@ public class EntityREST { ...@@ -200,8 +195,6 @@ public class EntityREST {
*******/ *******/
@PUT @PUT
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
@Path("/uniqueAttribute/type/{typeName}") @Path("/uniqueAttribute/type/{typeName}")
public EntityMutationResponse partialUpdateEntityByUniqueAttrs(@PathParam("typeName") String typeName, public EntityMutationResponse partialUpdateEntityByUniqueAttrs(@PathParam("typeName") String typeName,
@Context HttpServletRequest servletRequest, @Context HttpServletRequest servletRequest,
...@@ -245,8 +238,6 @@ public class EntityREST { ...@@ -245,8 +238,6 @@ public class EntityREST {
* @return EntityMutationResponse * @return EntityMutationResponse
*/ */
@DELETE @DELETE
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
@Path("/uniqueAttribute/type/{typeName}") @Path("/uniqueAttribute/type/{typeName}")
public EntityMutationResponse deleteByUniqueAttribute(@PathParam("typeName") String typeName, public EntityMutationResponse deleteByUniqueAttribute(@PathParam("typeName") String typeName,
@Context HttpServletRequest servletRequest) throws AtlasBaseException { @Context HttpServletRequest servletRequest) throws AtlasBaseException {
...@@ -277,8 +268,6 @@ public class EntityREST { ...@@ -277,8 +268,6 @@ public class EntityREST {
* @throws AtlasBaseException * @throws AtlasBaseException
*/ */
@POST @POST
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public EntityMutationResponse createOrUpdate(AtlasEntityWithExtInfo entity) throws AtlasBaseException { public EntityMutationResponse createOrUpdate(AtlasEntityWithExtInfo entity) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
...@@ -300,8 +289,6 @@ public class EntityREST { ...@@ -300,8 +289,6 @@ public class EntityREST {
* Null updates are not possible * Null updates are not possible
*******/ *******/
@PUT @PUT
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
@Path("/guid/{guid}") @Path("/guid/{guid}")
public EntityMutationResponse partialUpdateEntityAttrByGuid(@PathParam("guid") String guid, public EntityMutationResponse partialUpdateEntityAttrByGuid(@PathParam("guid") String guid,
@QueryParam("name") String attrName, @QueryParam("name") String attrName,
...@@ -329,8 +316,6 @@ public class EntityREST { ...@@ -329,8 +316,6 @@ public class EntityREST {
*/ */
@DELETE @DELETE
@Path("/guid/{guid}") @Path("/guid/{guid}")
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(Servlets.JSON_MEDIA_TYPE)
public EntityMutationResponse deleteByGuid(@PathParam("guid") final String guid) throws AtlasBaseException { public EntityMutationResponse deleteByGuid(@PathParam("guid") final String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -354,7 +339,6 @@ public class EntityREST { ...@@ -354,7 +339,6 @@ public class EntityREST {
*/ */
@GET @GET
@Path("/guid/{guid}/classification/{classificationName}") @Path("/guid/{guid}/classification/{classificationName}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasClassification getClassification(@PathParam("guid") String guid, @PathParam("classificationName") final String classificationName) throws AtlasBaseException { public AtlasClassification getClassification(@PathParam("guid") String guid, @PathParam("classificationName") final String classificationName) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
Servlets.validateQueryParamLength("classificationName", classificationName); Servlets.validateQueryParamLength("classificationName", classificationName);
...@@ -384,7 +368,6 @@ public class EntityREST { ...@@ -384,7 +368,6 @@ public class EntityREST {
*/ */
@GET @GET
@Path("/guid/{guid}/classifications") @Path("/guid/{guid}/classifications")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasClassification.AtlasClassifications getClassifications(@PathParam("guid") String guid) throws AtlasBaseException { public AtlasClassification.AtlasClassifications getClassifications(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -411,8 +394,6 @@ public class EntityREST { ...@@ -411,8 +394,6 @@ public class EntityREST {
*/ */
@POST @POST
@Path("/uniqueAttribute/type/{typeName}/classifications") @Path("/uniqueAttribute/type/{typeName}/classifications")
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(Servlets.JSON_MEDIA_TYPE)
public void addClassificationsByUniqueAttribute(@PathParam("typeName") String typeName, @Context HttpServletRequest servletRequest, List<AtlasClassification> classifications) throws AtlasBaseException { public void addClassificationsByUniqueAttribute(@PathParam("typeName") String typeName, @Context HttpServletRequest servletRequest, List<AtlasClassification> classifications) throws AtlasBaseException {
Servlets.validateQueryParamLength("typeName", typeName); Servlets.validateQueryParamLength("typeName", typeName);
...@@ -443,8 +424,6 @@ public class EntityREST { ...@@ -443,8 +424,6 @@ public class EntityREST {
*/ */
@POST @POST
@Path("/guid/{guid}/classifications") @Path("/guid/{guid}/classifications")
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(Servlets.JSON_MEDIA_TYPE)
public void addClassifications(@PathParam("guid") final String guid, List<AtlasClassification> classifications) throws AtlasBaseException { public void addClassifications(@PathParam("guid") final String guid, List<AtlasClassification> classifications) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -471,8 +450,6 @@ public class EntityREST { ...@@ -471,8 +450,6 @@ public class EntityREST {
*/ */
@PUT @PUT
@Path("/uniqueAttribute/type/{typeName}/classifications") @Path("/uniqueAttribute/type/{typeName}/classifications")
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(Servlets.JSON_MEDIA_TYPE)
public void updateClassificationsByUniqueAttribute(@PathParam("typeName") String typeName, @Context HttpServletRequest servletRequest, List<AtlasClassification> classifications) throws AtlasBaseException { public void updateClassificationsByUniqueAttribute(@PathParam("typeName") String typeName, @Context HttpServletRequest servletRequest, List<AtlasClassification> classifications) throws AtlasBaseException {
Servlets.validateQueryParamLength("typeName", typeName); Servlets.validateQueryParamLength("typeName", typeName);
...@@ -504,7 +481,6 @@ public class EntityREST { ...@@ -504,7 +481,6 @@ public class EntityREST {
*/ */
@PUT @PUT
@Path("/guid/{guid}/classifications") @Path("/guid/{guid}/classifications")
@Produces(Servlets.JSON_MEDIA_TYPE)
public void updateClassifications(@PathParam("guid") final String guid, List<AtlasClassification> classifications) throws AtlasBaseException { public void updateClassifications(@PathParam("guid") final String guid, List<AtlasClassification> classifications) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -533,8 +509,6 @@ public class EntityREST { ...@@ -533,8 +509,6 @@ public class EntityREST {
*/ */
@DELETE @DELETE
@Path("/uniqueAttribute/type/{typeName}/classification/{classificationName}") @Path("/uniqueAttribute/type/{typeName}/classification/{classificationName}")
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(Servlets.JSON_MEDIA_TYPE)
public void deleteClassificationByUniqueAttribute(@PathParam("typeName") String typeName, @Context HttpServletRequest servletRequest,@PathParam("classificationName") String classificationName) throws AtlasBaseException { public void deleteClassificationByUniqueAttribute(@PathParam("typeName") String typeName, @Context HttpServletRequest servletRequest,@PathParam("classificationName") String classificationName) throws AtlasBaseException {
Servlets.validateQueryParamLength("typeName", typeName); Servlets.validateQueryParamLength("typeName", typeName);
Servlets.validateQueryParamLength("classificationName", classificationName); Servlets.validateQueryParamLength("classificationName", classificationName);
...@@ -567,7 +541,6 @@ public class EntityREST { ...@@ -567,7 +541,6 @@ public class EntityREST {
*/ */
@DELETE @DELETE
@Path("/guid/{guid}/classification/{classificationName}") @Path("/guid/{guid}/classification/{classificationName}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public void deleteClassification(@PathParam("guid") String guid, public void deleteClassification(@PathParam("guid") String guid,
@PathParam("classificationName") final String classificationName, @PathParam("classificationName") final String classificationName,
@QueryParam("associatedEntityGuid") final String associatedEntityGuid) throws AtlasBaseException { @QueryParam("associatedEntityGuid") final String associatedEntityGuid) throws AtlasBaseException {
...@@ -603,8 +576,6 @@ public class EntityREST { ...@@ -603,8 +576,6 @@ public class EntityREST {
*/ */
@GET @GET
@Path("/bulk") @Path("/bulk")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEntitiesWithExtInfo getByGuids(@QueryParam("guid") List<String> guids, @QueryParam("minExtInfo") @DefaultValue("false") boolean minExtInfo) throws AtlasBaseException { public AtlasEntitiesWithExtInfo getByGuids(@QueryParam("guid") List<String> guids, @QueryParam("minExtInfo") @DefaultValue("false") boolean minExtInfo) throws AtlasBaseException {
if (CollectionUtils.isNotEmpty(guids)) { if (CollectionUtils.isNotEmpty(guids)) {
for (String guid : guids) { for (String guid : guids) {
...@@ -635,8 +606,6 @@ public class EntityREST { ...@@ -635,8 +606,6 @@ public class EntityREST {
*/ */
@POST @POST
@Path("/bulk") @Path("/bulk")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public EntityMutationResponse createOrUpdate(AtlasEntitiesWithExtInfo entities) throws AtlasBaseException { public EntityMutationResponse createOrUpdate(AtlasEntitiesWithExtInfo entities) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
...@@ -659,8 +628,6 @@ public class EntityREST { ...@@ -659,8 +628,6 @@ public class EntityREST {
*/ */
@DELETE @DELETE
@Path("/bulk") @Path("/bulk")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public EntityMutationResponse deleteByGuids(@QueryParam("guid") final List<String> guids) throws AtlasBaseException { public EntityMutationResponse deleteByGuids(@QueryParam("guid") final List<String> guids) throws AtlasBaseException {
if (CollectionUtils.isNotEmpty(guids)) { if (CollectionUtils.isNotEmpty(guids)) {
for (String guid : guids) { for (String guid : guids) {
...@@ -686,8 +653,6 @@ public class EntityREST { ...@@ -686,8 +653,6 @@ public class EntityREST {
*/ */
@POST @POST
@Path("/bulk/classification") @Path("/bulk/classification")
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(Servlets.JSON_MEDIA_TYPE)
public void addClassification(ClassificationAssociateRequest request) throws AtlasBaseException { public void addClassification(ClassificationAssociateRequest request) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
...@@ -715,8 +680,6 @@ public class EntityREST { ...@@ -715,8 +680,6 @@ public class EntityREST {
@GET @GET
@Path("{guid}/audit") @Path("{guid}/audit")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public List<EntityAuditEventV2> getAuditEvents(@PathParam("guid") String guid, @QueryParam("startKey") String startKey, public List<EntityAuditEventV2> getAuditEvents(@PathParam("guid") String guid, @QueryParam("startKey") String startKey,
@QueryParam("count") @DefaultValue("100") short count) throws AtlasBaseException { @QueryParam("count") @DefaultValue("100") short count) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
......
...@@ -36,17 +36,16 @@ import org.springframework.stereotype.Service; ...@@ -36,17 +36,16 @@ import org.springframework.stereotype.Service;
import javax.inject.Inject; import javax.inject.Inject;
import javax.ws.rs.*; import javax.ws.rs.*;
import javax.ws.rs.core.MediaType;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Objects; import java.util.Objects;
import java.util.Set; import java.util.Set;
import static org.apache.atlas.web.util.Servlets.JSON_MEDIA_TYPE;
@Path("v2/glossary") @Path("v2/glossary")
@Service @Service
@Consumes(JSON_MEDIA_TYPE) @Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces(JSON_MEDIA_TYPE) @Produces({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
public class GlossaryREST { public class GlossaryREST {
private static final Logger LOG = LoggerFactory.getLogger(GlossaryREST.class); private static final Logger LOG = LoggerFactory.getLogger(GlossaryREST.class);
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.GlossaryREST"); private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.GlossaryREST");
......
...@@ -25,7 +25,6 @@ import org.apache.atlas.model.lineage.AtlasLineageInfo; ...@@ -25,7 +25,6 @@ import org.apache.atlas.model.lineage.AtlasLineageInfo;
import org.apache.atlas.model.lineage.AtlasLineageInfo.LineageDirection; import org.apache.atlas.model.lineage.AtlasLineageInfo.LineageDirection;
import org.apache.atlas.utils.AtlasPerfTracer; import org.apache.atlas.utils.AtlasPerfTracer;
import org.apache.atlas.web.util.Servlets; import org.apache.atlas.web.util.Servlets;
import org.apache.commons.collections.CollectionUtils;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -40,6 +39,7 @@ import javax.ws.rs.PathParam; ...@@ -40,6 +39,7 @@ import javax.ws.rs.PathParam;
import javax.ws.rs.Produces; import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam; import javax.ws.rs.QueryParam;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
/** /**
* REST interface for an entity's lineage information * REST interface for an entity's lineage information
...@@ -47,6 +47,8 @@ import javax.ws.rs.core.Context; ...@@ -47,6 +47,8 @@ import javax.ws.rs.core.Context;
@Path("v2/lineage") @Path("v2/lineage")
@Singleton @Singleton
@Service @Service
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
public class LineageREST { public class LineageREST {
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.LineageREST"); private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.LineageREST");
...@@ -75,8 +77,6 @@ public class LineageREST { ...@@ -75,8 +77,6 @@ public class LineageREST {
*/ */
@GET @GET
@Path("/{guid}") @Path("/{guid}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasLineageInfo getLineageGraph(@PathParam("guid") String guid, public AtlasLineageInfo getLineageGraph(@PathParam("guid") String guid,
@QueryParam("direction") @DefaultValue(DEFAULT_DIRECTION) LineageDirection direction, @QueryParam("direction") @DefaultValue(DEFAULT_DIRECTION) LineageDirection direction,
@QueryParam("depth") @DefaultValue(DEFAULT_DEPTH) int depth) throws AtlasBaseException { @QueryParam("depth") @DefaultValue(DEFAULT_DEPTH) int depth) throws AtlasBaseException {
......
...@@ -29,16 +29,8 @@ import org.springframework.stereotype.Service; ...@@ -29,16 +29,8 @@ import org.springframework.stereotype.Service;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.ws.rs.Consumes; import javax.ws.rs.*;
import javax.ws.rs.DELETE; import javax.ws.rs.core.MediaType;
import javax.ws.rs.DefaultValue;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.QueryParam;
/** /**
* REST interface for entity relationships. * REST interface for entity relationships.
...@@ -46,6 +38,8 @@ import javax.ws.rs.QueryParam; ...@@ -46,6 +38,8 @@ import javax.ws.rs.QueryParam;
@Path("v2/relationship") @Path("v2/relationship")
@Singleton @Singleton
@Service @Service
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
public class RelationshipREST { public class RelationshipREST {
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.RelationshipREST"); private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.RelationshipREST");
...@@ -60,8 +54,6 @@ public class RelationshipREST { ...@@ -60,8 +54,6 @@ public class RelationshipREST {
* Create a new relationship between entities. * Create a new relationship between entities.
*/ */
@POST @POST
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasRelationship create(AtlasRelationship relationship) throws AtlasBaseException { public AtlasRelationship create(AtlasRelationship relationship) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
...@@ -81,8 +73,6 @@ public class RelationshipREST { ...@@ -81,8 +73,6 @@ public class RelationshipREST {
* Update an existing relationship between entities. * Update an existing relationship between entities.
*/ */
@PUT @PUT
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasRelationship update(AtlasRelationship relationship) throws AtlasBaseException { public AtlasRelationship update(AtlasRelationship relationship) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
...@@ -103,8 +93,6 @@ public class RelationshipREST { ...@@ -103,8 +93,6 @@ public class RelationshipREST {
*/ */
@GET @GET
@Path("/guid/{guid}") @Path("/guid/{guid}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasRelationshipWithExtInfo getById(@PathParam("guid") String guid, public AtlasRelationshipWithExtInfo getById(@PathParam("guid") String guid,
@QueryParam("extendedInfo") @DefaultValue("false") boolean extendedInfo) @QueryParam("extendedInfo") @DefaultValue("false") boolean extendedInfo)
throws AtlasBaseException { throws AtlasBaseException {
...@@ -136,8 +124,6 @@ public class RelationshipREST { ...@@ -136,8 +124,6 @@ public class RelationshipREST {
*/ */
@DELETE @DELETE
@Path("/guid/{guid}") @Path("/guid/{guid}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public void deleteById(@PathParam("guid") String guid) throws AtlasBaseException { public void deleteById(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
......
...@@ -39,9 +39,16 @@ import org.springframework.stereotype.Service; ...@@ -39,9 +39,16 @@ import org.springframework.stereotype.Service;
import javax.inject.Inject; import javax.inject.Inject;
import javax.inject.Singleton; import javax.inject.Singleton;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.ws.rs.*; import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context; import javax.ws.rs.core.Context;
import java.util.Collections; import javax.ws.rs.core.MediaType;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
...@@ -51,6 +58,8 @@ import java.util.Set; ...@@ -51,6 +58,8 @@ import java.util.Set;
@Path("v2/types") @Path("v2/types")
@Singleton @Singleton
@Service @Service
@Consumes({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
@Produces({Servlets.JSON_MEDIA_TYPE, MediaType.APPLICATION_JSON})
public class TypesREST { public class TypesREST {
private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.TypesREST"); private static final Logger PERF_LOG = AtlasPerfTracer.getPerfLogger("rest.TypesREST");
...@@ -71,7 +80,6 @@ public class TypesREST { ...@@ -71,7 +80,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/typedef/name/{name}") @Path("/typedef/name/{name}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasBaseTypeDef getTypeDefByName(@PathParam("name") String name) throws AtlasBaseException { public AtlasBaseTypeDef getTypeDefByName(@PathParam("name") String name) throws AtlasBaseException {
Servlets.validateQueryParamLength("name", name); Servlets.validateQueryParamLength("name", name);
...@@ -89,7 +97,6 @@ public class TypesREST { ...@@ -89,7 +97,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/typedef/guid/{guid}") @Path("/typedef/guid/{guid}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasBaseTypeDef getTypeDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { public AtlasBaseTypeDef getTypeDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -107,7 +114,6 @@ public class TypesREST { ...@@ -107,7 +114,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/typedefs/headers") @Path("/typedefs/headers")
@Produces(Servlets.JSON_MEDIA_TYPE)
public List<AtlasTypeDefHeader> getTypeDefHeaders(@Context HttpServletRequest httpServletRequest) throws AtlasBaseException { public List<AtlasTypeDefHeader> getTypeDefHeaders(@Context HttpServletRequest httpServletRequest) throws AtlasBaseException {
SearchFilter searchFilter = getSearchFilter(httpServletRequest); SearchFilter searchFilter = getSearchFilter(httpServletRequest);
...@@ -124,7 +130,6 @@ public class TypesREST { ...@@ -124,7 +130,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/typedefs") @Path("/typedefs")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasTypesDef getAllTypeDefs(@Context HttpServletRequest httpServletRequest) throws AtlasBaseException { public AtlasTypesDef getAllTypeDefs(@Context HttpServletRequest httpServletRequest) throws AtlasBaseException {
SearchFilter searchFilter = getSearchFilter(httpServletRequest); SearchFilter searchFilter = getSearchFilter(httpServletRequest);
...@@ -143,7 +148,6 @@ public class TypesREST { ...@@ -143,7 +148,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/enumdef/name/{name}") @Path("/enumdef/name/{name}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEnumDef getEnumDefByName(@PathParam("name") String name) throws AtlasBaseException { public AtlasEnumDef getEnumDefByName(@PathParam("name") String name) throws AtlasBaseException {
Servlets.validateQueryParamLength("name", name); Servlets.validateQueryParamLength("name", name);
...@@ -162,7 +166,6 @@ public class TypesREST { ...@@ -162,7 +166,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/enumdef/guid/{guid}") @Path("/enumdef/guid/{guid}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEnumDef getEnumDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { public AtlasEnumDef getEnumDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -182,7 +185,6 @@ public class TypesREST { ...@@ -182,7 +185,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/structdef/name/{name}") @Path("/structdef/name/{name}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasStructDef getStructDefByName(@PathParam("name") String name) throws AtlasBaseException { public AtlasStructDef getStructDefByName(@PathParam("name") String name) throws AtlasBaseException {
Servlets.validateQueryParamLength("name", name); Servlets.validateQueryParamLength("name", name);
...@@ -201,7 +203,6 @@ public class TypesREST { ...@@ -201,7 +203,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/structdef/guid/{guid}") @Path("/structdef/guid/{guid}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasStructDef getStructDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { public AtlasStructDef getStructDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -220,7 +221,6 @@ public class TypesREST { ...@@ -220,7 +221,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/classificationdef/name/{name}") @Path("/classificationdef/name/{name}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasClassificationDef getClassificationDefByName(@PathParam("name") String name) throws AtlasBaseException { public AtlasClassificationDef getClassificationDefByName(@PathParam("name") String name) throws AtlasBaseException {
Servlets.validateQueryParamLength("name", name); Servlets.validateQueryParamLength("name", name);
...@@ -239,7 +239,6 @@ public class TypesREST { ...@@ -239,7 +239,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/classificationdef/guid/{guid}") @Path("/classificationdef/guid/{guid}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasClassificationDef getClassificationDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { public AtlasClassificationDef getClassificationDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -258,7 +257,6 @@ public class TypesREST { ...@@ -258,7 +257,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/entitydef/name/{name}") @Path("/entitydef/name/{name}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEntityDef getEntityDefByName(@PathParam("name") String name) throws AtlasBaseException { public AtlasEntityDef getEntityDefByName(@PathParam("name") String name) throws AtlasBaseException {
Servlets.validateQueryParamLength("name", name); Servlets.validateQueryParamLength("name", name);
...@@ -277,7 +275,6 @@ public class TypesREST { ...@@ -277,7 +275,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/entitydef/guid/{guid}") @Path("/entitydef/guid/{guid}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasEntityDef getEntityDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { public AtlasEntityDef getEntityDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -295,7 +292,6 @@ public class TypesREST { ...@@ -295,7 +292,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/relationshipdef/name/{name}") @Path("/relationshipdef/name/{name}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasRelationshipDef getRelationshipDefByName(@PathParam("name") String name) throws AtlasBaseException { public AtlasRelationshipDef getRelationshipDefByName(@PathParam("name") String name) throws AtlasBaseException {
Servlets.validateQueryParamLength("name", name); Servlets.validateQueryParamLength("name", name);
...@@ -314,7 +310,6 @@ public class TypesREST { ...@@ -314,7 +310,6 @@ public class TypesREST {
*/ */
@GET @GET
@Path("/relationshipdef/guid/{guid}") @Path("/relationshipdef/guid/{guid}")
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasRelationshipDef getRelationshipDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException { public AtlasRelationshipDef getRelationshipDefByGuid(@PathParam("guid") String guid) throws AtlasBaseException {
Servlets.validateQueryParamLength("guid", guid); Servlets.validateQueryParamLength("guid", guid);
...@@ -336,8 +331,6 @@ public class TypesREST { ...@@ -336,8 +331,6 @@ public class TypesREST {
*/ */
@POST @POST
@Path("/typedefs") @Path("/typedefs")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public AtlasTypesDef createAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException { public AtlasTypesDef createAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
...@@ -363,8 +356,6 @@ public class TypesREST { ...@@ -363,8 +356,6 @@ public class TypesREST {
*/ */
@PUT @PUT
@Path("/typedefs") @Path("/typedefs")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
@Experimental @Experimental
public AtlasTypesDef updateAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException { public AtlasTypesDef updateAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
...@@ -390,8 +381,6 @@ public class TypesREST { ...@@ -390,8 +381,6 @@ public class TypesREST {
*/ */
@DELETE @DELETE
@Path("/typedefs") @Path("/typedefs")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
@Experimental @Experimental
public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException { public void deleteAtlasTypeDefs(final AtlasTypesDef typesDef) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
...@@ -419,8 +408,6 @@ public class TypesREST { ...@@ -419,8 +408,6 @@ public class TypesREST {
*/ */
@DELETE @DELETE
@Path("/typedef/name/{typeName}") @Path("/typedef/name/{typeName}")
@Consumes(Servlets.JSON_MEDIA_TYPE)
@Produces(Servlets.JSON_MEDIA_TYPE)
public void deleteAtlasTypeByName(@PathParam("typeName") final String typeName) throws AtlasBaseException { public void deleteAtlasTypeByName(@PathParam("typeName") final String typeName) throws AtlasBaseException {
AtlasPerfTracer perf = null; AtlasPerfTracer perf = null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment