How to generate code from openapi-appengine.yaml definition?

184 views
Skip to first unread message

Constantine Vassilev

unread,
May 30, 2018, 9:30:43 PM5/30/18
to Google Cloud Endpoints
I would like to use OpenAPI on AppEngine flexible environment.
The backend should be in Golang, the clients - iOS and Android apps.

I am following the example at:

I understand how it is working. Now need to start from scratch and create my own 
openapi-appengine.yaml. From it to generate the backend and client stubs.

How is the best way to do it?

Wesley Wong

unread,
May 31, 2018, 1:08:28 PM5/31/18
to Constantine Vassilev, Google Cloud Endpoints
Endpoints does not provide a way to generate stubs from OpenAPI specs. You can look around in the OpenAPI community to see if there is a tool that will help you with this. However, be aware that there are some Endpoints specific fields that will not be supported by these tools.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/74053eec-1504-4a1f-bf99-03610356f0da%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Constantine Vassilev

unread,
May 31, 2018, 4:25:15 PM5/31/18
to Google Cloud Endpoints
So the reason for OpenAPI is when you need to control access to it. If I don't need that
better create the interface myself with AppEngine?

Wesley Wong

unread,
May 31, 2018, 4:54:55 PM5/31/18
to Constantine Vassilev, Google Cloud Endpoints
Can you elaborate on your use case? What kind of access control do you need?

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.

Constantine Vassilev

unread,
May 31, 2018, 5:00:58 PM5/31/18
to Google Cloud Endpoints
Currently I gave an iOS app doing the following:
1) the user taps on the map
2) the location data is sent to my server
3) property data is returned back and showed in UI

The database is hosted on my server and I want to move it on GoogleCloud.

The API is working as a web service endpoints created with Golang. 

I was thinking I can do the API with OpenAPI and generate the client and server
stubs. I plan to have an Android app and was thinking it could speedup the development.



On Wednesday, May 30, 2018 at 6:30:43 PM UTC-7, Constantine Vassilev wrote:

Wesley Wong

unread,
May 31, 2018, 5:08:50 PM5/31/18
to Constantine Vassilev, Google Cloud Endpoints
Even though Endpoints doesn't help you generate the stub clients and service, Endpoints should still fit very nicely with your use case. By using Endpoints, you will get metrics, logging, tracing, and the ability to easily add API keys and service-to-service auth for your web service. You can also rate limit the calls (in Beta) to your web service.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.

Constantine Vassilev

unread,
May 31, 2018, 5:17:43 PM5/31/18
to Google Cloud Endpoints
That would be very useful indeed.

So what is the best way to start?

I want the backend to be in Golang.
The client side is iOS - Swift, Android - Java.

I will create only 1 access point like www.myws.com/ws
to make the plumbing simple. The interface - JSON request/response.
In the JSON definition will have "function" field. The backend in AppEngine/Golang
will check for this "function" and determine what data to return back.

How is the best way to achieve this?

Thank you,
--Constantine

On Thursday, May 31, 2018 at 2:08:50 PM UTC-7, Wesley Wong wrote:
Even though Endpoints doesn't help you generate the stub clients and service, Endpoints should still fit very nicely with your use case. By using Endpoints, you will get metrics, logging, tracing, and the ability to easily add API keys and service-to-service auth for your web service. You can also rate limit the calls (in Beta) to your web service.

On Thu, May 31, 2018 at 2:00 PM Constantine Vassilev <ths...@gmail.com> wrote:
Currently I gave an iOS app doing the following:
1) the user taps on the map
2) the location data is sent to my server
3) property data is returned back and showed in UI

The database is hosted on my server and I want to move it on GoogleCloud.

The API is working as a web service endpoints created with Golang. 

I was thinking I can do the API with OpenAPI and generate the client and server
stubs. I plan to have an Android app and was thinking it could speedup the development.



On Wednesday, May 30, 2018 at 6:30:43 PM UTC-7, Constantine Vassilev wrote:

-- 
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.
On Wednesday, May 30, 2018 at 6:30:43 PM UTC-7, Constantine Vassilev wrote:

Wesley Wong

unread,
May 31, 2018, 5:53:48 PM5/31/18
to Constantine Vassilev, Google Cloud Endpoints
You would create the service the same way you would if you weren't using Endpoints.

The integration with Endpoints would be the OpenAPI spec. You would either have created that already before writing the code to define your API, or you would need to create one after you write the code to match what you implemented.

With the OpenAPI spec, you can follow the tutorials, but the general idea would be:
1. Update your OpenAPI spec host field with your service name.
2. Run "gcloud endpoints services deploy openapi.yaml"
3. Configure app.yaml with the endpoints_api_service configuration.
4. Run "gcloud app deploy app.yaml"

To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.

On Wednesday, May 30, 2018 at 6:30:43 PM UTC-7, Constantine Vassilev wrote:
I would like to use OpenAPI on AppEngine flexible environment.
The backend should be in Golang, the clients - iOS and Android apps.

I am following the example at:

I understand how it is working. Now need to start from scratch and create my own 
openapi-appengine.yaml. From it to generate the backend and client stubs.

How is the best way to do it?

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/944c50f4-026e-43b3-9583-8a636832f224%40googlegroups.com.

Constantine Vassilev

unread,
May 31, 2018, 6:04:58 PM5/31/18
to Google Cloud Endpoints
What are the best links for:
1) Client side: iOS/Swift, Android/Java
2) Server side: Golang
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.

On Wednesday, May 30, 2018 at 6:30:43 PM UTC-7, Constantine Vassilev wrote:
I would like to use OpenAPI on AppEngine flexible environment.
The backend should be in Golang, the clients - iOS and Android apps.

I am following the example at:

I understand how it is working. Now need to start from scratch and create my own 
openapi-appengine.yaml. From it to generate the backend and client stubs.

How is the best way to do it?

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.

Wesley Wong

unread,
May 31, 2018, 6:51:52 PM5/31/18
to Constantine Vassilev, Google Cloud Endpoints
Unfortunately, I don't have any links for those specific technologies. Perhaps someone else on the list can chime in with useful resources for these.

To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.

On Wednesday, May 30, 2018 at 6:30:43 PM UTC-7, Constantine Vassilev wrote:
I would like to use OpenAPI on AppEngine flexible environment.
The backend should be in Golang, the clients - iOS and Android apps.

I am following the example at:

I understand how it is working. Now need to start from scratch and create my own 
openapi-appengine.yaml. From it to generate the backend and client stubs.

How is the best way to do it?

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/7c4069b0-3da2-4eaa-a7f7-37c555f94923%40googlegroups.com.

Constantine Vassilev

unread,
May 31, 2018, 7:25:36 PM5/31/18
to Google Cloud Endpoints
These technologies is what OpenAPI should interface to.


On Wednesday, May 30, 2018 at 6:30:43 PM UTC-7, Constantine Vassilev wrote:

Constantine Vassilev

unread,
Jun 2, 2018, 11:29:14 PM6/2/18
to Google Cloud Endpoints
I think Cloud Functions is best choice.

What is the best architecture to do that with Endpoints?


On Thursday, May 31, 2018 at 2:08:50 PM UTC-7, Wesley Wong wrote:
Even though Endpoints doesn't help you generate the stub clients and service, Endpoints should still fit very nicely with your use case. By using Endpoints, you will get metrics, logging, tracing, and the ability to easily add API keys and service-to-service auth for your web service. You can also rate limit the calls (in Beta) to your web service.

On Thu, May 31, 2018 at 2:00 PM Constantine Vassilev <ths...@gmail.com> wrote:
Currently I gave an iOS app doing the following:
1) the user taps on the map
2) the location data is sent to my server
3) property data is returned back and showed in UI

The database is hosted on my server and I want to move it on GoogleCloud.

The API is working as a web service endpoints created with Golang. 

I was thinking I can do the API with OpenAPI and generate the client and server
stubs. I plan to have an Android app and was thinking it could speedup the development.



On Wednesday, May 30, 2018 at 6:30:43 PM UTC-7, Constantine Vassilev wrote:
I would like to use OpenAPI on AppEngine flexible environment.
The backend should be in Golang, the clients - iOS and Android apps.

I am following the example at:

I understand how it is working. Now need to start from scratch and create my own 
openapi-appengine.yaml. From it to generate the backend and client stubs.

How is the best way to do it?

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.

Wesley Wong

unread,
Jun 4, 2018, 12:08:50 PM6/4/18
to Constantine Vassilev, Google Cloud Endpoints
Endpoints does not currently support Cloud Functions.

You an check out this thread for more details:

On Sat, Jun 2, 2018 at 8:29 PM Constantine Vassilev <ths...@gmail.com> wrote:
I think Cloud Functions is best choice.

What is the best architecture to do that with Endpoints?


On Thursday, May 31, 2018 at 2:08:50 PM UTC-7, Wesley Wong wrote:
Even though Endpoints doesn't help you generate the stub clients and service, Endpoints should still fit very nicely with your use case. By using Endpoints, you will get metrics, logging, tracing, and the ability to easily add API keys and service-to-service auth for your web service. You can also rate limit the calls (in Beta) to your web service.

On Thu, May 31, 2018 at 2:00 PM Constantine Vassilev <ths...@gmail.com> wrote:
Currently I gave an iOS app doing the following:
1) the user taps on the map
2) the location data is sent to my server
3) property data is returned back and showed in UI

The database is hosted on my server and I want to move it on GoogleCloud.

The API is working as a web service endpoints created with Golang. 

I was thinking I can do the API with OpenAPI and generate the client and server
stubs. I plan to have an Android app and was thinking it could speedup the development.



On Wednesday, May 30, 2018 at 6:30:43 PM UTC-7, Constantine Vassilev wrote:
I would like to use OpenAPI on AppEngine flexible environment.
The backend should be in Golang, the clients - iOS and Android apps.

I am following the example at:

I understand how it is working. Now need to start from scratch and create my own 
openapi-appengine.yaml. From it to generate the backend and client stubs.

How is the best way to do it?

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endp...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-endpoints/01d17058-f942-4f49-915a-52293310a364%40googlegroups.com.

Constantine Vassilev

unread,
Jun 4, 2018, 12:11:07 PM6/4/18
to Google Cloud Endpoints
It can be good functionality if you add it.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "Google Cloud Endpoints" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-endpoints+unsub...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages