/appengine-endpoints

Primary LanguageJavaApache License 2.0Apache-2.0

Skeleton Google Cloud Endpoints Frameworks for App Engine using a Discovery Document

This generated sample provides a skeleton to get started with Cloud Endpoints Frameworks for App Engine using a Discovery Document. This sample contains comments of how to use the prior Endpoints Frameworks as well. For clarity, the prior Endpoints Frameworks and the new Endpoints Frameworks are denoted as Endpoints Frameworks v1.0 and Endpoints Frameworks v2.0 respectively.

Google Cloud Endpoints Frameworks v2.0 provides new functionality which may require payment and uses an OpenAPI specification. The OpenAPI development process is explained here and a quickstart is provided here.

  1. Add your API method to src/main/java/com/necoutezpas/YourFirstAPI.java.

  2. [Optional]: Use Cloud Endpoints Frameworks v1.0.

    • Uncomment Endpoints Frameworks v1.0 sections and comment Endpoints Frameworks v2.0 sections in the following files.

        pom.xml
        build.gradle
        src/main/webapp/WEB-INF/web.xml
      
  3. Build and Run the application locally at http://localhost:8080 by using:

    mvn clean appengine:run

  4. Explore local server's API explorer by browsing to:

    http://localhost:8080/_ah/api/explorer

  5. Generate the client library with a readme located at target/client-libs/helloworld-v1-java.zip by using:

    mvn endpoints-framework:clientLibs

  6. Build and Deploy your application to Google App Engine by using:

    mvn clean appengine:deploy

  7. Build and Run the application locally at http://localhost:8080 by using:

    gradle clean appengineRun

  8. Explore local server's API explorer by browsing to:

    http://localhost:8080/_ah/api/explorer

  9. Generate the client library with a readme located at build/endpointsClientLibs/helloworld-v1-java.zip by using:

    gradle endpointsClientLibs

  10. Build and Deploy your application to Google App Engine by using:

    gradle clean appengineDeploy

appengine-endpoints