Thanks for the clarification with path_translation.
Regarding the 2nd point, I've seen in the docs that this is the default behavior but it didn't work and that's why I've tried using APPEND_PATH_TO_ADDRESS explicitly. Here is the relevant part extracted from my code:
const api = express();
api.use(bodyParser.json());
api.get('/', (req, res) => {
res.send('Hello root!');
});
api.get('/test', (req, res) => {
res.send('Hello api 2!');
});
export const webApi = functions.https.onRequest(api);
With this and the above mentioned openAPI config, I get "Hello root!" when I am calling
https://{HOST}/test I've also tried creating an additional route in openAPI and it is also redirected to the base function URL. Another thing I've tried is to explicitly set the x-google-backend address for the /test path as
https://us-central1-gl-beefastdelivery-staging.cloudfunctions.net/delivery_api/test but this results in 401: Unauthorised.
My first try was with Cloud Functions because I was already working with Firebase and it was an easier and natural move. For some reason, Firebase stuff looks a bit less scary than Google Cloud stuff, even though, in the end, both are easy to use. Also, somehow, the table from this page (
https://cloud.google.com/endpoints/docs/choose-endpoints-option) made me think that AppEngine Standard can be used with Endpoints only with java or python. Now, that you mentioned it, I looked closer to the table and I found this
https://cloud.google.com/endpoints/docs/openapi/get-started-app-engine-standard. It actually makes sense to work and I'll try to implement the API this way but, if this is a bug and not just my mistake, I am still open to help.