So I am running the sample code provided by Google:
package com.neat.backend;
/**
* An endpoint class we are exposing
*/
@Api(
name = \"myApi\",
@Kevendra's answer highlights that this issue can be caused if an openapi.json file is missing a reference to the endpoint API method. Firebase may be using this to reference and discover the API method.
From the Google OpenAPI Overview:
Basic structure of an OpenAPI document:
An OpenAPI document describes the surface of your REST API, and defines information such as:
The name and description of the API. The individual endpoints (paths) in the API. How the callers are authenticated.
Follow these steps to regenerate and deploy the openapi.json file:
generate:
$ mvn clean package endpoints-framework:openApiDocs -DskipTests
mvn clean - run a Maven goal to clean your project. package - compile and package itopenapi.json file at the location: target/openapi-docs/openapi.json- see generating and deploying an api configuration.-DskipTests skips running any tests, to avoid any test failure due
to the openapi.json not yet being generateddeploy:
(As a precaution you can first validate the project ID returned from the following command to make sure that the service isn't created in the wrong project - gcloud config list project)
$ gcloud endpoints services deploy target/openapi-docs/openapi.json
Deploys the openapi.json file from its generated location (in the 'generate' step above). See the Google docs on Deploying the OpenAPI document