Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Commit

Permalink
API documentation with Enunciate (final)
Browse files Browse the repository at this point in the history
Change-Id: I2d18e3ab0ddd8979a1c1c571bd7fb93accc2b800
Signed-off-by: Matthias Steiner <matthias.steiner@inscope.net>
  • Loading branch information
steinermatt committed Oct 18, 2014
1 parent 0b3c772 commit 0331a3b
Show file tree
Hide file tree
Showing 16 changed files with 4,342 additions and 3,311 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ Authors
Copyright and license
---------------------

Copyright (c) 2013 SAP AG
Copyright (c) 2013 SAP SE

Except as provided below, this software is licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.You may obtain a copy of the License at:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public class ContactFacade extends BaseFacade
*
* @return {@link Response} representation of the {@link List} of all {@link Contact} objects
*
* @name Find Contact
* @name Get All Contacts
*/
@GET
@org.codehaus.enunciate.jaxrs.TypeHint(Contact.class)
Expand Down Expand Up @@ -68,16 +68,19 @@ public Response create(@Valid Contact contact)
}

/**
* Returns the {@link Contact} with the specified ID or <code>NULL</code> if no {@link Contact} object with the specified ID exists.
* Returns the {@link Contact} with the specified ID or a {@link Status.NOT_FOUND} (404) error code if no {@link Contact} object with the specified ID exists.
*
* @param id The id of the {@link Contact} to retrieve
* @return {@link Response} representation of the {@link Contact} or a {@link Status.NOT_FOUND} (404) error code
*
* @name Find Contact
* @name Get Contact
*/
@GET
@Path("/{id}")
@org.codehaus.enunciate.jaxrs.TypeHint(Contact.class)
@org.codehaus.enunciate.jaxrs.StatusCodes(value = {@org.codehaus.enunciate.jaxrs.ResponseCode(code = 200, condition = "In case of success"),
@org.codehaus.enunciate.jaxrs.ResponseCode(code = 404, condition = "In case no Contact object with the specified ID exists")})

public Response findOne(@PathParam("id") String id)
{
Response retVal = null;
Expand Down Expand Up @@ -126,6 +129,7 @@ public Response update(@PathParam("id") String id, @Valid Contact contact)
@DELETE
@Path("/{id}")
@org.codehaus.enunciate.jaxrs.StatusCodes(value = {@org.codehaus.enunciate.jaxrs.ResponseCode(code = 200, condition = "In case of success")})
@org.codehaus.enunciate.jaxrs.TypeHint(org.codehaus.enunciate.jaxrs.TypeHint.NO_CONTENT.class)
public Response delete(@PathParam("id") String id)
{
Response retVal = null;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@XmlSchema (namespace = "http://api.enterprise-granny.samples.cloud.sap.com/model")
package com.sap.hana.cloud.samples.granny.model;

import javax.xml.bind.annotation.XmlSchema;
9 changes: 0 additions & 9 deletions src/main/webapp/WEB-INF/views/tiles/js.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,9 @@

<!-- jQuery -->
<script src="<c:url value="/resources/js/jquery-1.11.1.min.js" />"></script>
<script src="<c:url value="/resources/js/jquery-migrate-1.2.1.min.js" />"></script>

<!-- bootstrap -->
<script src="<c:url value="/resources/js/bootstrap.min.js" />"></script>

<!-- pjax -->
<script src="<c:url value="/resources/js/jquery.pjax.js" />"></script>

<script>
/*
$(document).on('submit', 'form[data-pjax]', function(event) {$.pjax.submit(event, '#pjax-container')});
$(document).pjax('a', '#pjax-container');
*/
</script>
Loading

0 comments on commit 0331a3b

Please sign in to comment.